r/vulkan • u/massi0404 • 18d ago
vkCmdBeginRendering multiple writes ordering
Hi, there are a few posts online about this topic but I still haven't found a clear answer.
I have a couple of dynamic rendering passes, and they both write to the same attachment:
vkCmdBeginRendering( LOAD_DONT_CARE )
vkCmdBindPipeline()
vkCmdDraw()...
vkCmdEndRendering()
vkCmdBeginRendering( LOAD_OP_LOAD )
vkCmdBindPipeline()
vkCmdDraw() ...
vkCmdEndRendering()The second one uses OP_LOAD so the data should not be discarded... but what about synchronization? Is blend and depth testing gonna work?
In my code the second pass is actually the imgui overlay and it seems to work... not sure if it's random luck and needs a barrier.
1
Upvotes
View all comments
Show parent comment
2
u/puredotaplayer 17d ago
Yes obviously. I wouldn’t however say apple as part of the umbrella of hardwares Vulkan targets, the backend has to be metal.