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.

Basic Argument Buffers

Demonstrates how to manage groups of resources with an argument buffer.

Argument Buffers with Arrays and Resource Heaps

Demonstrates how to define an argument buffer with arrays and reduce CPU overhead by combining argument buffers with resource heaps.

Argument Buffers with GPU Encoding

Demonstrates how to encode an argument buffer with a compute pass and then access its arguments in a subsequent render pass.

Dynamic Terrain with Argument Buffers

Demonstrates how to use argument buffers to render a dynamic 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.