osre icon indicating copy to clipboard operation
osre copied to clipboard

Swapchain images start in layout undefined

Open ratchetfreak opened this issue 9 years ago • 1 comments

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

ratchetfreak avatar Jun 29 '16 22:06 ratchetfreak

First thing I did is set the initialLayout to UNDEFINED. Thanks for the hint!

kimkulling avatar Jun 30 '16 11:06 kimkulling

Deprecated.

kimkulling avatar Oct 25 '22 12:10 kimkulling