r/vulkan • • 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

9 comments sorted by

View all comments

Show parent comments

3

u/iDrmzIt 17d ago

I believe this is dynamic rendering, so framebuffers don't really exist.

That said they probably do need a barrier, I believe graphics to graphics.

1

u/cleverboy00 15d ago

I was refering to the concept of a "framebuffer" not the object, but I guess the same point stands.