Skip to content

vsgrendertotexture:Want to konw how to synchronize between two commandbuffers in VSG? #1036

Answered by timoore
simwangrui asked this question in Q&A
Discussion options

You must be logged in to vote

The synchronization of the render-to-texture pass and the following passes that use the render is all done with a subpass dependency in the render pass that does the RTT. In particular, these lines:

    // XXX This dependency is copied from the offscreenrender.cpp
    // example. I don't completely understand it, but I think its
    // purpose is to create a barrier if some earlier render pass was
    // using this framebuffer's attachment as a texture.
    dependencies[0].srcSubpass = VK_SUBPASS_EXTERNAL;
    dependencies[0].dstSubpass = 0;
    dependencies[0].srcStageMask = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
    dependencies[0].dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPU…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@simwangrui
Comment options

Answer selected by simwangrui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants