Encodes a command that blocks the execution of the command buffer until the given event reaches the given value.
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
The event on which to wait.
The minimum value the event must have before the GPU executes commands that follow this command.
You can't encode a wait event if the command buffer has an active command encoder.
When the device object reaches the command for the wait event, the device object waits until the event is signaled with a value equal to or larger than the provided value. While waiting, the GPU executes commands that appear earlier than the wait command, but doesn't start any commands that appear after it. Execution continues immediately if the event already has an equal or larger value.