Creating an indirect command buffer
Configure a descriptor to specify the properties of an indirect command buffer.
Overview
An indirect command buffer stores encoded GPU commands persistently. Using an indirect command buffer, you can encode a command once and reuse it multiple times. You can also encode commands into an indirect command buffer simultaneously with multiple threads on the CPU or with a compute kernel on the GPU.
To create an indirect command buffer, first create an MTLIndirectCommandBufferDescriptor instance and configure the descriptor’s properties. Then call makeIndirectCommandBuffer(descriptor:maxCommandCount:options:) on an MTLDevice instance to create the indirect command buffer.
See Also
Indirect command buffers
Specifying drawing and dispatch arguments indirectlyEncoding indirect command buffers on the CPUEncoding indirect command buffers on the GPUMTLIndirectCommandBufferMTLIndirectCommandBufferDescriptorMTLIndirectCommandTypeMTLIndirectCommandBufferExecutionRangeMTLIndirectCommandBufferExecutionRangeMake(_:_:)