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

`case none`

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

`case `struct``

A structure.

`case array`

An array.

`case pointer`

A pointer.

`case texture`

A texture.

`case sampler`

A texture sampler.

`case r16Snorm`

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

`case r16Unorm`

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

`case r8Snorm`

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

`case r8Unorm`

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

`case rg11b10Float`

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

`case rg16Snorm`

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

`case rg16Unorm`

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

`case rg8Snorm`

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

`case rg8Unorm`

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

`case rgb10a2Unorm`

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

`case rgb9e5Float`

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

`case rgba16Snorm`

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

`case rgba16Unorm`

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

`case rgba8Snorm`

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

`case rgba8Unorm`

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

`case rgba8Unorm`_srgb

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

`case float`

A 32-bit floating-point value.

`case float2`

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

`case float3`

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

`case float4`

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

`case float2x2`

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

`case float2x3`

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

`case float2x4`

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

`case float3x2`

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

`case float3x3`

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

`case float3x4`

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

`case float4x2`

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

`case float4x3`

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

`case float4x4`

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

`case half`

A 16-bit floating-point value.

`case half2`

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

`case half3`

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

`case half4`

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

`case half2x2`

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

`case half2x3`

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

`case half2x4`

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

`case half3x2`

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

`case half3x3`

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

`case half3x4`

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

`case half4x2`

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

`case half4x3`

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

`case half4x4`

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

`case int`

A signed, 32-bit integer value.

`case int2`

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

`case int3`

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

`case int4`

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

`case uint`

An unsigned, 32-bit integer value.

`case uint2`

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

`case uint3`

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

`case uint4`

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

`case short`

A signed, 16-bit integer value.

`case short2`

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

`case short3`

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

`case short4`

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

`case ushort`

An unsigned, 16-bit integer value.

`case ushort2`

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

`case ushort3`

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

`case ushort4`

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

`case char`

A signed, 8-bit integer value.

`case char2`

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

`case char3`

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

`case char4`

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

`case uchar`

An unsigned, 8-bit integer value.

`case uchar2`

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

`case uchar3`

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

`case uchar4`

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

`case bool`

A Boolean value.

`case bool2`

A two-component vector with Boolean values.

`case bool3`

A three-component vector with Boolean values.

`case bool4`

A four-component vector with Boolean values.

`case indirect`CommandBuffer

An indirect command buffer.

`case render`Pipeline

A render pipeline.

`case compute`Pipeline

A compute pipeline.

`struct MTLPipeline`Option

The compilation options that determine which argument information to provide.

`class MTLCompute`PipelineReflection

Information about the arguments of a compute function.

`class MTLRender`PipelineReflection

Information about the arguments of a graphics function.

`class MTLArgument`

Information about an argument of a graphics or compute function.

`class MTLType`

A description of a data type.

`class MTLStruct`Type

A description of a structure.

`class MTLArray`Type

A description of an array.

`class MTLPointer`Type

A description of a pointer.

`class MTLTexture`ReferenceType

A description of a texture.

`enum MTLArgument`Type

The resource type associated with an argument of a function.

`enum MTLArgument`Access

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