Reserves a place for the command buffer on the associated command queue.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Enqueueing a command buffer reserves a place for the command buffer on the command queue without committing the command buffer for execution. When this command buffer is later committed, it keeps its position in the queue. You enqueue command buffers so that you can create multiple command buffers with a fixed order of execution without encoding the command buffers serially. You can use other threads to encode commands into the command buffers and those threads can complete in any order.
You can call the
enqueue method before, during, or after encoding of commands. You can only enqueue a command buffer once.
enqueue method doesn’t make the command buffer eligible for execution. To execute the command buffer, call the