1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#[doc(alias = "MTLDataType")]
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
#[non_exhaustive]
#[repr(usize)]
pub enum DType {
/// A placeholder that represents a GPU function parameter that doesn’t have a valid data type.
None = 0,
/// A structure instance.
Struct = 1,
/// An array instance.
Array = 2,
/// A 32-bit floating-point value.
F32 = 3,
/// A two-component vector with 32-bit floating-point values.
F32x2 = 4,
/// A three-component vector with 32-bit floating-point values.
F32x3 = 5,
/// A four-component vector with 32-bit floating-point values.
F32x4 = 6,
/// A 2x2 component matrix with 32-bit floating-point values.
F32x2x2 = 7,
/// A 2x3 component matrix with 32-bit floating-point values.
F32x2x3 = 8,
/// A 2x4 component matrix with 32-bit floating-point values.
F32x2x4 = 9,
/// A 3x2 component matrix with 32-bit floating-point values.
F32x3x2 = 10,
/// A 3x3 component matrix with 32-bit floating-point values.
F32x3x3 = 11,
/// A 3x4 component matrix with 32-bit floating-point values.
F32x3x4 = 12,
/// A 4x2 component matrix with 32-bit floating-point values.
F32x4x2 = 13,
/// A 4x3 component matrix with 32-bit floating-point values.
F32x4x3 = 14,
/// A 4x4 component matrix with 32-bit floating-point values.
F32x4x4 = 15,
/// A 16-bit floating-point value.
F16 = 16,
/// A two-component vector with 16-bit floating-point values.
F16x2 = 17,
F16x3 = 18,
F16x4 = 19,
F16x2x2 = 20,
F16x2x3 = 21,
F16x2x4 = 22,
F16x3x2 = 23,
F16x3x3 = 24,
F16x3x4 = 25,
F16x4x2 = 26,
F16x4x3 = 27,
F16x4x4 = 28,
I32 = 29,
I32x2 = 30,
I32x3 = 31,
I32x4 = 32,
U32 = 33,
U32x2 = 34,
U32x3 = 35,
U32x4 = 36,
I16 = 37,
I16x2 = 38,
I16x3 = 39,
I16x4 = 40,
U16 = 41,
U16x2 = 42,
U16x3 = 43,
U16x4 = 44,
I8 = 45,
I8x2 = 46,
I8x3 = 47,
I8x4 = 48,
U8 = 49,
U8x2 = 50,
U8x3 = 51,
U8x4 = 52,
Bool = 53,
Boolx2 = 54,
Boolx3 = 55,
Boolx4 = 56,
Texture = 58,
Sampler = 59,
Pointer = 60,
R8Unorm = 62,
R8Snorm = 63,
R16Unorm = 64,
R16Snorm = 65,
Rg8Unorm = 66,
Rg8Snorm = 67,
Rg16Unorm = 68,
Rg16Snorm = 69,
Rgba8Unorm = 70,
Rgba8UnormSrgb = 71,
Rgba8Snorm = 72,
Rgba16Unorm = 73,
Rgba16Snorm = 74,
Rgb10A2Unorm = 75,
Rg11B10Float = 76,
Rgb9E5Float = 77,
RenderPipeline = 78,
ComputePipeline = 79,
IndirectCmdBuf = 80,
I64 = 81,
I64x2 = 82,
I64x3 = 83,
I64x4 = 84,
U64 = 85,
U64x2 = 86,
U64x3 = 87,
U64x4 = 88,
VisibleFnTable = 115,
IntersectionFnTable = 116,
PrimitiveAccStruct = 117,
InstanceAccStruct = 118,
#[doc(alias = "MTLDataTypeBFloat")]
Bf16 = 121,
#[doc(alias = "MTLDataTypeBFloat2")]
Bf16x2 = 122,
#[doc(alias = "MTLDataTypeBFloat3")]
Bf16x3 = 123,
#[doc(alias = "MTLDataTypeBFloat4")]
Bf16x4 = 124,
#[doc(alias = "MTLDataTypeDepthStencilState")]
DepthStencilState = 139,
#[doc(alias = "MTLDataTypeTensor")]
Tensor = 140,
}