Protocol

MTLIndirectCommandBuffer

A command buffer containing reusable commands, encoded either on the CPU or GPU.

Declaration

@protocol MTLIndirectCommandBuffer

Overview

Use an indirect command buffer to encode commands once and reuse them, and to encode commands on multiple CPU or GPU threads.

Don’t implement this protocol yourself; instead, create a MTLIndirectCommandBufferDescriptor object, configure its properties, and tell the MTLDevice to create the indirect command buffer. See Creating an Indirect Command Buffer.

Topics

Determining the Maximum Number of Commands

size

The number of commands contained in the indirect command buffer.

Required.

Retrieving Commands

- indirectRenderCommandAtIndex:

Gets the render command at the given index.

Required.

- indirectComputeCommandAtIndex:

Gets the compute command at the given index.

Required.

Resetting Commands

- resetWithRange:

Resets a range of commands to their default state.

Required.

Relationships

Inherits From

See Also

Essentials

Creating an Indirect Command Buffer

Configure a descriptor to specify the properties of an indirect command buffer.

MTLIndirectCommandBufferDescriptor

An object that configures new MTLIndirectCommandBuffer objects.

MTLIndirectRenderCommand

A render command in an indirect command buffer.

MTLIndirectComputeCommand

A compute command in an indirect command buffer.

MTLIndirectCommandBufferExecutionRange

A range of commands in an indirect command buffer.

MTLIndirectCommandBufferExecutionRangeMake

Creates a command execution range.