Class

MTLAttributeDescriptor

An object that describes an argument's format and where its data is stored in memory.

Declaration

class MTLAttributeDescriptor : NSObject

Overview

Attribute descriptors are used as part of a MTLVertexDescriptor or MTLStageInputOutputDescriptor to provide organization information about a function's arguments. Each descriptor describes a single function argument, including which buffer to read data from, where the data is stored in that buffer, and what kind of data is stored there.

Topics

Defining Attribute Location

var bufferIndex: Int

The index in the argument table for the buffer that contains the data for the attribute.

var offset: Int

The offset of the data from the start of the buffer data.

var format: MTLAttributeFormat

The format of the attribute's data.

enum MTLAttributeFormat

Values that specify the organization of function attribute data.

Relationships

Inherits From

See Also

Specifying Buffer Layouts and Fetch Behavior

var stageInputDescriptor: MTLStageInputOutputDescriptor?

The organization of input and output data for the compute function.

class MTLStageInputOutputDescriptor

An object that describes the input and output data of a function.

class MTLBufferLayoutDescriptor

An object that configures how input data for an attribute is fetched by a function.