Functions

Retrieve information about rendering and compute functions.

Topics

Essentials

MTLFunction

An object representing a public shader function in the library.

Function Variants

Use function constants to create variants of a function.

MTLFunctionConstant

A constant used to specialize the behavior of a shader.

MTLFunctionConstantValues

A set of constant values used to specialize a graphics or compute function.

Input Assembly

MTLStageInputOutputDescriptor

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

MTLAttributeDescriptor

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

MTLBufferLayoutDescriptor

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

Function Argument Information

Retrieve information about a function's arguments.

MTLPipelineOption

The compilation options that determine which argument information to provide.

MTLComputePipelineReflection

Information about the arguments of a compute function.

MTLRenderPipelineReflection

Information about the arguments of a graphics function.

MTLArgument

Information about an argument of a graphics or compute function.

MTLType

A description of a data type.

MTLStructType

A description of a structure.

MTLArrayType

A description of an array.

MTLPointerType

A description of a pointer.

MTLTextureReferenceType

A description of a texture.

MTLDataType

Data types for function arguments.

MTLArgumentType

The resource type associated with an argument of a function.

MTLArgumentAccess

Function access restrictions to argument data in the shading language code.

See Also

Shaders

Libraries

Organize your shaders into libraries.