1{
2    "description": [
3        "Copyright 2019 The ANGLE Project Authors. All rights reserved.",
4        "Use of this source code is governed by a BSD-style license that can be",
5        "found in the LICENSE file.",
6        "",
7        "mtl_format_map.json: Format mapping between OpenGL and Metal.",
8        "",
9        "Also see gen_mtl_format_table.py for the code generation step."
10    ],
11    "image": {
12        "description": [
13            "- The image's map is a dictionary where the key of each entry is the",
14            "ANGLE format ID, and the value is the Metal format enum. Note some formats",
15            "are missing from the map, these formats are either unsupported or emulated",
16            "on Metal.",
17            "map_mac is Mac specific mapping, similarly map_ios is iOS specific mapping.",
18            "",
19            "- override is emulation of unsupported formats on Metal by converting them to",
20            "supported formats. For example, converting R8G8B8 to R8G8B8A8",
21            "override_mac & override_ios are platform specific emulations.",
22            "",
23            "- d24s8_fallbacks_mac is Mac specific emulation when native Metal device doesn't",
24            "support D24_UNORM_S8_UINT format.",
25            "",
26            "- caps is a table containing native Metal format's specific capabilities such as",
27            "supporting filtering, blending and so on. Unlike the above tables, this table's keys",
28            "are Metal native format enums. This table's source is",
29            "https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf",
30            "Platform specific tables are caps_mac & caps_ios."
31        ],
32        "map": {
33            "NONE": "MTLPixelFormatInvalid",
34            "A8_UNORM": "MTLPixelFormatA8Unorm",
35            "R8_UNORM": "MTLPixelFormatR8Unorm",
36            "R8_SNORM": "MTLPixelFormatR8Snorm",
37            "R8_UINT": "MTLPixelFormatR8Uint",
38            "R8_SINT": "MTLPixelFormatR8Sint",
39            "R8G8_UNORM": "MTLPixelFormatRG8Unorm",
40            "R8G8_SNORM": "MTLPixelFormatRG8Snorm",
41            "R8G8_UINT": "MTLPixelFormatRG8Uint",
42            "R8G8_SINT": "MTLPixelFormatRG8Sint",
43            "R8G8B8A8_UINT": "MTLPixelFormatRGBA8Uint",
44            "R8G8B8A8_SINT": "MTLPixelFormatRGBA8Sint",
45            "R8G8B8A8_UNORM": "MTLPixelFormatRGBA8Unorm",
46            "R8G8B8A8_SNORM": "MTLPixelFormatRGBA8Snorm",
47            "R8G8B8A8_UNORM_SRGB": "MTLPixelFormatRGBA8Unorm_sRGB",
48            "B8G8R8A8_UNORM": "MTLPixelFormatBGRA8Unorm",
49            "B8G8R8A8_UNORM_SRGB": "MTLPixelFormatBGRA8Unorm_sRGB",
50            "R16_UNORM": "MTLPixelFormatR16Unorm",
51            "R16_SNORM": "MTLPixelFormatR16Snorm",
52            "R16_UINT": "MTLPixelFormatR16Uint",
53            "R16_SINT": "MTLPixelFormatR16Sint",
54            "R16_FLOAT": "MTLPixelFormatR16Float",
55            "R16G16_UNORM": "MTLPixelFormatRG16Unorm",
56            "R16G16_SNORM": "MTLPixelFormatRG16Snorm",
57            "R16G16_UINT": "MTLPixelFormatRG16Uint",
58            "R16G16_SINT": "MTLPixelFormatRG16Sint",
59            "R16G16_FLOAT": "MTLPixelFormatRG16Float",
60            "R16G16B16A16_UNORM": "MTLPixelFormatRGBA16Unorm",
61            "R16G16B16A16_SNORM": "MTLPixelFormatRGBA16Snorm",
62            "R16G16B16A16_UINT": "MTLPixelFormatRGBA16Uint",
63            "R16G16B16A16_SINT": "MTLPixelFormatRGBA16Sint",
64            "R16G16B16A16_FLOAT": "MTLPixelFormatRGBA16Float",
65            "R32_UINT": "MTLPixelFormatR32Uint",
66            "R32_SINT": "MTLPixelFormatR32Sint",
67            "R32_FLOAT": "MTLPixelFormatR32Float",
68            "R32G32_UINT": "MTLPixelFormatRG32Uint",
69            "R32G32_SINT": "MTLPixelFormatRG32Sint",
70            "R32G32_FLOAT": "MTLPixelFormatRG32Float",
71            "R32G32B32A32_UINT": "MTLPixelFormatRGBA32Uint",
72            "R32G32B32A32_SINT": "MTLPixelFormatRGBA32Sint",
73            "R32G32B32A32_FLOAT": "MTLPixelFormatRGBA32Float",
74            "D32_FLOAT": "MTLPixelFormatDepth32Float",
75            "S8_UINT": "MTLPixelFormatStencil8",
76            "D32_FLOAT_S8X24_UINT": "MTLPixelFormatDepth32Float_Stencil8",
77            "B10G10R10A2_UNORM": "MTLPixelFormatBGR10A2Unorm",
78            "R10G10B10A2_UINT": "MTLPixelFormatRGB10A2Uint",
79            "R10G10B10A2_UNORM": "MTLPixelFormatRGB10A2Unorm",
80            "R11G11B10_FLOAT": "MTLPixelFormatRG11B10Float",
81            "R9G9B9E5_SHAREDEXP": "MTLPixelFormatRGB9E5Float"
82        },
83        "map_ios": {
84            "R5G6B5_UNORM": "MTLPixelFormatB5G6R5Unorm",
85            "R5G5B5A1_UNORM": "MTLPixelFormatA1BGR5Unorm",
86            "R4G4B4A4_UNORM": "MTLPixelFormatABGR4Unorm",
87            "PVRTC1_RGB_4BPP_UNORM_BLOCK": "MTLPixelFormatPVRTC_RGB_4BPP",
88            "PVRTC1_RGB_2BPP_UNORM_BLOCK": "MTLPixelFormatPVRTC_RGB_2BPP",
89            "PVRTC1_RGBA_4BPP_UNORM_BLOCK": "MTLPixelFormatPVRTC_RGBA_4BPP",
90            "PVRTC1_RGBA_2BPP_UNORM_BLOCK": "MTLPixelFormatPVRTC_RGBA_2BPP",
91            "PVRTC1_RGB_2BPP_UNORM_SRGB_BLOCK": "MTLPixelFormatPVRTC_RGB_2BPP_sRGB",
92            "PVRTC1_RGB_4BPP_UNORM_SRGB_BLOCK": "MTLPixelFormatPVRTC_RGB_4BPP_sRGB",
93            "PVRTC1_RGBA_2BPP_UNORM_SRGB_BLOCK": "MTLPixelFormatPVRTC_RGBA_2BPP_sRGB",
94            "PVRTC1_RGBA_4BPP_UNORM_SRGB_BLOCK": "MTLPixelFormatPVRTC_RGBA_4BPP_sRGB",
95            "ETC2_R8G8B8_UNORM_BLOCK": "MTLPixelFormatETC2_RGB8",
96            "ETC2_R8G8B8_SRGB_BLOCK": "MTLPixelFormatETC2_RGB8_sRGB",
97            "ETC2_R8G8B8A1_UNORM_BLOCK": "MTLPixelFormatETC2_RGB8A1",
98            "ETC2_R8G8B8A1_SRGB_BLOCK": "MTLPixelFormatETC2_RGB8A1_sRGB",
99            "ETC2_R8G8B8A8_UNORM_BLOCK": "MTLPixelFormatEAC_RGBA8",
100            "ETC2_R8G8B8A8_SRGB_BLOCK": "MTLPixelFormatEAC_RGBA8_sRGB",
101            "EAC_R11_UNORM_BLOCK": "MTLPixelFormatEAC_R11Unorm",
102            "EAC_R11_SNORM_BLOCK": "MTLPixelFormatEAC_R11Snorm",
103            "EAC_R11G11_UNORM_BLOCK": "MTLPixelFormatEAC_RG11Unorm",
104            "EAC_R11G11_SNORM_BLOCK": "MTLPixelFormatEAC_RG11Snorm",
105            "ASTC_4x4_UNORM_BLOCK": "MTLPixelFormatASTC_4x4_LDR",
106            "ASTC_4x4_SRGB_BLOCK": "MTLPixelFormatASTC_4x4_sRGB",
107            "ASTC_5x4_UNORM_BLOCK": "MTLPixelFormatASTC_5x4_LDR",
108            "ASTC_5x4_SRGB_BLOCK": "MTLPixelFormatASTC_5x4_sRGB",
109            "ASTC_5x5_UNORM_BLOCK": "MTLPixelFormatASTC_5x5_LDR",
110            "ASTC_5x5_SRGB_BLOCK": "MTLPixelFormatASTC_5x5_sRGB",
111            "ASTC_6x5_UNORM_BLOCK": "MTLPixelFormatASTC_6x5_LDR",
112            "ASTC_6x5_SRGB_BLOCK": "MTLPixelFormatASTC_6x5_sRGB",
113            "ASTC_6x6_UNORM_BLOCK": "MTLPixelFormatASTC_6x6_LDR",
114            "ASTC_6x6_SRGB_BLOCK": "MTLPixelFormatASTC_6x6_sRGB",
115            "ASTC_8x5_UNORM_BLOCK": "MTLPixelFormatASTC_8x5_LDR",
116            "ASTC_8x5_SRGB_BLOCK": "MTLPixelFormatASTC_8x5_sRGB",
117            "ASTC_8x6_UNORM_BLOCK": "MTLPixelFormatASTC_8x6_LDR",
118            "ASTC_8x6_SRGB_BLOCK": "MTLPixelFormatASTC_8x6_sRGB",
119            "ASTC_8x8_UNORM_BLOCK": "MTLPixelFormatASTC_8x8_LDR",
120            "ASTC_8x8_SRGB_BLOCK": "MTLPixelFormatASTC_8x8_sRGB",
121            "ASTC_10x5_UNORM_BLOCK": "MTLPixelFormatASTC_10x5_LDR",
122            "ASTC_10x5_SRGB_BLOCK": "MTLPixelFormatASTC_10x5_sRGB",
123            "ASTC_10x6_UNORM_BLOCK": "MTLPixelFormatASTC_10x6_LDR",
124            "ASTC_10x6_SRGB_BLOCK": "MTLPixelFormatASTC_10x6_sRGB",
125            "ASTC_10x8_UNORM_BLOCK": "MTLPixelFormatASTC_10x8_LDR",
126            "ASTC_10x8_SRGB_BLOCK": "MTLPixelFormatASTC_10x8_sRGB",
127            "ASTC_10x10_UNORM_BLOCK": "MTLPixelFormatASTC_10x10_LDR",
128            "ASTC_10x10_SRGB_BLOCK": "MTLPixelFormatASTC_10x10_sRGB",
129            "ASTC_12x10_UNORM_BLOCK": "MTLPixelFormatASTC_12x10_LDR",
130            "ASTC_12x10_SRGB_BLOCK": "MTLPixelFormatASTC_12x10_sRGB",
131            "ASTC_12x12_UNORM_BLOCK": "MTLPixelFormatASTC_12x12_LDR",
132            "ASTC_12x12_SRGB_BLOCK": "MTLPixelFormatASTC_12x12_sRGB"
133        },
134        "map_mac": {
135            "D16_UNORM": "MTLPixelFormatDepth16Unorm",
136            "D24_UNORM_S8_UINT": "MTLPixelFormatDepth24Unorm_Stencil8",
137            "BC1_RGBA_UNORM_BLOCK": "MTLPixelFormatBC1_RGBA",
138            "BC1_RGBA_UNORM_SRGB_BLOCK": "MTLPixelFormatBC1_RGBA_sRGB",
139            "BC2_RGBA_UNORM_BLOCK": "MTLPixelFormatBC2_RGBA",
140            "BC2_RGBA_UNORM_SRGB_BLOCK": "MTLPixelFormatBC2_RGBA_sRGB",
141            "BC3_RGBA_UNORM_BLOCK": "MTLPixelFormatBC3_RGBA",
142            "BC3_RGBA_UNORM_SRGB_BLOCK": "MTLPixelFormatBC3_RGBA_sRGB",
143            "BC4_RED_UNORM_BLOCK": "MTLPixelFormatBC4_RUnorm",
144            "BC4_RED_SNORM_BLOCK": "MTLPixelFormatBC4_RSnorm",
145            "BC5_RG_UNORM_BLOCK": "MTLPixelFormatBC5_RGUnorm",
146            "BC5_RG_SNORM_BLOCK": "MTLPixelFormatBC5_RGSnorm",
147            "BPTC_RGB_UNSIGNED_FLOAT_BLOCK": "MTLPixelFormatBC6H_RGBUfloat",
148            "BPTC_RGB_SIGNED_FLOAT_BLOCK": "MTLPixelFormatBC6H_RGBFloat",
149            "BPTC_RGBA_UNORM_BLOCK": "MTLPixelFormatBC7_RGBAUnorm",
150            "BPTC_SRGB_ALPHA_UNORM_BLOCK": "MTLPixelFormatBC7_RGBAUnorm_sRGB"
151        },
152        "override": {
153            "L8_UNORM": "R8G8B8A8_UNORM",
154            "L8A8_UNORM": "R8G8B8A8_UNORM",
155            "R8G8B8_UNORM": "R8G8B8A8_UNORM",
156            "R8G8B8_SNORM": "R8G8B8A8_SNORM",
157            "R8G8B8_UINT": "R8G8B8A8_UINT",
158            "R8G8B8_SINT": "R8G8B8A8_SINT",
159            "R8G8B8_UNORM_SRGB": "R8G8B8A8_UNORM_SRGB",
160            "R32G32B32_FLOAT": "R32G32B32A32_FLOAT",
161            "R32G32B32_UINT": "R32G32B32A32_UINT",
162            "R32G32B32_SINT": "R32G32B32A32_SINT",
163            "R16G16B16_FLOAT": "R16G16B16A16_FLOAT",
164            "R16G16B16_UINT": "R16G16B16A16_UINT",
165            "R16G16B16_SINT": "R16G16B16A16_SINT",
166            "R16G16B16_UNORM": "R16G16B16A16_UNORM",
167            "R16G16B16_SNORM": "R16G16B16A16_SNORM",
168            "A16_FLOAT": "R16G16B16A16_FLOAT",
169            "L16_FLOAT": "R16G16B16A16_FLOAT",
170            "L16A16_FLOAT": "R16G16B16A16_FLOAT",
171            "A32_FLOAT": "R32G32B32A32_FLOAT",
172            "L32_FLOAT": "R32G32B32A32_FLOAT",
173            "L32A32_FLOAT": "R32G32B32A32_FLOAT",
174            "D24_UNORM_X8_UINT": "D32_FLOAT",
175            "D32_UNORM": "D32_FLOAT"
176        },
177        "override_ios": {
178            "D24_UNORM_S8_UINT": "D32_FLOAT_S8X24_UINT",
179            "D16_UNORM": "D32_FLOAT",
180            "ETC1_R8G8B8_UNORM_BLOCK": "ETC2_R8G8B8_UNORM_BLOCK"
181        },
182        "override_mac": {
183            "R5G6B5_UNORM": "R8G8B8A8_UNORM",
184            "R5G5B5A1_UNORM": "R8G8B8A8_UNORM",
185            "R4G4B4A4_UNORM": "R8G8B8A8_UNORM",
186            "BC1_RGB_UNORM_BLOCK": {
187                "default": "BC1_RGBA_UNORM_BLOCK",
188                "swizzle": ["RGB1", "BC1_RGBA_UNORM_BLOCK"]
189            },
190            "BC1_RGB_UNORM_SRGB_BLOCK": {
191                "default": "BC1_RGBA_UNORM_SRGB_BLOCK",
192                "swizzle": ["RGB1", "BC1_RGBA_UNORM_SRGB_BLOCK"]
193            },
194            "ETC1_R8G8B8_UNORM_BLOCK": "R8G8B8A8_UNORM",
195            "ETC2_R8G8B8_UNORM_BLOCK": "R8G8B8A8_UNORM",
196            "ETC2_R8G8B8_SRGB_BLOCK": "R8G8B8A8_UNORM_SRGB",
197            "ETC2_R8G8B8A1_UNORM_BLOCK": "R8G8B8A8_UNORM",
198            "ETC2_R8G8B8A1_SRGB_BLOCK": "R8G8B8A8_UNORM_SRGB",
199            "ETC2_R8G8B8A8_UNORM_BLOCK": "R8G8B8A8_UNORM",
200            "ETC2_R8G8B8A8_SRGB_BLOCK": "R8G8B8A8_UNORM_SRGB",
201            "EAC_R11_UNORM_BLOCK": "R16_UNORM",
202            "EAC_R11_SNORM_BLOCK": "R16_SNORM",
203            "EAC_R11G11_UNORM_BLOCK": "R16G16_UNORM",
204            "EAC_R11G11_SNORM_BLOCK": "R16G16_SNORM"
205        },
206        "d24s8_fallbacks_mac": {
207            "D24_UNORM_S8_UINT": "D32_FLOAT_S8X24_UINT"
208        },
209        "caps": {
210            "MTLPixelFormatA8Unorm":{
211                "filterable": "true",
212                "writable": "false",
213                "blendable": "false",
214                "multisample": "false",
215                "resolve": "false",
216                "colorRenderable": "false"
217            },
218            "MTLPixelFormatR8Unorm":{
219                "filterable": "true",
220                "writable": "true",
221                "blendable": "true",
222                "multisample": "true",
223                "resolve": "true",
224                "colorRenderable": "true"
225            },
226            "MTLPixelFormatR8Snorm":{
227                "filterable": "true",
228                "writable": "true",
229                "blendable": "true",
230                "multisample": "true",
231                "resolve": "display->supportsEitherGPUFamily(2, 1)",
232                "colorRenderable": "true"
233            },
234            "MTLPixelFormatR16Unorm":{
235                "filterable": "true",
236                "writable": "true",
237                "blendable": "true",
238                "multisample": "true",
239                "resolve": "display->supportsMacGPUFamily(1)",
240                "colorRenderable": "true"
241            },
242            "MTLPixelFormatR16Snorm":{
243                "filterable": "true",
244                "writable": "true",
245                "blendable": "true",
246                "multisample": "true",
247                "resolve": "display->supportsMacGPUFamily(1)",
248                "colorRenderable": "true"
249            },
250            "MTLPixelFormatRG8Unorm":{
251                "filterable": "true",
252                "writable": "true",
253                "blendable": "true",
254                "multisample": "true",
255                "resolve": "true",
256                "colorRenderable": "true"
257            },
258            "MTLPixelFormatRG8Snorm":{
259                "filterable": "true",
260                "writable": "true",
261                "blendable": "true",
262                "multisample": "true",
263                "resolve": "display->supportsEitherGPUFamily(2, 1)",
264                "colorRenderable": "true"
265            },
266            "MTLPixelFormatRG16Unorm":{
267                "filterable": "true",
268                "writable": "true",
269                "blendable": "true",
270                "multisample": "true",
271                "resolve": "display->supportsMacGPUFamily(1)",
272                "colorRenderable": "true"
273            },
274            "MTLPixelFormatRG16Snorm":{
275                "filterable": "true",
276                "writable": "true",
277                "blendable": "true",
278                "multisample": "true",
279                "resolve": "display->supportsMacGPUFamily(1)",
280                "colorRenderable": "true"
281            },
282            "MTLPixelFormatRGBA16Unorm":{
283                "filterable": "true",
284                "writable": "true",
285                "blendable": "true",
286                "multisample": "true",
287                "resolve": "display->supportsMacGPUFamily(1)",
288                "colorRenderable": "true"
289            },
290            "MTLPixelFormatRGBA16Snorm":{
291                "filterable": "true",
292                "writable": "true",
293                "blendable": "true",
294                "multisample": "true",
295                "resolve": "display->supportsMacGPUFamily(1)",
296                "colorRenderable": "true"
297            },
298            "MTLPixelFormatRGBA16Float":{
299                "filterable": "true",
300                "writable": "true",
301                "blendable": "true",
302                "multisample": "true",
303                "resolve": "true",
304                "colorRenderable": "true"
305            },
306            "MTLPixelFormatRGBA8Unorm":{
307                "filterable": "true",
308                "writable": "true",
309                "blendable": "true",
310                "multisample": "true",
311                "resolve": "true",
312                "colorRenderable": "true"
313            },
314            "MTLPixelFormatRGBA8Unorm_sRGB":{
315                "filterable": "true",
316                "writable": "display->supportsIOSGPUFamily(2)",
317                "blendable": "true",
318                "multisample": "true",
319                "resolve": "true",
320                "colorRenderable": "true"
321            },
322            "MTLPixelFormatRGBA8Snorm":{
323                "filterable": "true",
324                "writable": "true",
325                "blendable": "true",
326                "multisample": "true",
327                "resolve": "display->supportsEitherGPUFamily(2, 1)",
328                "colorRenderable": "true"
329            },
330            "MTLPixelFormatBGRA8Unorm":{
331                "filterable": "true",
332                "writable": "true",
333                "blendable": "true",
334                "multisample": "true",
335                "resolve": "true",
336                "colorRenderable": "true"
337            },
338            "MTLPixelFormatBGRA8Unorm_sRGB":{
339                "filterable": "true",
340                "writable": "display->supportsIOSGPUFamily(2)",
341                "blendable": "true",
342                "multisample": "true",
343                "resolve": "true",
344                "colorRenderable": "true"
345            },
346            "MTLPixelFormatR16Float":{
347                "filterable": "true",
348                "writable": "true",
349                "blendable": "true",
350                "multisample": "true",
351                "resolve": "true",
352                "colorRenderable": "true"
353            },
354            "MTLPixelFormatRG16Float":{
355                "filterable": "true",
356                "writable": "true",
357                "blendable": "true",
358                "multisample": "true",
359                "resolve": "true",
360                "colorRenderable": "true"
361            },
362            "MTLPixelFormatR32Float":{
363                "filterable": "display->supportsMacGPUFamily(1)",
364                "writable": "true",
365                "blendable": "true",
366                "multisample": "true",
367                "resolve": "display->supportsMacGPUFamily(1)",
368                "colorRenderable": "true"
369            },
370            "MTLPixelFormatBGR10A2Unorm":{
371                "filterable": "true",
372                "writable": "display->supportsEitherGPUFamily(3, 1)",
373                "blendable": "true",
374                "multisample": "true",
375                "resolve": "true",
376                "colorRenderable": "true"
377            },
378            "MTLPixelFormatRGB10A2Unorm":{
379                "filterable": "true",
380                "writable": "display->supportsEitherGPUFamily(3, 1)",
381                "blendable": "true",
382                "multisample": "true",
383                "resolve": "true",
384                "colorRenderable": "true"
385            },
386            "MTLPixelFormatRGB10A2Uint":{
387                "filterable": "false",
388                "writable": "display->supportsEitherGPUFamily(3, 1)",
389                "blendable": "false",
390                "multisample": "true",
391                "resolve": "false",
392                "colorRenderable": "true"
393            },
394            "MTLPixelFormatRG11B10Float":{
395                "filterable": "true",
396                "writable": "display->supportsEitherGPUFamily(3, 1)",
397                "blendable": "true",
398                "multisample": "true",
399                "resolve": "true",
400                "colorRenderable": "true"
401            },
402            "MTLPixelFormatRGB9E5Float":{
403                "filterable": "true",
404                "writable": "display->supportsIOSGPUFamily(3)",
405                "blendable": "display->supportsIOSGPUFamily(1)",
406                "multisample": "display->supportsIOSGPUFamily(1)",
407                "resolve": "display->supportsIOSGPUFamily(1)",
408                "colorRenderable": "display->supportsIOSGPUFamily(1)"
409            },
410            "MTLPixelFormatR8Uint":{
411                "filterable": "false",
412                "writable": "true",
413                "blendable": "false",
414                "multisample": "true",
415                "resolve": "false",
416                "colorRenderable": "true"
417            },
418            "MTLPixelFormatR8Sint":{
419                "filterable": "false",
420                "writable": "true",
421                "blendable": "false",
422                "multisample": "true",
423                "resolve": "false",
424                "colorRenderable": "true"
425            },
426            "MTLPixelFormatR16Uint":{
427                "filterable": "false",
428                "writable": "true",
429                "blendable": "false",
430                "multisample": "true",
431                "resolve": "false",
432                "colorRenderable": "true"
433            },
434            "MTLPixelFormatR16Sint":{
435                "filterable": "false",
436                "writable": "true",
437                "blendable": "false",
438                "multisample": "true",
439                "resolve": "false",
440                "colorRenderable": "true"
441            },
442            "MTLPixelFormatRG8Uint":{
443                "filterable": "false",
444                "writable": "true",
445                "blendable": "false",
446                "multisample": "true",
447                "resolve": "false",
448                "colorRenderable": "true"
449            },
450            "MTLPixelFormatRG8Sint":{
451                "filterable": "false",
452                "writable": "true",
453                "blendable": "false",
454                "multisample": "true",
455                "resolve": "false",
456                "colorRenderable": "true"
457            },
458            "MTLPixelFormatR32Uint":{
459                "filterable": "false",
460                "writable": "true",
461                "blendable": "false",
462                "multisample": "display->supportsMacGPUFamily(1)",
463                "resolve": "false",
464                "colorRenderable": "true"
465            },
466            "MTLPixelFormatR32Sint":{
467                "filterable": "false",
468                "writable": "true",
469                "blendable": "false",
470                "multisample": "display->supportsMacGPUFamily(1)",
471                "resolve": "false",
472                "colorRenderable": "true"
473            },
474            "MTLPixelFormatRG16Uint":{
475                "filterable": "false",
476                "writable": "true",
477                "blendable": "false",
478                "multisample": "true",
479                "resolve": "false",
480                "colorRenderable": "true"
481            },
482            "MTLPixelFormatRG16Sint":{
483                "filterable": "false",
484                "writable": "true",
485                "blendable": "false",
486                "multisample": "true",
487                "resolve": "false",
488                "colorRenderable": "true"
489            },
490            "MTLPixelFormatRGBA8Uint":{
491                "filterable": "false",
492                "writable": "true",
493                "blendable": "false",
494                "multisample": "true",
495                "resolve": "false",
496                "colorRenderable": "true"
497            },
498            "MTLPixelFormatRGBA8Sint":{
499                "filterable": "false",
500                "writable": "true",
501                "blendable": "false",
502                "multisample": "true",
503                "resolve": "false",
504                "colorRenderable": "true"
505            },
506            "MTLPixelFormatRG32Uint":{
507                "filterable": "false",
508                "writable": "true",
509                "blendable": "false",
510                "multisample": "display->supportsMacGPUFamily(1)",
511                "resolve": "false",
512                "colorRenderable": "true"
513            },
514            "MTLPixelFormatRG32Sint":{
515                "filterable": "false",
516                "writable": "true",
517                "blendable": "false",
518                "multisample": "display->supportsMacGPUFamily(1)",
519                "resolve": "false",
520                "colorRenderable": "true"
521            },
522            "MTLPixelFormatRGBA16Uint":{
523                "filterable": "false",
524                "writable": "true",
525                "blendable": "false",
526                "multisample": "true",
527                "resolve": "false",
528                "colorRenderable": "true"
529            },
530            "MTLPixelFormatRGBA16Sint":{
531                "filterable": "false",
532                "writable": "true",
533                "blendable": "false",
534                "multisample": "true",
535                "resolve": "false",
536                "colorRenderable": "true"
537            },
538            "MTLPixelFormatRGBA32Uint":{
539                "filterable": "false",
540                "writable": "true",
541                "blendable": "false",
542                "multisample": "display->supportsMacGPUFamily(1)",
543                "resolve": "false",
544                "colorRenderable": "true"
545            },
546            "MTLPixelFormatRGBA32Sint":{
547                "filterable": "false",
548                "writable": "true",
549                "blendable": "false",
550                "multisample": "display->supportsMacGPUFamily(1)",
551                "resolve": "false",
552                "colorRenderable": "true"
553            },
554            "MTLPixelFormatRG32Float":{
555                "filterable": "display->supportsMacGPUFamily(1)",
556                "writable": "true",
557                "blendable": "true",
558                "multisample": "display->supportsMacGPUFamily(1)",
559                "resolve": "display->supportsMacGPUFamily(1)",
560                "colorRenderable": "true"
561            },
562            "MTLPixelFormatRGBA32Float":{
563                "filterable": "display->supportsMacGPUFamily(1)",
564                "writable": "true",
565                "blendable": "display->supportsMacGPUFamily(1)",
566                "multisample": "display->supportsMacGPUFamily(1)",
567                "resolve": "display->supportsMacGPUFamily(1)",
568                "colorRenderable": "true"
569            },
570            "MTLPixelFormatDepth32Float":{
571                "filterable": "display->supportsMacGPUFamily(1)",
572                "writable": "false",
573                "blendable": "false",
574                "multisample": "true",
575                "resolve": "supportDepthAutoResolve",
576                "colorRenderable": "false",
577                "depthRenderable": "true"
578            },
579            "MTLPixelFormatStencil8":{
580                "filterable": "false",
581                "writable": "false",
582                "blendable": "false",
583                "multisample": "true",
584                "resolve": "false",
585                "colorRenderable": "false",
586                "depthRenderable": "true"
587            },
588            "MTLPixelFormatDepth32Float_Stencil8":{
589                "filterable": "display->supportsMacGPUFamily(1)",
590                "writable": "false",
591                "blendable": "false",
592                "multisample": "true",
593                "resolve": "supportDepthStencilAutoResolve",
594                "colorRenderable": "false",
595                "depthRenderable": "true"
596            }
597        },
598        "caps_mac": {
599            "MTLPixelFormatDepth16Unorm":{
600                "filterable": "true",
601                "writable": "false",
602                "blendable": "false",
603                "multisample": "true",
604                "resolve": "supportDepthAutoResolve",
605                "colorRenderable": "false",
606                "depthRenderable": "true"
607            },
608            "MTLPixelFormatDepth24Unorm_Stencil8":{
609                "filterable": "display->supportsMacGPUFamily(1)",
610                "writable": "false",
611                "blendable": "false",
612                "multisample": "true",
613                "resolve": "supportDepthStencilAutoResolve",
614                "colorRenderable": "false",
615                "depthRenderable": "display->supportsMacGPUFamily(1)"
616            },
617            "MTLPixelFormatBC1_RGBA":{
618                "filterable": "true"
619            },
620            "MTLPixelFormatBC1_RGBA_sRGB":{
621                "filterable": "true"
622            },
623            "MTLPixelFormatBC2_RGBA":{
624                "filterable": "true"
625            },
626            "MTLPixelFormatBC2_RGBA_sRGB":{
627                "filterable": "true"
628            },
629            "MTLPixelFormatBC3_RGBA":{
630                "filterable": "true"
631            },
632            "MTLPixelFormatBC3_RGBA_sRGB":{
633                "filterable": "true"
634            },
635            "MTLPixelFormatBC4_RUnorm":{
636                "filterable": "true"
637            },
638            "MTLPixelFormatBC4_RSnorm":{
639                "filterable": "true"
640            },
641            "MTLPixelFormatBC5_RGUnorm":{
642                "filterable": "true"
643            },
644            "MTLPixelFormatBC5_RGSnorm":{
645                "filterable": "true"
646            },
647            "MTLPixelFormatBC6H_RGBUfloat":{
648                "filterable": "true"
649            },
650            "MTLPixelFormatBC6H_RGBFloat":{
651                "filterable": "true"
652            },
653            "MTLPixelFormatBC7_RGBAUnorm":{
654                "filterable": "true"
655            },
656            "MTLPixelFormatBC7_RGBAUnorm_sRGB":{
657                "filterable": "true"
658            }
659        },
660        "caps_ios": {
661            "MTLPixelFormatB5G6R5Unorm":{
662                "filterable": "true",
663                "writable": "false",
664                "blendable": "true",
665                "multisample": "true",
666                "resolve": "true",
667                "colorRenderable": "true"
668            },
669            "MTLPixelFormatABGR4Unorm":{
670                "filterable": "true",
671                "writable": "false",
672                "blendable": "true",
673                "multisample": "true",
674                "resolve": "true",
675                "colorRenderable": "true"
676            },
677            "MTLPixelFormatBGR5A1Unorm":{
678                "filterable": "true",
679                "writable": "false",
680                "blendable": "true",
681                "multisample": "true",
682                "resolve": "true",
683                "colorRenderable": "true"
684            },
685            "MTLPixelFormatA1BGR5Unorm":{
686                "filterable": "true",
687                "writable": "false",
688                "blendable": "true",
689                "multisample": "true",
690                "resolve": "true",
691                "colorRenderable": "true"
692            },
693            "MTLPixelFormatPVRTC_RGB_4BPP":{
694                "filterable": "true"
695            },
696            "MTLPixelFormatPVRTC_RGB_2BPP":{
697                "filterable": "true"
698            },
699            "MTLPixelFormatPVRTC_RGBA_4BPP":{
700                "filterable": "true"
701            },
702            "MTLPixelFormatPVRTC_RGBA_2BPP":{
703                "filterable": "true"
704            },
705            "MTLPixelFormatPVRTC_RGB_2BPP_sRGB":{
706                "filterable": "true"
707            },
708            "MTLPixelFormatPVRTC_RGB_4BPP_sRGB":{
709                "filterable": "true"
710            },
711            "MTLPixelFormatPVRTC_RGBA_2BPP_sRGB":{
712                "filterable": "true"
713            },
714            "MTLPixelFormatPVRTC_RGBA_4BPP_sRGB":{
715                "filterable": "true"
716            },
717            "MTLPixelFormatETC2_RGB8":{
718                "filterable": "true"
719            },
720            "MTLPixelFormatETC2_RGB8_sRGB":{
721                "filterable": "true"
722            },
723            "MTLPixelFormatETC2_RGB8A1":{
724                "filterable": "true"
725            },
726            "MTLPixelFormatETC2_RGB8A1_sRGB":{
727                "filterable": "true"
728            },
729            "MTLPixelFormatEAC_RGBA8":{
730                "filterable": "true"
731            },
732            "MTLPixelFormatEAC_RGBA8_sRGB":{
733                "filterable": "true"
734            },
735            "MTLPixelFormatEAC_R11Unorm":{
736                "filterable": "true"
737            },
738            "MTLPixelFormatEAC_R11Snorm":{
739                "filterable": "true"
740            },
741            "MTLPixelFormatEAC_RG11Unorm":{
742                "filterable": "true"
743            },
744            "MTLPixelFormatEAC_RG11Snorm":{
745                "filterable": "true"
746            },
747            "MTLPixelFormatASTC_4x4_LDR":{
748                "filterable": "display->supportsIOSGPUFamily(2)"
749            },
750            "MTLPixelFormatASTC_4x4_sRGB":{
751                "filterable": "display->supportsIOSGPUFamily(2)"
752            },
753            "MTLPixelFormatASTC_5x4_LDR":{
754                "filterable": "display->supportsIOSGPUFamily(2)"
755            },
756            "MTLPixelFormatASTC_5x4_sRGB":{
757                "filterable": "display->supportsIOSGPUFamily(2)"
758            },
759            "MTLPixelFormatASTC_5x5_LDR":{
760                "filterable": "display->supportsIOSGPUFamily(2)"
761            },
762            "MTLPixelFormatASTC_5x5_sRGB":{
763                "filterable": "display->supportsIOSGPUFamily(2)"
764            },
765            "MTLPixelFormatASTC_6x5_LDR":{
766                "filterable": "display->supportsIOSGPUFamily(2)"
767            },
768            "MTLPixelFormatASTC_6x5_sRGB":{
769                "filterable": "display->supportsIOSGPUFamily(2)"
770            },
771            "MTLPixelFormatASTC_6x6_LDR":{
772                "filterable": "display->supportsIOSGPUFamily(2)"
773            },
774            "MTLPixelFormatASTC_6x6_sRGB":{
775                "filterable": "display->supportsIOSGPUFamily(2)"
776            },
777            "MTLPixelFormatASTC_8x5_LDR":{
778                "filterable": "display->supportsIOSGPUFamily(2)"
779            },
780            "MTLPixelFormatASTC_8x5_sRGB":{
781                "filterable": "display->supportsIOSGPUFamily(2)"
782            },
783            "MTLPixelFormatASTC_8x6_LDR":{
784                "filterable": "display->supportsIOSGPUFamily(2)"
785            },
786            "MTLPixelFormatASTC_8x6_sRGB":{
787                "filterable": "display->supportsIOSGPUFamily(2)"
788            },
789            "MTLPixelFormatASTC_8x8_LDR":{
790                "filterable": "display->supportsIOSGPUFamily(2)"
791            },
792            "MTLPixelFormatASTC_8x8_sRGB":{
793                "filterable": "display->supportsIOSGPUFamily(2)"
794            },
795            "MTLPixelFormatASTC_10x5_LDR":{
796                "filterable": "display->supportsIOSGPUFamily(2)"
797            },
798            "MTLPixelFormatASTC_10x5_sRGB":{
799                "filterable": "display->supportsIOSGPUFamily(2)"
800            },
801            "MTLPixelFormatASTC_10x6_LDR":{
802                "filterable": "display->supportsIOSGPUFamily(2)"
803            },
804            "MTLPixelFormatASTC_10x6_sRGB":{
805                "filterable": "display->supportsIOSGPUFamily(2)"
806            },
807            "MTLPixelFormatASTC_10x8_LDR":{
808                "filterable": "display->supportsIOSGPUFamily(2)"
809            },
810            "MTLPixelFormatASTC_10x8_sRGB":{
811                "filterable": "display->supportsIOSGPUFamily(2)"
812            },
813            "MTLPixelFormatASTC_10x10_LDR":{
814                "filterable": "display->supportsIOSGPUFamily(2)"
815            },
816            "MTLPixelFormatASTC_10x10_sRGB":{
817                "filterable": "display->supportsIOSGPUFamily(2)"
818            },
819            "MTLPixelFormatASTC_12x10_LDR":{
820                "filterable": "display->supportsIOSGPUFamily(2)"
821            },
822            "MTLPixelFormatASTC_12x10_sRGB":{
823                "filterable": "display->supportsIOSGPUFamily(2)"
824            },
825            "MTLPixelFormatASTC_12x12_LDR":{
826                "filterable": "display->supportsIOSGPUFamily(2)"
827            },
828            "MTLPixelFormatASTC_12x12_sRGB":{
829                "filterable": "display->supportsIOSGPUFamily(2)"
830            }
831        }
832    },
833    "vertex": {
834        "description": [
835            "- This section contains vertex format mapping between OpenGL and Metal similar to",
836            "image formats above",
837            "- override_tightly_packed is special emulation for those formats whose sizes",
838            "are not multiples of 4 bytes. They will be converted to appropriate 4 bytes aligned",
839            "formats.",
840            "This emulation is useful for the cases in which the stride of a vertex attribute",
841            "is required to be multiples of 4."
842        ],
843        "map": {
844            "NONE": "MTLVertexFormatInvalid",
845            "R8_UNORM": "MTLVertexFormatUCharNormalized",
846            "R8_SNORM": "MTLVertexFormatCharNormalized",
847            "R8_UINT": "MTLVertexFormatUChar",
848            "R8_SINT": "MTLVertexFormatChar",
849            "R8_USCALED": "MTLVertexFormatUChar",
850            "R8_SSCALED": "MTLVertexFormatChar",
851            "R8G8_UNORM": "MTLVertexFormatUChar2Normalized",
852            "R8G8_SNORM": "MTLVertexFormatChar2Normalized",
853            "R8G8_UINT": "MTLVertexFormatUChar2",
854            "R8G8_SINT": "MTLVertexFormatChar2",
855            "R8G8_USCALED": "MTLVertexFormatUChar2",
856            "R8G8_SSCALED": "MTLVertexFormatChar2",
857            "R8G8B8_UNORM": "MTLVertexFormatUChar3Normalized",
858            "R8G8B8_SNORM": "MTLVertexFormatChar3Normalized",
859            "R8G8B8_UINT": "MTLVertexFormatUChar3",
860            "R8G8B8_SINT": "MTLVertexFormatChar3",
861            "R8G8B8_USCALED": "MTLVertexFormatUChar3",
862            "R8G8B8_SSCALED": "MTLVertexFormatChar3",
863            "R8G8B8A8_UNORM": "MTLVertexFormatUChar4Normalized",
864            "R8G8B8A8_SNORM": "MTLVertexFormatChar4Normalized",
865            "R8G8B8A8_UINT": "MTLVertexFormatUChar4",
866            "R8G8B8A8_SINT": "MTLVertexFormatChar4",
867            "R8G8B8A8_USCALED": "MTLVertexFormatUChar4",
868            "R8G8B8A8_SSCALED": "MTLVertexFormatChar4",
869
870            "R16_UNORM": "MTLVertexFormatUShortNormalized",
871            "R16_SNORM": "MTLVertexFormatShortNormalized",
872            "R16_UINT": "MTLVertexFormatUShort",
873            "R16_SINT": "MTLVertexFormatShort",
874            "R16_USCALED": "MTLVertexFormatUShort",
875            "R16_SSCALED": "MTLVertexFormatShort",
876            "R16G16_UNORM": "MTLVertexFormatUShort2Normalized",
877            "R16G16_SNORM": "MTLVertexFormatShort2Normalized",
878            "R16G16_UINT": "MTLVertexFormatUShort2",
879            "R16G16_SINT": "MTLVertexFormatShort2",
880            "R16G16_USCALED": "MTLVertexFormatUShort2",
881            "R16G16_SSCALED": "MTLVertexFormatShort2",
882            "R16G16B16_UNORM": "MTLVertexFormatUShort3Normalized",
883            "R16G16B16_SNORM": "MTLVertexFormatShort3Normalized",
884            "R16G16B16_UINT": "MTLVertexFormatUShort3",
885            "R16G16B16_SINT": "MTLVertexFormatShort3",
886            "R16G16B16_USCALED": "MTLVertexFormatUShort3",
887            "R16G16B16_SSCALED": "MTLVertexFormatShort3",
888            "R16G16B16A16_UNORM": "MTLVertexFormatUShort4Normalized",
889            "R16G16B16A16_SNORM": "MTLVertexFormatShort4Normalized",
890            "R16G16B16A16_UINT": "MTLVertexFormatUShort4",
891            "R16G16B16A16_SINT": "MTLVertexFormatShort4",
892            "R16G16B16A16_USCALED": "MTLVertexFormatUShort4",
893            "R16G16B16A16_SSCALED": "MTLVertexFormatShort4",
894
895            "R32_UINT": "MTLVertexFormatUInt",
896            "R32_SINT": "MTLVertexFormatInt",
897            "R32G32_UINT": "MTLVertexFormatUInt2",
898            "R32G32_SINT": "MTLVertexFormatInt2",
899            "R32G32B32_UINT": "MTLVertexFormatUInt3",
900            "R32G32B32_SINT": "MTLVertexFormatInt3",
901            "R32G32B32A32_UINT": "MTLVertexFormatUInt4",
902            "R32G32B32A32_SINT": "MTLVertexFormatInt4",
903
904            "R16_FLOAT": "MTLVertexFormatHalf",
905            "R16G16_FLOAT": "MTLVertexFormatHalf2",
906            "R16G16B16_FLOAT": "MTLVertexFormatHalf3",
907            "R16G16B16A16_FLOAT": "MTLVertexFormatHalf4",
908
909            "R32_FLOAT": "MTLVertexFormatFloat",
910            "R32G32_FLOAT": "MTLVertexFormatFloat2",
911            "R32G32B32_FLOAT": "MTLVertexFormatFloat3",
912            "R32G32B32A32_FLOAT": "MTLVertexFormatFloat4",
913
914            "R10G10B10A2_SNORM" : "MTLVertexFormatInt1010102Normalized",
915            "R10G10B10A2_UNORM" : "MTLVertexFormatUInt1010102Normalized"
916        },
917        "override": {
918            "R32_FIXED": "R32_FLOAT",
919            "R32_UNORM": "R32_FLOAT",
920            "R32_SNORM": "R32_FLOAT",
921            "R32_USCALED": "R32_FLOAT",
922            "R32_SSCALED": "R32_FLOAT",
923            "R32G32_FIXED": "R32G32_FLOAT",
924            "R32G32_UNORM": "R32G32_FLOAT",
925            "R32G32_SNORM": "R32G32_FLOAT",
926            "R32G32_USCALED": "R32G32_FLOAT",
927            "R32G32_SSCALED": "R32G32_FLOAT",
928            "R32G32B32_FIXED": "R32G32B32_FLOAT",
929            "R32G32B32_UNORM": "R32G32B32_FLOAT",
930            "R32G32B32_SNORM": "R32G32B32_FLOAT",
931            "R32G32B32_USCALED": "R32G32B32_FLOAT",
932            "R32G32B32_SSCALED": "R32G32B32_FLOAT",
933            "R32G32B32A32_FIXED": "R32G32B32A32_FLOAT",
934            "R32G32B32A32_UNORM": "R32G32B32A32_FLOAT",
935            "R32G32B32A32_SNORM": "R32G32B32A32_FLOAT",
936            "R32G32B32A32_USCALED": "R32G32B32A32_FLOAT",
937            "R32G32B32A32_SSCALED": "R32G32B32A32_FLOAT",
938            "R10G10B10A2_SINT": "R32G32B32A32_FLOAT",
939            "R10G10B10A2_SSCALED": "R32G32B32A32_FLOAT",
940            "R10G10B10A2_UINT": "R32G32B32A32_FLOAT",
941            "R10G10B10A2_USCALED": "R32G32B32A32_FLOAT"
942        },
943        "override_tightly_packed": {
944            "R16_FLOAT": "R16G16_FLOAT",
945            "R16_UNORM": "R16G16_UNORM",
946            "R16_SNORM": "R16G16_SNORM",
947            "R16_UINT": "R16G16_UINT",
948            "R16_SINT": "R16G16_SINT",
949            "R16_USCALED": "R16G16_UINT",
950            "R16_SSCALED": "R16G16_SINT",
951            "R16G16B16_FLOAT": "R16G16B16A16_FLOAT",
952            "R16G16B16_UNORM": "R16G16B16A16_UNORM",
953            "R16G16B16_SNORM": "R16G16B16A16_SNORM",
954            "R16G16B16_UINT": "R16G16B16A16_UINT",
955            "R16G16B16_SINT": "R16G16B16A16_SINT",
956            "R16G16B16_USCALED": "R16G16B16A16_UINT",
957            "R16G16B16_SSCALED": "R16G16B16A16_SINT",
958            "R8_UNORM": "R8G8B8A8_UNORM",
959            "R8_SNORM": "R8G8B8A8_SNORM",
960            "R8_UINT": "R8G8B8A8_UINT",
961            "R8_SINT": "R8G8B8A8_SINT",
962            "R8_USCALED": "R8G8B8A8_UINT",
963            "R8_SSCALED": "R8G8B8A8_SINT",
964            "R8G8_UNORM": "R8G8B8A8_UNORM",
965            "R8G8_SNORM": "R8G8B8A8_SNORM",
966            "R8G8_UINT": "R8G8B8A8_UINT",
967            "R8G8_SINT": "R8G8B8A8_SINT",
968            "R8G8_USCALED": "R8G8B8A8_UINT",
969            "R8G8_SSCALED": "R8G8B8A8_SINT",
970            "R8G8B8_UNORM": "R8G8B8A8_UNORM",
971            "R8G8B8_SNORM": "R8G8B8A8_SNORM",
972            "R8G8B8_UINT": "R8G8B8A8_UINT",
973            "R8G8B8_SINT": "R8G8B8A8_SINT",
974            "R8G8B8_USCALED": "R8G8B8A8_UINT",
975            "R8G8B8_SSCALED": "R8G8B8A8_SINT"
976        }
977    }
978}