Use undefined initial image layout (fixes #187), added missing layout transition for compute texture target in ray tracing example
This commit is contained in:
parent
00560f06b5
commit
dbf80b217c
7 changed files with 39 additions and 34 deletions
|
|
@ -226,7 +226,7 @@ public:
|
|||
imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
imageCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
imageCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
|
||||
imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
imageCreateInfo.extent = { textureArray.width, textureArray.height, 1 };
|
||||
imageCreateInfo.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
imageCreateInfo.arrayLayers = layerCount;
|
||||
|
|
@ -255,7 +255,7 @@ public:
|
|||
copyCmd,
|
||||
textureArray.image,
|
||||
VK_IMAGE_ASPECT_COLOR_BIT,
|
||||
VK_IMAGE_LAYOUT_PREINITIALIZED,
|
||||
VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
subresourceRange);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue