Data types for function arguments.

SDKs

- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+

Framework

- Metal

Enumeration# MTLDataType

Data types for function arguments.

SDKs

- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+

Framework

- Metal

`MTLData`TypeNone

The argument doesn't correspond to any data type and is returned only if the argument has no valid data type.

`MTLData`TypeStruct

A structure.

`MTLData`TypeArray

An array.

`MTLData`TypePointer

A pointer.

`MTLData`TypeTexture

A texture.

`MTLData`TypeSampler

A texture sampler.

`MTLData`TypeR16Snorm

Ordinary format with one 16-bit, normalized, signed integer component.

`MTLData`TypeR16Unorm

Ordinary format with one 16-bit, normalized, unsigned integer component.

`MTLData`TypeR8Snorm

Ordinary format with one 8-bit, normalized, signed integer component.

`MTLData`TypeR8Unorm

Ordinary format with one 8-bit, normalized, unsigned integer component.

`MTLData`TypeRG11B10Float

Packed 32-bit format with two 11-bit (for red and green) and one 10-bit (for blue) floating-point color components.

`MTLData`TypeRG16Snorm

Ordinary format with two 16-bit, normalized, signed integer components.

`MTLData`TypeRG16Unorm

Ordinary format with two 16-bit, normalized, unsigned integer components.

`MTLData`TypeRG8Snorm

Ordinary format with two 8-bit, normalized, signed integer components.

`MTLData`TypeRG8Unorm

Ordinary format with two 8-bit, normalized, unsigned integer components.

`MTLData`TypeRGB10A2Unorm

Packed 32-bit format with normalized, unsigned integer color components.

`MTLData`TypeRGB9E5Float

Packed 32-bit format with three 9-bit, floating-point color components.

`MTLData`TypeRGBA16Snorm

Ordinary format with four 16-bit, normalized, signed integer components in RGBA order.

`MTLData`TypeRGBA16Unorm

Ordinary format with four 16-bit, normalized, unsigned integer components in RGBA order.

`MTLData`TypeRGBA8Snorm

Ordinary format with four 8-bit, normalized, signed integer components in RGBA order.

`MTLData`TypeRGBA8Unorm

Ordinary format with four 8-bit, normalized, unsigned integer components in RGBA order.

`MTLData`TypeRGBA8Unorm_sRGB

Ordinary format with four 8-bit, normalized, unsigned integer components in RGBA order with conversion between sRGB and linear space.

`MTLData`TypeFloat

A 32-bit floating-point value.

`MTLData`TypeFloat2

A two-component vector with 32-bit floating-point values.

`MTLData`TypeFloat3

A three-component vector with 32-bit floating-point values.

`MTLData`TypeFloat4

A four-component vector with 32-bit floating-point values.

`MTLData`TypeFloat2x2

A 2x2 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat2x3

A 2x3 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat2x4

A 2x4 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat3x2

A 3x2 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat3x3

A 3x3 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat3x4

A 3x4 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat4x2

A 4x2 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat4x3

A 4x3 component matrix with 32-bit floating-point values.

`MTLData`TypeFloat4x4

A 4x4 component matrix with 32-bit floating-point values.

`MTLData`TypeHalf

A 16-bit floating-point value.

`MTLData`TypeHalf2

A two-component vector with 16-bit floating-point values.

`MTLData`TypeHalf3

A three-component vector with 16-bit floating-point values.

`MTLData`TypeHalf4

A four-component vector with 16-bit floating-point values.

`MTLData`TypeHalf2x2

A 2x2 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf2x3

A 2x3 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf2x4

A 2x4 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf3x2

A 3x2 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf3x3

A 3x3 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf3x4

A 3x4 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf4x2

A 4x2 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf4x3

A 4x3 component matrix with 16-bit floating-point values.

`MTLData`TypeHalf4x4

A 4x4 component matrix with 16-bit floating-point values.

`MTLData`TypeInt

A signed, 32-bit integer value.

`MTLData`TypeInt2

A two-component vector with signed, 32-bit integer values.

`MTLData`TypeInt3

A three-component vector with signed, 32-bit integer values.

`MTLData`TypeInt4

A four-component vector with signed, 32-bit integer values.

`MTLData`TypeUInt

An unsigned, 32-bit integer value.

`MTLData`TypeUInt2

A two-component vector with unsigned, 32-bit integer values.

`MTLData`TypeUInt3

A three-component vector with unsigned, 32-bit integer values.

`MTLData`TypeUInt4

A four-component vector with unsigned, 32-bit integer values.

`MTLData`TypeShort

A signed, 16-bit integer value.

`MTLData`TypeShort2

A two-component vector with signed, 16-bit integer values.

`MTLData`TypeShort3

A three-component vector with signed, 16-bit integer values.

`MTLData`TypeShort4

A four-component vector with signed, 16-bit integer values.

`MTLData`TypeUShort

An unsigned, 16-bit integer value.

`MTLData`TypeUShort2

A two-component vector with unsigned, 16-bit integer values.

`MTLData`TypeUShort3

A three-component vector with unsigned, 16-bit integer values.

`MTLData`TypeUShort4

A four-component vector with unsigned, 16-bit integer values.

`MTLData`TypeChar

A signed, 8-bit integer value.

`MTLData`TypeChar2

A two-component vector with signed, 8-bit integer values.

`MTLData`TypeChar3

A three-component vector with signed, 8-bit integer values.

`MTLData`TypeChar4

A four-component vector with signed, 8-bit integer values.

`MTLData`TypeUChar

An unsigned, 8-bit integer value.

`MTLData`TypeUChar2

A two-component vector with unsigned, 8-bit integer values.

`MTLData`TypeUChar3

A three-component vector with unsigned, 8-bit integer values.

`MTLData`TypeUChar4

A four-component vector with unsigned, 8-bit integer values.

`MTLData`TypeBool

A Boolean value.

`MTLData`TypeBool2

A two-component vector with Boolean values.

`MTLData`TypeBool3

A three-component vector with Boolean values.

`MTLData`TypeBool4

A four-component vector with Boolean values.

`MTLData`TypeIndirectCommandBuffer

An indirect command buffer.

`MTLData`TypeRenderPipeline

A render pipeline.

`MTLData`TypeComputePipeline

A compute pipeline.

`MTLPipeline`Option

The compilation options that determine which argument information to provide.

`MTLCompute`PipelineReflection

Information about the arguments of a compute function.

`MTLRender`PipelineReflection

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.

`MTLStruct`Type

A description of a structure.

`MTLArray`Type

A description of an array.

`MTLPointer`Type

A description of a pointer.

`MTLTexture`ReferenceType

A description of a texture.

`MTLArgument`Type

The resource type associated with an argument of a function.

`MTLArgument`Access

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