Instance Method


Encodes a command to copy commands from an indirect command buffer into another indirect command buffer.


func copyIndirectCommandBuffer(_ buffer: MTLIndirectCommandBuffer, sourceRange: Range<Int>, destination: MTLIndirectCommandBuffer, destinationIndex: Int)



The source indirect command buffer.


The range of commands in the source buffer to copy. The source range must start on a valid execution point.


The destination indirect command buffer.


The index in the destination buffer where the commands should be copied to. The destination index must be a valid execution point. The copy must end on a valid execution point.


Copying the contents of an indirect command buffer is only supported between compatible indirect command buffers. Compatibility is defined as having matching MTLIndirectCommandBufferDescriptor objects.

See Also

Working with Indirect Command Buffers

func optimizeIndirectCommandBuffer(MTLIndirectCommandBuffer, range: Range<Int>)

Encodes a command to optimize a range in the indirect command buffer to improve performance.

func resetCommandsInBuffer(MTLIndirectCommandBuffer, range: Range<Int>)

Encodes a command to reset a range of commands in an indirect command buffer.