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
|
|
@ -200,7 +200,7 @@ public:
|
|||
imageCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
imageCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
|
||||
imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
// Texture will be sampled in a shader and is also the blit destination
|
||||
imageCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ public:
|
|||
cmdBuffer,
|
||||
tex->image,
|
||||
VK_IMAGE_ASPECT_COLOR_BIT,
|
||||
VK_IMAGE_LAYOUT_PREINITIALIZED,
|
||||
VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
tex->imageLayout);
|
||||
|
||||
// Create sampler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue