How To Use Fence For Indirect Draw… | Apple Developer Forums
Có thể bạn quan tâm
- Apple Developer
- Apple Developer
- Sign in
- Create account
Hi, I met a problem about fences. My render steps are like the following:
[ComputeEncoder]
- Generate indirect buffer B.
- updateFence F.
[RenderEncoder]
- waitForFence F. // which stage?
- drawPrimitives with indirect buffer B.
But to call waitForFence I need to pass beforeStages, the only choices for this param are MTLRenderStageVertex orMTLRenderStageFragment. There is no stage for indirect draw like vulkan's VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT.
I tried to use MTLRenderStageVertex but it didn't work. What is the correct way to wait for a fence in this scenario?
Thanks.
Boost Copy to clipboard Share this post Copied to Clipboard Replies 2 Boosts 0 Views 732 Participants 2 atyuwen OP May ’22Also notice that the indirect buffer B is created from a MTLHeap, so the automatic resource tracking is disabled, I have to sync manually using MTLFences.
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment OP Apple May ’22Hi atyuwen, you seem to be approaching this in the correct way. Metal doesn't have an explicit stage for indirect-command-buffer consumption like Vulkan does. That said, waiting before MTLRenderStageVertex will indeed wait before ICB consumption.
As long as your encoders are committed to the same MTLCommandQueue, and they are in the correct, sequential order, then what you are doing should work. I would double-check if your usage of the fence F is correct.
1 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment How to use fence for indirect draws? First post date Last post date QTừ khóa » Vulkan Indirect
-
Draw Indirect - Vulkan Guide
-
Vulkan/indirectdraw.cpp At Master - GitHub
-
VkCmdDrawIndirect(3) - Khronos Registry
-
New Vulkan Example: Indirect Drawing - Sascha Willems
-
Vkguide: Intro To Draw Indirect : R/vulkan - Reddit
-
Indirect Rendering In Vulkan | 3D Graphics Rendering Cookbook
-
New: Vulkan Device Generated Commands | NVIDIA Technical Blog
-
Vulkan Memory Barrier For Indirect Compute Shader Dispatch
-
Mesa's Radeon Vulkan Driver Lands Indirect Ray-Tracing Support
-
Jeff Vulkan - Head Of Indirect Procurement - LGC - LinkedIn
-
(Vulkan) GPU Rendering And Multi-Draw Indirect | Geeks3D NewZ
-
Vulkan API Headers | Qt WebEngine 5.15.10