Class

MTLArgumentDescriptor

A representation of an argument within an argument buffer.

Declaration

@interface MTLArgumentDescriptor : NSObject

Overview

This descriptor can represent arguments within flat structures only. It can represent arrays of allowed argument buffer data types, but it cannot represent arguments within nested structures. Argument buffers with simple, flat structures can be represented by an array of MTLArgumentDescriptor objects. You can then use this array to create a MTLArgumentEncoder object by calling the newArgumentEncoderWithArguments: method.Argument buffers with complex, nested structures must define their structure in Metal shading language code, which can then be directly assigned to a specific buffer index of a function. You can then use this buffer index to call the newArgumentEncoderWithBufferIndex: method and create a MTLArgumentEncoder object.

Topics

Initializing an Argument Descriptor

+ argumentDescriptor

Creates an empty argument descriptor.

Setting the Descriptor's Properties

dataType

The data type of the argument.

index

The index ID of the argument.

access

The access permissions of the argument.

arrayLength

The length of an array argument.

constantBlockAlignment

The alignment of the constant block.

textureType

The texture type of a texture argument.

Relationships

Inherits From

Conforms To

See Also

Argument Buffers

About Argument Buffers

Improve your app’s performance by grouping your resources into an argument buffer.

Managing Groups of Resources with Argument Buffers

Create argument buffers to organize related resources.

Using Argument Buffers with Resource Heaps

Reduce CPU overhead by using arrays inside argument buffers and combining them with resource heaps.

Encoding Argument Buffers on the GPU

Use a compute pass to encode an argument buffer and access its arguments in a subsequent render pass.

Rendering Terrain Dynamically with Argument Buffers

Use argument buffers to render terrain in real time with a GPU-driven pipeline.

Indexing Argument Buffers

Assign resource indices within an argument buffer.

Tracking the Resource Residency of Argument Buffers

Optimize resource performance within an argument buffer.

MTLArgumentEncoder

An object used to encode data into an argument buffer.