vsgrendertotexture:Want to konw how to synchronize between two commandbuffers in VSG? #1036
-
HI, khronos.org say that: "vkQueueSubmit is a queue submission command, with each batch defined by an element of pSubmits. Batches begin execution in the order they appear in pSubmits, but may complete out of order." and "The order that command buffers appear in pCommandBuffers is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these command buffers may overlap or otherwise execute out of order." For this example, although RTT CommandBuffer and Quad geometry CommandBuffer are submitted in chronological order, it cannot guarantee completion in submission order. This means that RTT textures may have been applied to Quad geometry fragment shaders before rendering is completed. For each case, I dump the vulkan API: 1).Single CommandGraph with two RenderGraph using commandline --api: the vulkan api struct as follow:
2).Two CommandGraphs with owned RenderGraph using commandline --api -s:the vulkan api struct as follow:
3).Nested CommandGraphs with owned RenderGraph using commandline --api -n:the vulkan api struct as follow:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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:
I should correct the first comment at some point because I do now understand the purpose of the first dependency. There is only one copy of the target texture, so the first dependency prevents the RTT from starting before the previous frame has finished using it. |
Beta Was this translation helpful? Give feedback.
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: