Prevents further GPU work to be enqueued by the command encoder until the given fence is reached for the given render stage.
- iOS 10.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 10.0+
The fence to update.
The render stage that must wait until the fence is evaluated.
Fences are manipulated when the command buffer is submitted to the hardware. This maintains global order and prevents deadlock.
Fences are evaluated at command encoder boundaries. Waits occur at the beginning of an encoder and updates occur at the end of the encoder. Therefore, you're not allowed to first update and then wait on the same fence in the same encoder. However, you're allowed to first wait and then update the same fence.