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.