osre
osre copied to clipboard
Swapchain images start in layout undefined
https://github.com/kimkulling/osre/blob/master/src/RenderBackend/VulkanRenderer/VlkRenderBackend.cpp#L692
Here you set the initialLayout to PRESENT however the first time through the layout of a swapchain image is UNDEFINED.
You can however just set it to undefined. Transitioning away from undefined is always valid if you don't care about existing contents (which you don't as specified with the clear).
You also need a subpass dependency from external to 0 with srd and dst stageMasks = COLOR_ATTACHMENT_OUTPUT and srcAccessmask = 0 and dstAccessMask = COLOR_ATTACHMENT_WRITE.
Then the semaphore from acquire should then be paired with a waitStageMask of COLOR_ATTACHMENT_OUTPUT
First thing I did is set the initialLayout to UNDEFINED. Thanks for the hint!
Deprecated.