Instance Method

copyIndirectCommandBuffer(_:sourceRange:destination:destinationIndex:)

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

Declaration

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

Parameters

buffer

The source indirect command buffer.

sourceRange

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

destination

The destination indirect command buffer.

destinationIndex

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.

Discussion

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software