KhronosGroup / KhronosGroup/Vulkan-Samples

Layout discrepancy in dynamic_rendering_local_read

Open
#1,462 3 comments 0 reactions 1 assignee Claimed by @SaschaWillems View on GitHub
Dominant language
C++
Stars
5.4k
Forks
835
Avg merge
2h 16m
Merged PRs (30d)
1

Description

There is a discrepancy between the layout `swapchain_buffers[i].image` gets [transitioned to](https://github.com/KhronosGroup/Vulkan-Samples/blob/97fcdeecf2db26a78b432b285af3869a65bb00bd/samples/extensions/dynamic_rendering_local_read/dynamic_rendering_local_read.cpp#L846) before the render/gets [transitioned from](https://github.com/KhronosGroup/Vulkan-Samples/blob/97fcdeecf2db26a78b432b285af3869a65bb00bd/samples/extensions/dynamic_rendering_local_read/dynamic_rendering_local_read.cpp#L952) after it, and what [is declared](https://github.com/KhronosGroup/Vulkan-Samples/blob/97fcdeecf2db26a78b432b285af3869a65bb00bd/samples/extensions/dynamic_rendering_local_read/dynamic_rendering_local_read.cpp#L849C1-L860C66) as part of the related `VkRenderingAttachmentInfoKHR` in the [dynamic_rendering_local_read](https://github.com/KhronosGroup/Vulkan-Samples/tree/main/samples/extensions/dynamic_rendering_local_read) sample (`VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL` vs. `VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR`). Despite that, the sample runs without warnings on machine, though it must be said that it still runs fine if I replace the `VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL` with about any other layout, or even if I wholly remove the two explicit transitions for this resource. Similarly, I can replace `VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR` with other layouts without Vulkan complaining. However, switching the nearby `VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL` for a `VK_LAYOUT_UNDEFINED` results in a black screen (understandably). I wonder if this could be a matter of layouts actually being the same behind the scenes (resulting in ignored transitions/accidental compatibility) + incomplete layers, though I may well be misunderstanding something more fundamental.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.