• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /*
3  * Mesa 3-D graphics library
4  *
5  * Copyright (c) 2014 Intel Corporation
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a
8  * copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation
10  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11  * and/or sell copies of the Software, and to permit persons to whom the
12  * Software is furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included
15  * in all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23  * OTHER DEALINGS IN THE SOFTWARE.
24  */
25 
26  /*
27   * This file is AUTOGENERATED by format_info.py.  Do not edit it
28   * manually or commit it into version control.
29   */
30 
31 static const struct gl_format_info format_info[MESA_FORMAT_COUNT] =
32 {
33 
34    {
35       .Name = MESA_FORMAT_NONE,
36       .StrName = "MESA_FORMAT_NONE",
37       .Layout = MESA_FORMAT_LAYOUT_OTHER,
38       .BaseFormat = GL_NONE,
39       .DataType = GL_NONE,
40       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
41       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
42       .IsSRGBFormat = 0,
43       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
44       .BytesPerBlock = 1,
45       .Swizzle = { 4, 4, 4, 5 },
46       .ArrayFormat = 0,
47    },
48    {
49       .Name = MESA_FORMAT_A8B8G8R8_UNORM,
50       .StrName = "MESA_FORMAT_A8B8G8R8_UNORM",
51       .Layout = MESA_FORMAT_LAYOUT_PACKED,
52       .BaseFormat = GL_RGBA,
53       .DataType = GL_UNSIGNED_NORMALIZED,
54       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
55       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
56       .IsSRGBFormat = 0,
57       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
58       .BytesPerBlock = 4,
59       .Swizzle = { 3, 2, 1, 0 },
60       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 3, 2, 1, 0),
61    },
62    {
63       .Name = MESA_FORMAT_X8B8G8R8_UNORM,
64       .StrName = "MESA_FORMAT_X8B8G8R8_UNORM",
65       .Layout = MESA_FORMAT_LAYOUT_PACKED,
66       .BaseFormat = GL_RGB,
67       .DataType = GL_UNSIGNED_NORMALIZED,
68       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
69       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
70       .IsSRGBFormat = 0,
71       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
72       .BytesPerBlock = 4,
73       .Swizzle = { 3, 2, 1, 5 },
74       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 3, 2, 1, 5),
75    },
76    {
77       .Name = MESA_FORMAT_R8G8B8A8_UNORM,
78       .StrName = "MESA_FORMAT_R8G8B8A8_UNORM",
79       .Layout = MESA_FORMAT_LAYOUT_PACKED,
80       .BaseFormat = GL_RGBA,
81       .DataType = GL_UNSIGNED_NORMALIZED,
82       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
83       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
84       .IsSRGBFormat = 0,
85       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
86       .BytesPerBlock = 4,
87       .Swizzle = { 0, 1, 2, 3 },
88       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 0, 1, 2, 3),
89    },
90    {
91       .Name = MESA_FORMAT_R8G8B8X8_UNORM,
92       .StrName = "MESA_FORMAT_R8G8B8X8_UNORM",
93       .Layout = MESA_FORMAT_LAYOUT_PACKED,
94       .BaseFormat = GL_RGB,
95       .DataType = GL_UNSIGNED_NORMALIZED,
96       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
97       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
98       .IsSRGBFormat = 0,
99       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
100       .BytesPerBlock = 4,
101       .Swizzle = { 0, 1, 2, 5 },
102       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 0, 1, 2, 5),
103    },
104    {
105       .Name = MESA_FORMAT_B8G8R8A8_UNORM,
106       .StrName = "MESA_FORMAT_B8G8R8A8_UNORM",
107       .Layout = MESA_FORMAT_LAYOUT_PACKED,
108       .BaseFormat = GL_RGBA,
109       .DataType = GL_UNSIGNED_NORMALIZED,
110       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
111       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
112       .IsSRGBFormat = 0,
113       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
114       .BytesPerBlock = 4,
115       .Swizzle = { 2, 1, 0, 3 },
116       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 2, 1, 0, 3),
117    },
118    {
119       .Name = MESA_FORMAT_B8G8R8X8_UNORM,
120       .StrName = "MESA_FORMAT_B8G8R8X8_UNORM",
121       .Layout = MESA_FORMAT_LAYOUT_PACKED,
122       .BaseFormat = GL_RGB,
123       .DataType = GL_UNSIGNED_NORMALIZED,
124       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
125       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
126       .IsSRGBFormat = 0,
127       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
128       .BytesPerBlock = 4,
129       .Swizzle = { 2, 1, 0, 5 },
130       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 2, 1, 0, 5),
131    },
132    {
133       .Name = MESA_FORMAT_A8R8G8B8_UNORM,
134       .StrName = "MESA_FORMAT_A8R8G8B8_UNORM",
135       .Layout = MESA_FORMAT_LAYOUT_PACKED,
136       .BaseFormat = GL_RGBA,
137       .DataType = GL_UNSIGNED_NORMALIZED,
138       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
139       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
140       .IsSRGBFormat = 0,
141       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
142       .BytesPerBlock = 4,
143       .Swizzle = { 1, 2, 3, 0 },
144       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 1, 2, 3, 0),
145    },
146    {
147       .Name = MESA_FORMAT_X8R8G8B8_UNORM,
148       .StrName = "MESA_FORMAT_X8R8G8B8_UNORM",
149       .Layout = MESA_FORMAT_LAYOUT_PACKED,
150       .BaseFormat = GL_RGB,
151       .DataType = GL_UNSIGNED_NORMALIZED,
152       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
153       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
154       .IsSRGBFormat = 0,
155       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
156       .BytesPerBlock = 4,
157       .Swizzle = { 1, 2, 3, 5 },
158       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 1, 2, 3, 5),
159    },
160    {
161       .Name = MESA_FORMAT_L16A16_UNORM,
162       .StrName = "MESA_FORMAT_L16A16_UNORM",
163       .Layout = MESA_FORMAT_LAYOUT_PACKED,
164       .BaseFormat = GL_LUMINANCE_ALPHA,
165       .DataType = GL_UNSIGNED_NORMALIZED,
166       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
167       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
168       .IsSRGBFormat = 0,
169       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
170       .BytesPerBlock = 4,
171       .Swizzle = { 0, 0, 0, 1 },
172       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 2, 0, 0, 0, 1),
173    },
174    {
175       .Name = MESA_FORMAT_A16L16_UNORM,
176       .StrName = "MESA_FORMAT_A16L16_UNORM",
177       .Layout = MESA_FORMAT_LAYOUT_PACKED,
178       .BaseFormat = GL_LUMINANCE_ALPHA,
179       .DataType = GL_UNSIGNED_NORMALIZED,
180       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
181       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
182       .IsSRGBFormat = 0,
183       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
184       .BytesPerBlock = 4,
185       .Swizzle = { 1, 1, 1, 0 },
186       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 2, 1, 1, 1, 0),
187    },
188    {
189       .Name = MESA_FORMAT_B5G6R5_UNORM,
190       .StrName = "MESA_FORMAT_B5G6R5_UNORM",
191       .Layout = MESA_FORMAT_LAYOUT_PACKED,
192       .BaseFormat = GL_RGB,
193       .DataType = GL_UNSIGNED_NORMALIZED,
194       .RedBits = 5, .GreenBits = 6, .BlueBits = 5, .AlphaBits = 0,
195       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
196       .IsSRGBFormat = 0,
197       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
198       .BytesPerBlock = 2,
199       .Swizzle = { 2, 1, 0, 5 },
200       .ArrayFormat = 0,
201    },
202    {
203       .Name = MESA_FORMAT_R5G6B5_UNORM,
204       .StrName = "MESA_FORMAT_R5G6B5_UNORM",
205       .Layout = MESA_FORMAT_LAYOUT_PACKED,
206       .BaseFormat = GL_RGB,
207       .DataType = GL_UNSIGNED_NORMALIZED,
208       .RedBits = 5, .GreenBits = 6, .BlueBits = 5, .AlphaBits = 0,
209       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
210       .IsSRGBFormat = 0,
211       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
212       .BytesPerBlock = 2,
213       .Swizzle = { 0, 1, 2, 5 },
214       .ArrayFormat = 0,
215    },
216    {
217       .Name = MESA_FORMAT_B4G4R4A4_UNORM,
218       .StrName = "MESA_FORMAT_B4G4R4A4_UNORM",
219       .Layout = MESA_FORMAT_LAYOUT_PACKED,
220       .BaseFormat = GL_RGBA,
221       .DataType = GL_UNSIGNED_NORMALIZED,
222       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
223       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
224       .IsSRGBFormat = 0,
225       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
226       .BytesPerBlock = 2,
227       .Swizzle = { 2, 1, 0, 3 },
228       .ArrayFormat = 0,
229    },
230    {
231       .Name = MESA_FORMAT_B4G4R4X4_UNORM,
232       .StrName = "MESA_FORMAT_B4G4R4X4_UNORM",
233       .Layout = MESA_FORMAT_LAYOUT_PACKED,
234       .BaseFormat = GL_RGB,
235       .DataType = GL_UNSIGNED_NORMALIZED,
236       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 0,
237       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
238       .IsSRGBFormat = 0,
239       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
240       .BytesPerBlock = 2,
241       .Swizzle = { 2, 1, 0, 5 },
242       .ArrayFormat = 0,
243    },
244    {
245       .Name = MESA_FORMAT_A4R4G4B4_UNORM,
246       .StrName = "MESA_FORMAT_A4R4G4B4_UNORM",
247       .Layout = MESA_FORMAT_LAYOUT_PACKED,
248       .BaseFormat = GL_RGBA,
249       .DataType = GL_UNSIGNED_NORMALIZED,
250       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
251       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
252       .IsSRGBFormat = 0,
253       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
254       .BytesPerBlock = 2,
255       .Swizzle = { 1, 2, 3, 0 },
256       .ArrayFormat = 0,
257    },
258    {
259       .Name = MESA_FORMAT_A1B5G5R5_UNORM,
260       .StrName = "MESA_FORMAT_A1B5G5R5_UNORM",
261       .Layout = MESA_FORMAT_LAYOUT_PACKED,
262       .BaseFormat = GL_RGBA,
263       .DataType = GL_UNSIGNED_NORMALIZED,
264       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
265       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
266       .IsSRGBFormat = 0,
267       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
268       .BytesPerBlock = 2,
269       .Swizzle = { 3, 2, 1, 0 },
270       .ArrayFormat = 0,
271    },
272    {
273       .Name = MESA_FORMAT_X1B5G5R5_UNORM,
274       .StrName = "MESA_FORMAT_X1B5G5R5_UNORM",
275       .Layout = MESA_FORMAT_LAYOUT_PACKED,
276       .BaseFormat = GL_RGB,
277       .DataType = GL_UNSIGNED_NORMALIZED,
278       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 0,
279       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
280       .IsSRGBFormat = 0,
281       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
282       .BytesPerBlock = 2,
283       .Swizzle = { 3, 2, 1, 5 },
284       .ArrayFormat = 0,
285    },
286    {
287       .Name = MESA_FORMAT_B5G5R5A1_UNORM,
288       .StrName = "MESA_FORMAT_B5G5R5A1_UNORM",
289       .Layout = MESA_FORMAT_LAYOUT_PACKED,
290       .BaseFormat = GL_RGBA,
291       .DataType = GL_UNSIGNED_NORMALIZED,
292       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
293       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
294       .IsSRGBFormat = 0,
295       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
296       .BytesPerBlock = 2,
297       .Swizzle = { 2, 1, 0, 3 },
298       .ArrayFormat = 0,
299    },
300    {
301       .Name = MESA_FORMAT_B5G5R5X1_UNORM,
302       .StrName = "MESA_FORMAT_B5G5R5X1_UNORM",
303       .Layout = MESA_FORMAT_LAYOUT_PACKED,
304       .BaseFormat = GL_RGB,
305       .DataType = GL_UNSIGNED_NORMALIZED,
306       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 0,
307       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
308       .IsSRGBFormat = 0,
309       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
310       .BytesPerBlock = 2,
311       .Swizzle = { 2, 1, 0, 5 },
312       .ArrayFormat = 0,
313    },
314    {
315       .Name = MESA_FORMAT_A1R5G5B5_UNORM,
316       .StrName = "MESA_FORMAT_A1R5G5B5_UNORM",
317       .Layout = MESA_FORMAT_LAYOUT_PACKED,
318       .BaseFormat = GL_RGBA,
319       .DataType = GL_UNSIGNED_NORMALIZED,
320       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
321       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
322       .IsSRGBFormat = 0,
323       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
324       .BytesPerBlock = 2,
325       .Swizzle = { 1, 2, 3, 0 },
326       .ArrayFormat = 0,
327    },
328    {
329       .Name = MESA_FORMAT_L8A8_UNORM,
330       .StrName = "MESA_FORMAT_L8A8_UNORM",
331       .Layout = MESA_FORMAT_LAYOUT_PACKED,
332       .BaseFormat = GL_LUMINANCE_ALPHA,
333       .DataType = GL_UNSIGNED_NORMALIZED,
334       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
335       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
336       .IsSRGBFormat = 0,
337       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
338       .BytesPerBlock = 2,
339       .Swizzle = { 0, 0, 0, 1 },
340       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 2, 0, 0, 0, 1),
341    },
342    {
343       .Name = MESA_FORMAT_A8L8_UNORM,
344       .StrName = "MESA_FORMAT_A8L8_UNORM",
345       .Layout = MESA_FORMAT_LAYOUT_PACKED,
346       .BaseFormat = GL_LUMINANCE_ALPHA,
347       .DataType = GL_UNSIGNED_NORMALIZED,
348       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
349       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
350       .IsSRGBFormat = 0,
351       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
352       .BytesPerBlock = 2,
353       .Swizzle = { 1, 1, 1, 0 },
354       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 2, 1, 1, 1, 0),
355    },
356    {
357       .Name = MESA_FORMAT_R8G8_UNORM,
358       .StrName = "MESA_FORMAT_R8G8_UNORM",
359       .Layout = MESA_FORMAT_LAYOUT_PACKED,
360       .BaseFormat = GL_RG,
361       .DataType = GL_UNSIGNED_NORMALIZED,
362       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
363       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
364       .IsSRGBFormat = 0,
365       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
366       .BytesPerBlock = 2,
367       .Swizzle = { 0, 1, 4, 5 },
368       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 2, 0, 1, 4, 5),
369    },
370    {
371       .Name = MESA_FORMAT_G8R8_UNORM,
372       .StrName = "MESA_FORMAT_G8R8_UNORM",
373       .Layout = MESA_FORMAT_LAYOUT_PACKED,
374       .BaseFormat = GL_RG,
375       .DataType = GL_UNSIGNED_NORMALIZED,
376       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
377       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
378       .IsSRGBFormat = 0,
379       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
380       .BytesPerBlock = 2,
381       .Swizzle = { 1, 0, 4, 5 },
382       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 2, 1, 0, 4, 5),
383    },
384    {
385       .Name = MESA_FORMAT_L4A4_UNORM,
386       .StrName = "MESA_FORMAT_L4A4_UNORM",
387       .Layout = MESA_FORMAT_LAYOUT_PACKED,
388       .BaseFormat = GL_LUMINANCE_ALPHA,
389       .DataType = GL_UNSIGNED_NORMALIZED,
390       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 4,
391       .LuminanceBits = 4, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
392       .IsSRGBFormat = 0,
393       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
394       .BytesPerBlock = 1,
395       .Swizzle = { 0, 0, 0, 1 },
396       .ArrayFormat = 0,
397    },
398    {
399       .Name = MESA_FORMAT_B2G3R3_UNORM,
400       .StrName = "MESA_FORMAT_B2G3R3_UNORM",
401       .Layout = MESA_FORMAT_LAYOUT_PACKED,
402       .BaseFormat = GL_RGB,
403       .DataType = GL_UNSIGNED_NORMALIZED,
404       .RedBits = 3, .GreenBits = 3, .BlueBits = 2, .AlphaBits = 0,
405       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
406       .IsSRGBFormat = 0,
407       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
408       .BytesPerBlock = 1,
409       .Swizzle = { 2, 1, 0, 5 },
410       .ArrayFormat = 0,
411    },
412    {
413       .Name = MESA_FORMAT_R16G16_UNORM,
414       .StrName = "MESA_FORMAT_R16G16_UNORM",
415       .Layout = MESA_FORMAT_LAYOUT_PACKED,
416       .BaseFormat = GL_RG,
417       .DataType = GL_UNSIGNED_NORMALIZED,
418       .RedBits = 16, .GreenBits = 16, .BlueBits = 0, .AlphaBits = 0,
419       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
420       .IsSRGBFormat = 0,
421       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
422       .BytesPerBlock = 4,
423       .Swizzle = { 0, 1, 4, 5 },
424       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 2, 0, 1, 4, 5),
425    },
426    {
427       .Name = MESA_FORMAT_G16R16_UNORM,
428       .StrName = "MESA_FORMAT_G16R16_UNORM",
429       .Layout = MESA_FORMAT_LAYOUT_PACKED,
430       .BaseFormat = GL_RG,
431       .DataType = GL_UNSIGNED_NORMALIZED,
432       .RedBits = 16, .GreenBits = 16, .BlueBits = 0, .AlphaBits = 0,
433       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
434       .IsSRGBFormat = 0,
435       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
436       .BytesPerBlock = 4,
437       .Swizzle = { 1, 0, 4, 5 },
438       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 2, 1, 0, 4, 5),
439    },
440    {
441       .Name = MESA_FORMAT_B10G10R10A2_UNORM,
442       .StrName = "MESA_FORMAT_B10G10R10A2_UNORM",
443       .Layout = MESA_FORMAT_LAYOUT_PACKED,
444       .BaseFormat = GL_RGBA,
445       .DataType = GL_UNSIGNED_NORMALIZED,
446       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
447       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
448       .IsSRGBFormat = 0,
449       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
450       .BytesPerBlock = 4,
451       .Swizzle = { 2, 1, 0, 3 },
452       .ArrayFormat = 0,
453    },
454    {
455       .Name = MESA_FORMAT_B10G10R10X2_UNORM,
456       .StrName = "MESA_FORMAT_B10G10R10X2_UNORM",
457       .Layout = MESA_FORMAT_LAYOUT_PACKED,
458       .BaseFormat = GL_RGB,
459       .DataType = GL_UNSIGNED_NORMALIZED,
460       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 0,
461       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
462       .IsSRGBFormat = 0,
463       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
464       .BytesPerBlock = 4,
465       .Swizzle = { 2, 1, 0, 5 },
466       .ArrayFormat = 0,
467    },
468    {
469       .Name = MESA_FORMAT_R10G10B10A2_UNORM,
470       .StrName = "MESA_FORMAT_R10G10B10A2_UNORM",
471       .Layout = MESA_FORMAT_LAYOUT_PACKED,
472       .BaseFormat = GL_RGBA,
473       .DataType = GL_UNSIGNED_NORMALIZED,
474       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
475       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
476       .IsSRGBFormat = 0,
477       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
478       .BytesPerBlock = 4,
479       .Swizzle = { 0, 1, 2, 3 },
480       .ArrayFormat = 0,
481    },
482    {
483       .Name = MESA_FORMAT_R10G10B10X2_UNORM,
484       .StrName = "MESA_FORMAT_R10G10B10X2_UNORM",
485       .Layout = MESA_FORMAT_LAYOUT_PACKED,
486       .BaseFormat = GL_RGB,
487       .DataType = GL_UNSIGNED_NORMALIZED,
488       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 0,
489       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
490       .IsSRGBFormat = 0,
491       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
492       .BytesPerBlock = 4,
493       .Swizzle = { 0, 1, 2, 5 },
494       .ArrayFormat = 0,
495    },
496    {
497       .Name = MESA_FORMAT_S8_UINT_Z24_UNORM,
498       .StrName = "MESA_FORMAT_S8_UINT_Z24_UNORM",
499       .Layout = MESA_FORMAT_LAYOUT_PACKED,
500       .BaseFormat = GL_DEPTH_STENCIL,
501       .DataType = GL_UNSIGNED_NORMALIZED,
502       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
503       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 24, .StencilBits = 8,
504       .IsSRGBFormat = 0,
505       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
506       .BytesPerBlock = 4,
507       .Swizzle = { 0, 1, 6, 6 },
508       .ArrayFormat = 0,
509    },
510    {
511       .Name = MESA_FORMAT_X8_UINT_Z24_UNORM,
512       .StrName = "MESA_FORMAT_X8_UINT_Z24_UNORM",
513       .Layout = MESA_FORMAT_LAYOUT_PACKED,
514       .BaseFormat = GL_DEPTH_COMPONENT,
515       .DataType = GL_UNSIGNED_NORMALIZED,
516       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
517       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 24, .StencilBits = 0,
518       .IsSRGBFormat = 0,
519       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
520       .BytesPerBlock = 4,
521       .Swizzle = { 0, 6, 6, 6 },
522       .ArrayFormat = MESA_ARRAY_FORMAT(3, 0, 0, 1, 2, 0, 6, 6, 6),
523    },
524    {
525       .Name = MESA_FORMAT_Z24_UNORM_S8_UINT,
526       .StrName = "MESA_FORMAT_Z24_UNORM_S8_UINT",
527       .Layout = MESA_FORMAT_LAYOUT_PACKED,
528       .BaseFormat = GL_DEPTH_STENCIL,
529       .DataType = GL_UNSIGNED_NORMALIZED,
530       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
531       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 24, .StencilBits = 8,
532       .IsSRGBFormat = 0,
533       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
534       .BytesPerBlock = 4,
535       .Swizzle = { 1, 0, 6, 6 },
536       .ArrayFormat = 0,
537    },
538    {
539       .Name = MESA_FORMAT_Z24_UNORM_X8_UINT,
540       .StrName = "MESA_FORMAT_Z24_UNORM_X8_UINT",
541       .Layout = MESA_FORMAT_LAYOUT_PACKED,
542       .BaseFormat = GL_DEPTH_COMPONENT,
543       .DataType = GL_UNSIGNED_NORMALIZED,
544       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
545       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 24, .StencilBits = 0,
546       .IsSRGBFormat = 0,
547       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
548       .BytesPerBlock = 4,
549       .Swizzle = { 1, 6, 6, 6 },
550       .ArrayFormat = MESA_ARRAY_FORMAT(3, 0, 0, 1, 2, 1, 6, 6, 6),
551    },
552    {
553       .Name = MESA_FORMAT_R3G3B2_UNORM,
554       .StrName = "MESA_FORMAT_R3G3B2_UNORM",
555       .Layout = MESA_FORMAT_LAYOUT_PACKED,
556       .BaseFormat = GL_RGB,
557       .DataType = GL_UNSIGNED_NORMALIZED,
558       .RedBits = 3, .GreenBits = 3, .BlueBits = 2, .AlphaBits = 0,
559       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
560       .IsSRGBFormat = 0,
561       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
562       .BytesPerBlock = 1,
563       .Swizzle = { 0, 1, 2, 5 },
564       .ArrayFormat = 0,
565    },
566    {
567       .Name = MESA_FORMAT_A4B4G4R4_UNORM,
568       .StrName = "MESA_FORMAT_A4B4G4R4_UNORM",
569       .Layout = MESA_FORMAT_LAYOUT_PACKED,
570       .BaseFormat = GL_RGBA,
571       .DataType = GL_UNSIGNED_NORMALIZED,
572       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
573       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
574       .IsSRGBFormat = 0,
575       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
576       .BytesPerBlock = 2,
577       .Swizzle = { 3, 2, 1, 0 },
578       .ArrayFormat = 0,
579    },
580    {
581       .Name = MESA_FORMAT_R4G4B4A4_UNORM,
582       .StrName = "MESA_FORMAT_R4G4B4A4_UNORM",
583       .Layout = MESA_FORMAT_LAYOUT_PACKED,
584       .BaseFormat = GL_RGBA,
585       .DataType = GL_UNSIGNED_NORMALIZED,
586       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
587       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
588       .IsSRGBFormat = 0,
589       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
590       .BytesPerBlock = 2,
591       .Swizzle = { 0, 1, 2, 3 },
592       .ArrayFormat = 0,
593    },
594    {
595       .Name = MESA_FORMAT_R5G5B5A1_UNORM,
596       .StrName = "MESA_FORMAT_R5G5B5A1_UNORM",
597       .Layout = MESA_FORMAT_LAYOUT_PACKED,
598       .BaseFormat = GL_RGBA,
599       .DataType = GL_UNSIGNED_NORMALIZED,
600       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
601       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
602       .IsSRGBFormat = 0,
603       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
604       .BytesPerBlock = 2,
605       .Swizzle = { 0, 1, 2, 3 },
606       .ArrayFormat = 0,
607    },
608    {
609       .Name = MESA_FORMAT_A2B10G10R10_UNORM,
610       .StrName = "MESA_FORMAT_A2B10G10R10_UNORM",
611       .Layout = MESA_FORMAT_LAYOUT_PACKED,
612       .BaseFormat = GL_RGBA,
613       .DataType = GL_UNSIGNED_NORMALIZED,
614       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
615       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
616       .IsSRGBFormat = 0,
617       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
618       .BytesPerBlock = 4,
619       .Swizzle = { 3, 2, 1, 0 },
620       .ArrayFormat = 0,
621    },
622    {
623       .Name = MESA_FORMAT_A2R10G10B10_UNORM,
624       .StrName = "MESA_FORMAT_A2R10G10B10_UNORM",
625       .Layout = MESA_FORMAT_LAYOUT_PACKED,
626       .BaseFormat = GL_RGBA,
627       .DataType = GL_UNSIGNED_NORMALIZED,
628       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
629       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
630       .IsSRGBFormat = 0,
631       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
632       .BytesPerBlock = 4,
633       .Swizzle = { 1, 2, 3, 0 },
634       .ArrayFormat = 0,
635    },
636    {
637       .Name = MESA_FORMAT_YCBCR,
638       .StrName = "MESA_FORMAT_YCBCR",
639       .Layout = MESA_FORMAT_LAYOUT_OTHER,
640       .BaseFormat = GL_YCBCR_MESA,
641       .DataType = GL_UNSIGNED_NORMALIZED,
642       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
643       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
644       .IsSRGBFormat = 0,
645       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
646       .BytesPerBlock = 2,
647       .Swizzle = { 0, 1, 2, 3 },
648       .ArrayFormat = 0,
649    },
650    {
651       .Name = MESA_FORMAT_YCBCR_REV,
652       .StrName = "MESA_FORMAT_YCBCR_REV",
653       .Layout = MESA_FORMAT_LAYOUT_OTHER,
654       .BaseFormat = GL_YCBCR_MESA,
655       .DataType = GL_UNSIGNED_NORMALIZED,
656       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
657       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
658       .IsSRGBFormat = 0,
659       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
660       .BytesPerBlock = 2,
661       .Swizzle = { 0, 1, 2, 3 },
662       .ArrayFormat = 0,
663    },
664    {
665       .Name = MESA_FORMAT_A_UNORM8,
666       .StrName = "MESA_FORMAT_A_UNORM8",
667       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
668       .BaseFormat = GL_ALPHA,
669       .DataType = GL_UNSIGNED_NORMALIZED,
670       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
671       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
672       .IsSRGBFormat = 0,
673       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
674       .BytesPerBlock = 1,
675       .Swizzle = { 4, 4, 4, 0 },
676       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 1, 4, 4, 4, 0),
677    },
678    {
679       .Name = MESA_FORMAT_A_UNORM16,
680       .StrName = "MESA_FORMAT_A_UNORM16",
681       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
682       .BaseFormat = GL_ALPHA,
683       .DataType = GL_UNSIGNED_NORMALIZED,
684       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
685       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
686       .IsSRGBFormat = 0,
687       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
688       .BytesPerBlock = 2,
689       .Swizzle = { 4, 4, 4, 0 },
690       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 1, 4, 4, 4, 0),
691    },
692    {
693       .Name = MESA_FORMAT_L_UNORM8,
694       .StrName = "MESA_FORMAT_L_UNORM8",
695       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
696       .BaseFormat = GL_LUMINANCE,
697       .DataType = GL_UNSIGNED_NORMALIZED,
698       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
699       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
700       .IsSRGBFormat = 0,
701       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
702       .BytesPerBlock = 1,
703       .Swizzle = { 0, 0, 0, 5 },
704       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 1, 0, 0, 0, 5),
705    },
706    {
707       .Name = MESA_FORMAT_L_UNORM16,
708       .StrName = "MESA_FORMAT_L_UNORM16",
709       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
710       .BaseFormat = GL_LUMINANCE,
711       .DataType = GL_UNSIGNED_NORMALIZED,
712       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
713       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
714       .IsSRGBFormat = 0,
715       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
716       .BytesPerBlock = 2,
717       .Swizzle = { 0, 0, 0, 5 },
718       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 1, 0, 0, 0, 5),
719    },
720    {
721       .Name = MESA_FORMAT_I_UNORM8,
722       .StrName = "MESA_FORMAT_I_UNORM8",
723       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
724       .BaseFormat = GL_INTENSITY,
725       .DataType = GL_UNSIGNED_NORMALIZED,
726       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
727       .LuminanceBits = 0, .IntensityBits = 8, .DepthBits = 0, .StencilBits = 0,
728       .IsSRGBFormat = 0,
729       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
730       .BytesPerBlock = 1,
731       .Swizzle = { 0, 0, 0, 0 },
732       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 1, 0, 0, 0, 0),
733    },
734    {
735       .Name = MESA_FORMAT_I_UNORM16,
736       .StrName = "MESA_FORMAT_I_UNORM16",
737       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
738       .BaseFormat = GL_INTENSITY,
739       .DataType = GL_UNSIGNED_NORMALIZED,
740       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
741       .LuminanceBits = 0, .IntensityBits = 16, .DepthBits = 0, .StencilBits = 0,
742       .IsSRGBFormat = 0,
743       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
744       .BytesPerBlock = 2,
745       .Swizzle = { 0, 0, 0, 0 },
746       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 1, 0, 0, 0, 0),
747    },
748    {
749       .Name = MESA_FORMAT_R_UNORM8,
750       .StrName = "MESA_FORMAT_R_UNORM8",
751       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
752       .BaseFormat = GL_RED,
753       .DataType = GL_UNSIGNED_NORMALIZED,
754       .RedBits = 8, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
755       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
756       .IsSRGBFormat = 0,
757       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
758       .BytesPerBlock = 1,
759       .Swizzle = { 0, 4, 4, 5 },
760       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 1, 0, 4, 4, 5),
761    },
762    {
763       .Name = MESA_FORMAT_R_UNORM16,
764       .StrName = "MESA_FORMAT_R_UNORM16",
765       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
766       .BaseFormat = GL_RED,
767       .DataType = GL_UNSIGNED_NORMALIZED,
768       .RedBits = 16, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
769       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
770       .IsSRGBFormat = 0,
771       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
772       .BytesPerBlock = 2,
773       .Swizzle = { 0, 4, 4, 5 },
774       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 1, 0, 4, 4, 5),
775    },
776    {
777       .Name = MESA_FORMAT_BGR_UNORM8,
778       .StrName = "MESA_FORMAT_BGR_UNORM8",
779       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
780       .BaseFormat = GL_RGB,
781       .DataType = GL_UNSIGNED_NORMALIZED,
782       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
783       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
784       .IsSRGBFormat = 0,
785       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
786       .BytesPerBlock = 3,
787       .Swizzle = { 2, 1, 0, 5 },
788       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 3, 2, 1, 0, 5),
789    },
790    {
791       .Name = MESA_FORMAT_RGB_UNORM8,
792       .StrName = "MESA_FORMAT_RGB_UNORM8",
793       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
794       .BaseFormat = GL_RGB,
795       .DataType = GL_UNSIGNED_NORMALIZED,
796       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
797       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
798       .IsSRGBFormat = 0,
799       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
800       .BytesPerBlock = 3,
801       .Swizzle = { 0, 1, 2, 5 },
802       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 3, 0, 1, 2, 5),
803    },
804    {
805       .Name = MESA_FORMAT_RGBA_UNORM16,
806       .StrName = "MESA_FORMAT_RGBA_UNORM16",
807       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
808       .BaseFormat = GL_RGBA,
809       .DataType = GL_UNSIGNED_NORMALIZED,
810       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
811       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
812       .IsSRGBFormat = 0,
813       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
814       .BytesPerBlock = 8,
815       .Swizzle = { 0, 1, 2, 3 },
816       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 4, 0, 1, 2, 3),
817    },
818    {
819       .Name = MESA_FORMAT_RGBX_UNORM16,
820       .StrName = "MESA_FORMAT_RGBX_UNORM16",
821       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
822       .BaseFormat = GL_RGB,
823       .DataType = GL_UNSIGNED_NORMALIZED,
824       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
825       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
826       .IsSRGBFormat = 0,
827       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
828       .BytesPerBlock = 8,
829       .Swizzle = { 0, 1, 2, 5 },
830       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 4, 0, 1, 2, 5),
831    },
832    {
833       .Name = MESA_FORMAT_Z_UNORM16,
834       .StrName = "MESA_FORMAT_Z_UNORM16",
835       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
836       .BaseFormat = GL_DEPTH_COMPONENT,
837       .DataType = GL_UNSIGNED_NORMALIZED,
838       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
839       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 16, .StencilBits = 0,
840       .IsSRGBFormat = 0,
841       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
842       .BytesPerBlock = 2,
843       .Swizzle = { 0, 6, 6, 6 },
844       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 1, 1, 0, 6, 6, 6),
845    },
846    {
847       .Name = MESA_FORMAT_Z_UNORM32,
848       .StrName = "MESA_FORMAT_Z_UNORM32",
849       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
850       .BaseFormat = GL_DEPTH_COMPONENT,
851       .DataType = GL_UNSIGNED_NORMALIZED,
852       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
853       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 32, .StencilBits = 0,
854       .IsSRGBFormat = 0,
855       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
856       .BytesPerBlock = 4,
857       .Swizzle = { 0, 6, 6, 6 },
858       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 1, 1, 0, 6, 6, 6),
859    },
860    {
861       .Name = MESA_FORMAT_S_UINT8,
862       .StrName = "MESA_FORMAT_S_UINT8",
863       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
864       .BaseFormat = GL_STENCIL_INDEX,
865       .DataType = GL_UNSIGNED_INT,
866       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
867       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 8,
868       .IsSRGBFormat = 0,
869       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
870       .BytesPerBlock = 1,
871       .Swizzle = { 6, 0, 6, 6 },
872       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 1, 6, 0, 6, 6),
873    },
874    {
875       .Name = MESA_FORMAT_A8B8G8R8_SNORM,
876       .StrName = "MESA_FORMAT_A8B8G8R8_SNORM",
877       .Layout = MESA_FORMAT_LAYOUT_PACKED,
878       .BaseFormat = GL_RGBA,
879       .DataType = GL_SIGNED_NORMALIZED,
880       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
881       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
882       .IsSRGBFormat = 0,
883       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
884       .BytesPerBlock = 4,
885       .Swizzle = { 3, 2, 1, 0 },
886       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 4, 3, 2, 1, 0),
887    },
888    {
889       .Name = MESA_FORMAT_X8B8G8R8_SNORM,
890       .StrName = "MESA_FORMAT_X8B8G8R8_SNORM",
891       .Layout = MESA_FORMAT_LAYOUT_PACKED,
892       .BaseFormat = GL_RGB,
893       .DataType = GL_SIGNED_NORMALIZED,
894       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
895       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
896       .IsSRGBFormat = 0,
897       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
898       .BytesPerBlock = 4,
899       .Swizzle = { 3, 2, 1, 5 },
900       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 4, 3, 2, 1, 5),
901    },
902    {
903       .Name = MESA_FORMAT_R8G8B8A8_SNORM,
904       .StrName = "MESA_FORMAT_R8G8B8A8_SNORM",
905       .Layout = MESA_FORMAT_LAYOUT_PACKED,
906       .BaseFormat = GL_RGBA,
907       .DataType = GL_SIGNED_NORMALIZED,
908       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
909       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
910       .IsSRGBFormat = 0,
911       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
912       .BytesPerBlock = 4,
913       .Swizzle = { 0, 1, 2, 3 },
914       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 4, 0, 1, 2, 3),
915    },
916    {
917       .Name = MESA_FORMAT_R8G8B8X8_SNORM,
918       .StrName = "MESA_FORMAT_R8G8B8X8_SNORM",
919       .Layout = MESA_FORMAT_LAYOUT_PACKED,
920       .BaseFormat = GL_RGB,
921       .DataType = GL_SIGNED_NORMALIZED,
922       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
923       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
924       .IsSRGBFormat = 0,
925       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
926       .BytesPerBlock = 4,
927       .Swizzle = { 0, 1, 2, 5 },
928       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 4, 0, 1, 2, 5),
929    },
930    {
931       .Name = MESA_FORMAT_R16G16_SNORM,
932       .StrName = "MESA_FORMAT_R16G16_SNORM",
933       .Layout = MESA_FORMAT_LAYOUT_PACKED,
934       .BaseFormat = GL_RG,
935       .DataType = GL_SIGNED_NORMALIZED,
936       .RedBits = 16, .GreenBits = 16, .BlueBits = 0, .AlphaBits = 0,
937       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
938       .IsSRGBFormat = 0,
939       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
940       .BytesPerBlock = 4,
941       .Swizzle = { 0, 1, 4, 5 },
942       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 2, 0, 1, 4, 5),
943    },
944    {
945       .Name = MESA_FORMAT_G16R16_SNORM,
946       .StrName = "MESA_FORMAT_G16R16_SNORM",
947       .Layout = MESA_FORMAT_LAYOUT_PACKED,
948       .BaseFormat = GL_RG,
949       .DataType = GL_SIGNED_NORMALIZED,
950       .RedBits = 16, .GreenBits = 16, .BlueBits = 0, .AlphaBits = 0,
951       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
952       .IsSRGBFormat = 0,
953       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
954       .BytesPerBlock = 4,
955       .Swizzle = { 1, 0, 4, 5 },
956       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 2, 1, 0, 4, 5),
957    },
958    {
959       .Name = MESA_FORMAT_R8G8_SNORM,
960       .StrName = "MESA_FORMAT_R8G8_SNORM",
961       .Layout = MESA_FORMAT_LAYOUT_PACKED,
962       .BaseFormat = GL_RG,
963       .DataType = GL_SIGNED_NORMALIZED,
964       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
965       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
966       .IsSRGBFormat = 0,
967       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
968       .BytesPerBlock = 2,
969       .Swizzle = { 0, 1, 4, 5 },
970       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 2, 0, 1, 4, 5),
971    },
972    {
973       .Name = MESA_FORMAT_G8R8_SNORM,
974       .StrName = "MESA_FORMAT_G8R8_SNORM",
975       .Layout = MESA_FORMAT_LAYOUT_PACKED,
976       .BaseFormat = GL_RG,
977       .DataType = GL_SIGNED_NORMALIZED,
978       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
979       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
980       .IsSRGBFormat = 0,
981       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
982       .BytesPerBlock = 2,
983       .Swizzle = { 1, 0, 4, 5 },
984       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 2, 1, 0, 4, 5),
985    },
986    {
987       .Name = MESA_FORMAT_L8A8_SNORM,
988       .StrName = "MESA_FORMAT_L8A8_SNORM",
989       .Layout = MESA_FORMAT_LAYOUT_PACKED,
990       .BaseFormat = GL_LUMINANCE_ALPHA,
991       .DataType = GL_SIGNED_NORMALIZED,
992       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
993       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
994       .IsSRGBFormat = 0,
995       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
996       .BytesPerBlock = 2,
997       .Swizzle = { 0, 0, 0, 1 },
998       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 2, 0, 0, 0, 1),
999    },
1000    {
1001       .Name = MESA_FORMAT_A8L8_SNORM,
1002       .StrName = "MESA_FORMAT_A8L8_SNORM",
1003       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1004       .BaseFormat = GL_LUMINANCE_ALPHA,
1005       .DataType = GL_SIGNED_NORMALIZED,
1006       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
1007       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1008       .IsSRGBFormat = 0,
1009       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1010       .BytesPerBlock = 2,
1011       .Swizzle = { 1, 1, 1, 0 },
1012       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 2, 1, 1, 1, 0),
1013    },
1014    {
1015       .Name = MESA_FORMAT_A_SNORM8,
1016       .StrName = "MESA_FORMAT_A_SNORM8",
1017       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1018       .BaseFormat = GL_ALPHA,
1019       .DataType = GL_SIGNED_NORMALIZED,
1020       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
1021       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1022       .IsSRGBFormat = 0,
1023       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1024       .BytesPerBlock = 1,
1025       .Swizzle = { 4, 4, 4, 0 },
1026       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 1, 4, 4, 4, 0),
1027    },
1028    {
1029       .Name = MESA_FORMAT_A_SNORM16,
1030       .StrName = "MESA_FORMAT_A_SNORM16",
1031       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1032       .BaseFormat = GL_ALPHA,
1033       .DataType = GL_SIGNED_NORMALIZED,
1034       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
1035       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1036       .IsSRGBFormat = 0,
1037       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1038       .BytesPerBlock = 2,
1039       .Swizzle = { 4, 4, 4, 0 },
1040       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 1, 4, 4, 4, 0),
1041    },
1042    {
1043       .Name = MESA_FORMAT_L_SNORM8,
1044       .StrName = "MESA_FORMAT_L_SNORM8",
1045       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1046       .BaseFormat = GL_LUMINANCE,
1047       .DataType = GL_SIGNED_NORMALIZED,
1048       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1049       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1050       .IsSRGBFormat = 0,
1051       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1052       .BytesPerBlock = 1,
1053       .Swizzle = { 0, 0, 0, 5 },
1054       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 1, 0, 0, 0, 5),
1055    },
1056    {
1057       .Name = MESA_FORMAT_L_SNORM16,
1058       .StrName = "MESA_FORMAT_L_SNORM16",
1059       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1060       .BaseFormat = GL_LUMINANCE,
1061       .DataType = GL_SIGNED_NORMALIZED,
1062       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1063       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1064       .IsSRGBFormat = 0,
1065       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1066       .BytesPerBlock = 2,
1067       .Swizzle = { 0, 0, 0, 5 },
1068       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 1, 0, 0, 0, 5),
1069    },
1070    {
1071       .Name = MESA_FORMAT_I_SNORM8,
1072       .StrName = "MESA_FORMAT_I_SNORM8",
1073       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1074       .BaseFormat = GL_INTENSITY,
1075       .DataType = GL_SIGNED_NORMALIZED,
1076       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1077       .LuminanceBits = 0, .IntensityBits = 8, .DepthBits = 0, .StencilBits = 0,
1078       .IsSRGBFormat = 0,
1079       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1080       .BytesPerBlock = 1,
1081       .Swizzle = { 0, 0, 0, 0 },
1082       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 1, 0, 0, 0, 0),
1083    },
1084    {
1085       .Name = MESA_FORMAT_I_SNORM16,
1086       .StrName = "MESA_FORMAT_I_SNORM16",
1087       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1088       .BaseFormat = GL_INTENSITY,
1089       .DataType = GL_SIGNED_NORMALIZED,
1090       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1091       .LuminanceBits = 0, .IntensityBits = 16, .DepthBits = 0, .StencilBits = 0,
1092       .IsSRGBFormat = 0,
1093       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1094       .BytesPerBlock = 2,
1095       .Swizzle = { 0, 0, 0, 0 },
1096       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 1, 0, 0, 0, 0),
1097    },
1098    {
1099       .Name = MESA_FORMAT_R_SNORM8,
1100       .StrName = "MESA_FORMAT_R_SNORM8",
1101       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1102       .BaseFormat = GL_RED,
1103       .DataType = GL_SIGNED_NORMALIZED,
1104       .RedBits = 8, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1105       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1106       .IsSRGBFormat = 0,
1107       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1108       .BytesPerBlock = 1,
1109       .Swizzle = { 0, 4, 4, 5 },
1110       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 1, 1, 0, 4, 4, 5),
1111    },
1112    {
1113       .Name = MESA_FORMAT_R_SNORM16,
1114       .StrName = "MESA_FORMAT_R_SNORM16",
1115       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1116       .BaseFormat = GL_RED,
1117       .DataType = GL_SIGNED_NORMALIZED,
1118       .RedBits = 16, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1119       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1120       .IsSRGBFormat = 0,
1121       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1122       .BytesPerBlock = 2,
1123       .Swizzle = { 0, 4, 4, 5 },
1124       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 1, 0, 4, 4, 5),
1125    },
1126    {
1127       .Name = MESA_FORMAT_LA_SNORM16,
1128       .StrName = "MESA_FORMAT_LA_SNORM16",
1129       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1130       .BaseFormat = GL_LUMINANCE_ALPHA,
1131       .DataType = GL_SIGNED_NORMALIZED,
1132       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
1133       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1134       .IsSRGBFormat = 0,
1135       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1136       .BytesPerBlock = 4,
1137       .Swizzle = { 0, 0, 0, 1 },
1138       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 2, 0, 0, 0, 1),
1139    },
1140    {
1141       .Name = MESA_FORMAT_RGB_SNORM16,
1142       .StrName = "MESA_FORMAT_RGB_SNORM16",
1143       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1144       .BaseFormat = GL_RGB,
1145       .DataType = GL_SIGNED_NORMALIZED,
1146       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
1147       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1148       .IsSRGBFormat = 0,
1149       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1150       .BytesPerBlock = 6,
1151       .Swizzle = { 0, 1, 2, 5 },
1152       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 3, 0, 1, 2, 5),
1153    },
1154    {
1155       .Name = MESA_FORMAT_RGBA_SNORM16,
1156       .StrName = "MESA_FORMAT_RGBA_SNORM16",
1157       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1158       .BaseFormat = GL_RGBA,
1159       .DataType = GL_SIGNED_NORMALIZED,
1160       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
1161       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1162       .IsSRGBFormat = 0,
1163       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1164       .BytesPerBlock = 8,
1165       .Swizzle = { 0, 1, 2, 3 },
1166       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 4, 0, 1, 2, 3),
1167    },
1168    {
1169       .Name = MESA_FORMAT_RGBX_SNORM16,
1170       .StrName = "MESA_FORMAT_RGBX_SNORM16",
1171       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1172       .BaseFormat = GL_RGB,
1173       .DataType = GL_SIGNED_NORMALIZED,
1174       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
1175       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1176       .IsSRGBFormat = 0,
1177       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1178       .BytesPerBlock = 8,
1179       .Swizzle = { 0, 1, 2, 5 },
1180       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 1, 4, 0, 1, 2, 5),
1181    },
1182    {
1183       .Name = MESA_FORMAT_A8B8G8R8_SRGB,
1184       .StrName = "MESA_FORMAT_A8B8G8R8_SRGB",
1185       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1186       .BaseFormat = GL_RGBA,
1187       .DataType = GL_UNSIGNED_NORMALIZED,
1188       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1189       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1190       .IsSRGBFormat = 1,
1191       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1192       .BytesPerBlock = 4,
1193       .Swizzle = { 3, 2, 1, 0 },
1194       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 3, 2, 1, 0),
1195    },
1196    {
1197       .Name = MESA_FORMAT_B8G8R8A8_SRGB,
1198       .StrName = "MESA_FORMAT_B8G8R8A8_SRGB",
1199       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1200       .BaseFormat = GL_RGBA,
1201       .DataType = GL_UNSIGNED_NORMALIZED,
1202       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1203       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1204       .IsSRGBFormat = 1,
1205       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1206       .BytesPerBlock = 4,
1207       .Swizzle = { 2, 1, 0, 3 },
1208       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 2, 1, 0, 3),
1209    },
1210    {
1211       .Name = MESA_FORMAT_A8R8G8B8_SRGB,
1212       .StrName = "MESA_FORMAT_A8R8G8B8_SRGB",
1213       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1214       .BaseFormat = GL_RGBA,
1215       .DataType = GL_UNSIGNED_NORMALIZED,
1216       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1217       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1218       .IsSRGBFormat = 1,
1219       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1220       .BytesPerBlock = 4,
1221       .Swizzle = { 1, 2, 3, 0 },
1222       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 1, 2, 3, 0),
1223    },
1224    {
1225       .Name = MESA_FORMAT_B8G8R8X8_SRGB,
1226       .StrName = "MESA_FORMAT_B8G8R8X8_SRGB",
1227       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1228       .BaseFormat = GL_RGB,
1229       .DataType = GL_UNSIGNED_NORMALIZED,
1230       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
1231       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1232       .IsSRGBFormat = 1,
1233       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1234       .BytesPerBlock = 4,
1235       .Swizzle = { 2, 1, 0, 5 },
1236       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 2, 1, 0, 5),
1237    },
1238    {
1239       .Name = MESA_FORMAT_X8R8G8B8_SRGB,
1240       .StrName = "MESA_FORMAT_X8R8G8B8_SRGB",
1241       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1242       .BaseFormat = GL_RGB,
1243       .DataType = GL_UNSIGNED_NORMALIZED,
1244       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
1245       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1246       .IsSRGBFormat = 1,
1247       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1248       .BytesPerBlock = 4,
1249       .Swizzle = { 1, 2, 3, 5 },
1250       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 1, 2, 3, 5),
1251    },
1252    {
1253       .Name = MESA_FORMAT_R8G8B8A8_SRGB,
1254       .StrName = "MESA_FORMAT_R8G8B8A8_SRGB",
1255       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1256       .BaseFormat = GL_RGBA,
1257       .DataType = GL_UNSIGNED_NORMALIZED,
1258       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1259       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1260       .IsSRGBFormat = 1,
1261       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1262       .BytesPerBlock = 4,
1263       .Swizzle = { 0, 1, 2, 3 },
1264       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 0, 1, 2, 3),
1265    },
1266    {
1267       .Name = MESA_FORMAT_R8G8B8X8_SRGB,
1268       .StrName = "MESA_FORMAT_R8G8B8X8_SRGB",
1269       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1270       .BaseFormat = GL_RGB,
1271       .DataType = GL_UNSIGNED_NORMALIZED,
1272       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
1273       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1274       .IsSRGBFormat = 1,
1275       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1276       .BytesPerBlock = 4,
1277       .Swizzle = { 0, 1, 2, 5 },
1278       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 0, 1, 2, 5),
1279    },
1280    {
1281       .Name = MESA_FORMAT_X8B8G8R8_SRGB,
1282       .StrName = "MESA_FORMAT_X8B8G8R8_SRGB",
1283       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1284       .BaseFormat = GL_RGB,
1285       .DataType = GL_UNSIGNED_NORMALIZED,
1286       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
1287       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1288       .IsSRGBFormat = 1,
1289       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1290       .BytesPerBlock = 4,
1291       .Swizzle = { 3, 2, 1, 5 },
1292       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 4, 3, 2, 1, 5),
1293    },
1294    {
1295       .Name = MESA_FORMAT_L8A8_SRGB,
1296       .StrName = "MESA_FORMAT_L8A8_SRGB",
1297       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1298       .BaseFormat = GL_LUMINANCE_ALPHA,
1299       .DataType = GL_UNSIGNED_NORMALIZED,
1300       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
1301       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1302       .IsSRGBFormat = 1,
1303       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1304       .BytesPerBlock = 2,
1305       .Swizzle = { 0, 0, 0, 1 },
1306       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 2, 0, 0, 0, 1),
1307    },
1308    {
1309       .Name = MESA_FORMAT_A8L8_SRGB,
1310       .StrName = "MESA_FORMAT_A8L8_SRGB",
1311       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1312       .BaseFormat = GL_LUMINANCE_ALPHA,
1313       .DataType = GL_UNSIGNED_NORMALIZED,
1314       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
1315       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1316       .IsSRGBFormat = 1,
1317       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1318       .BytesPerBlock = 2,
1319       .Swizzle = { 1, 1, 1, 0 },
1320       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 2, 1, 1, 1, 0),
1321    },
1322    {
1323       .Name = MESA_FORMAT_L_SRGB8,
1324       .StrName = "MESA_FORMAT_L_SRGB8",
1325       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1326       .BaseFormat = GL_LUMINANCE,
1327       .DataType = GL_UNSIGNED_NORMALIZED,
1328       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1329       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1330       .IsSRGBFormat = 1,
1331       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1332       .BytesPerBlock = 1,
1333       .Swizzle = { 0, 0, 0, 5 },
1334       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 1, 0, 0, 0, 5),
1335    },
1336    {
1337       .Name = MESA_FORMAT_BGR_SRGB8,
1338       .StrName = "MESA_FORMAT_BGR_SRGB8",
1339       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1340       .BaseFormat = GL_RGB,
1341       .DataType = GL_UNSIGNED_NORMALIZED,
1342       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
1343       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1344       .IsSRGBFormat = 1,
1345       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1346       .BytesPerBlock = 3,
1347       .Swizzle = { 2, 1, 0, 5 },
1348       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 1, 3, 2, 1, 0, 5),
1349    },
1350    {
1351       .Name = MESA_FORMAT_R9G9B9E5_FLOAT,
1352       .StrName = "MESA_FORMAT_R9G9B9E5_FLOAT",
1353       .Layout = MESA_FORMAT_LAYOUT_OTHER,
1354       .BaseFormat = GL_RGB,
1355       .DataType = GL_FLOAT,
1356       .RedBits = 9, .GreenBits = 9, .BlueBits = 9, .AlphaBits = 0,
1357       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1358       .IsSRGBFormat = 0,
1359       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1360       .BytesPerBlock = 4,
1361       .Swizzle = { 0, 1, 2, 5 },
1362       .ArrayFormat = 0,
1363    },
1364    {
1365       .Name = MESA_FORMAT_R11G11B10_FLOAT,
1366       .StrName = "MESA_FORMAT_R11G11B10_FLOAT",
1367       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1368       .BaseFormat = GL_RGB,
1369       .DataType = GL_FLOAT,
1370       .RedBits = 11, .GreenBits = 11, .BlueBits = 10, .AlphaBits = 0,
1371       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1372       .IsSRGBFormat = 0,
1373       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1374       .BytesPerBlock = 4,
1375       .Swizzle = { 0, 1, 2, 5 },
1376       .ArrayFormat = 0,
1377    },
1378    {
1379       .Name = MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
1380       .StrName = "MESA_FORMAT_Z32_FLOAT_S8X24_UINT",
1381       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1382       .BaseFormat = GL_DEPTH_STENCIL,
1383       .DataType = GL_FLOAT,
1384       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1385       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 32, .StencilBits = 8,
1386       .IsSRGBFormat = 0,
1387       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1388       .BytesPerBlock = 8,
1389       .Swizzle = { 2, 0, 6, 6 },
1390       .ArrayFormat = 0,
1391    },
1392    {
1393       .Name = MESA_FORMAT_A_FLOAT16,
1394       .StrName = "MESA_FORMAT_A_FLOAT16",
1395       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1396       .BaseFormat = GL_ALPHA,
1397       .DataType = GL_FLOAT,
1398       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
1399       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1400       .IsSRGBFormat = 0,
1401       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1402       .BytesPerBlock = 2,
1403       .Swizzle = { 4, 4, 4, 0 },
1404       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 1, 4, 4, 4, 0),
1405    },
1406    {
1407       .Name = MESA_FORMAT_A_FLOAT32,
1408       .StrName = "MESA_FORMAT_A_FLOAT32",
1409       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1410       .BaseFormat = GL_ALPHA,
1411       .DataType = GL_FLOAT,
1412       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 32,
1413       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1414       .IsSRGBFormat = 0,
1415       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1416       .BytesPerBlock = 4,
1417       .Swizzle = { 4, 4, 4, 0 },
1418       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 1, 4, 4, 4, 0),
1419    },
1420    {
1421       .Name = MESA_FORMAT_L_FLOAT16,
1422       .StrName = "MESA_FORMAT_L_FLOAT16",
1423       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1424       .BaseFormat = GL_LUMINANCE,
1425       .DataType = GL_FLOAT,
1426       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1427       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1428       .IsSRGBFormat = 0,
1429       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1430       .BytesPerBlock = 2,
1431       .Swizzle = { 0, 0, 0, 5 },
1432       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 1, 0, 0, 0, 5),
1433    },
1434    {
1435       .Name = MESA_FORMAT_L_FLOAT32,
1436       .StrName = "MESA_FORMAT_L_FLOAT32",
1437       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1438       .BaseFormat = GL_LUMINANCE,
1439       .DataType = GL_FLOAT,
1440       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1441       .LuminanceBits = 32, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1442       .IsSRGBFormat = 0,
1443       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1444       .BytesPerBlock = 4,
1445       .Swizzle = { 0, 0, 0, 5 },
1446       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 1, 0, 0, 0, 5),
1447    },
1448    {
1449       .Name = MESA_FORMAT_LA_FLOAT16,
1450       .StrName = "MESA_FORMAT_LA_FLOAT16",
1451       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1452       .BaseFormat = GL_LUMINANCE_ALPHA,
1453       .DataType = GL_FLOAT,
1454       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
1455       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1456       .IsSRGBFormat = 0,
1457       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1458       .BytesPerBlock = 4,
1459       .Swizzle = { 0, 0, 0, 1 },
1460       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 2, 0, 0, 0, 1),
1461    },
1462    {
1463       .Name = MESA_FORMAT_LA_FLOAT32,
1464       .StrName = "MESA_FORMAT_LA_FLOAT32",
1465       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1466       .BaseFormat = GL_LUMINANCE_ALPHA,
1467       .DataType = GL_FLOAT,
1468       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 32,
1469       .LuminanceBits = 32, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1470       .IsSRGBFormat = 0,
1471       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1472       .BytesPerBlock = 8,
1473       .Swizzle = { 0, 0, 0, 1 },
1474       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 2, 0, 0, 0, 1),
1475    },
1476    {
1477       .Name = MESA_FORMAT_I_FLOAT16,
1478       .StrName = "MESA_FORMAT_I_FLOAT16",
1479       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1480       .BaseFormat = GL_INTENSITY,
1481       .DataType = GL_FLOAT,
1482       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1483       .LuminanceBits = 0, .IntensityBits = 16, .DepthBits = 0, .StencilBits = 0,
1484       .IsSRGBFormat = 0,
1485       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1486       .BytesPerBlock = 2,
1487       .Swizzle = { 0, 0, 0, 0 },
1488       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 1, 0, 0, 0, 0),
1489    },
1490    {
1491       .Name = MESA_FORMAT_I_FLOAT32,
1492       .StrName = "MESA_FORMAT_I_FLOAT32",
1493       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1494       .BaseFormat = GL_INTENSITY,
1495       .DataType = GL_FLOAT,
1496       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1497       .LuminanceBits = 0, .IntensityBits = 32, .DepthBits = 0, .StencilBits = 0,
1498       .IsSRGBFormat = 0,
1499       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1500       .BytesPerBlock = 4,
1501       .Swizzle = { 0, 0, 0, 0 },
1502       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 1, 0, 0, 0, 0),
1503    },
1504    {
1505       .Name = MESA_FORMAT_R_FLOAT16,
1506       .StrName = "MESA_FORMAT_R_FLOAT16",
1507       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1508       .BaseFormat = GL_RED,
1509       .DataType = GL_FLOAT,
1510       .RedBits = 16, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1511       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1512       .IsSRGBFormat = 0,
1513       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1514       .BytesPerBlock = 2,
1515       .Swizzle = { 0, 4, 4, 5 },
1516       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 1, 0, 4, 4, 5),
1517    },
1518    {
1519       .Name = MESA_FORMAT_R_FLOAT32,
1520       .StrName = "MESA_FORMAT_R_FLOAT32",
1521       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1522       .BaseFormat = GL_RED,
1523       .DataType = GL_FLOAT,
1524       .RedBits = 32, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1525       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1526       .IsSRGBFormat = 0,
1527       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1528       .BytesPerBlock = 4,
1529       .Swizzle = { 0, 4, 4, 5 },
1530       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 1, 0, 4, 4, 5),
1531    },
1532    {
1533       .Name = MESA_FORMAT_RG_FLOAT16,
1534       .StrName = "MESA_FORMAT_RG_FLOAT16",
1535       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1536       .BaseFormat = GL_RG,
1537       .DataType = GL_FLOAT,
1538       .RedBits = 16, .GreenBits = 16, .BlueBits = 0, .AlphaBits = 0,
1539       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1540       .IsSRGBFormat = 0,
1541       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1542       .BytesPerBlock = 4,
1543       .Swizzle = { 0, 1, 4, 5 },
1544       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 2, 0, 1, 4, 5),
1545    },
1546    {
1547       .Name = MESA_FORMAT_RG_FLOAT32,
1548       .StrName = "MESA_FORMAT_RG_FLOAT32",
1549       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1550       .BaseFormat = GL_RG,
1551       .DataType = GL_FLOAT,
1552       .RedBits = 32, .GreenBits = 32, .BlueBits = 0, .AlphaBits = 0,
1553       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1554       .IsSRGBFormat = 0,
1555       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1556       .BytesPerBlock = 8,
1557       .Swizzle = { 0, 1, 4, 5 },
1558       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 2, 0, 1, 4, 5),
1559    },
1560    {
1561       .Name = MESA_FORMAT_RGB_FLOAT16,
1562       .StrName = "MESA_FORMAT_RGB_FLOAT16",
1563       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1564       .BaseFormat = GL_RGB,
1565       .DataType = GL_FLOAT,
1566       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
1567       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1568       .IsSRGBFormat = 0,
1569       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1570       .BytesPerBlock = 6,
1571       .Swizzle = { 0, 1, 2, 5 },
1572       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 3, 0, 1, 2, 5),
1573    },
1574    {
1575       .Name = MESA_FORMAT_RGB_FLOAT32,
1576       .StrName = "MESA_FORMAT_RGB_FLOAT32",
1577       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1578       .BaseFormat = GL_RGB,
1579       .DataType = GL_FLOAT,
1580       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 0,
1581       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1582       .IsSRGBFormat = 0,
1583       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1584       .BytesPerBlock = 12,
1585       .Swizzle = { 0, 1, 2, 5 },
1586       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 3, 0, 1, 2, 5),
1587    },
1588    {
1589       .Name = MESA_FORMAT_RGBA_FLOAT16,
1590       .StrName = "MESA_FORMAT_RGBA_FLOAT16",
1591       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1592       .BaseFormat = GL_RGBA,
1593       .DataType = GL_FLOAT,
1594       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
1595       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1596       .IsSRGBFormat = 0,
1597       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1598       .BytesPerBlock = 8,
1599       .Swizzle = { 0, 1, 2, 3 },
1600       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 4, 0, 1, 2, 3),
1601    },
1602    {
1603       .Name = MESA_FORMAT_RGBA_FLOAT32,
1604       .StrName = "MESA_FORMAT_RGBA_FLOAT32",
1605       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1606       .BaseFormat = GL_RGBA,
1607       .DataType = GL_FLOAT,
1608       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 32,
1609       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1610       .IsSRGBFormat = 0,
1611       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1612       .BytesPerBlock = 16,
1613       .Swizzle = { 0, 1, 2, 3 },
1614       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 4, 0, 1, 2, 3),
1615    },
1616    {
1617       .Name = MESA_FORMAT_RGBX_FLOAT16,
1618       .StrName = "MESA_FORMAT_RGBX_FLOAT16",
1619       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1620       .BaseFormat = GL_RGB,
1621       .DataType = GL_FLOAT,
1622       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
1623       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1624       .IsSRGBFormat = 0,
1625       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1626       .BytesPerBlock = 8,
1627       .Swizzle = { 0, 1, 2, 5 },
1628       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 1, 1, 4, 0, 1, 2, 5),
1629    },
1630    {
1631       .Name = MESA_FORMAT_RGBX_FLOAT32,
1632       .StrName = "MESA_FORMAT_RGBX_FLOAT32",
1633       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1634       .BaseFormat = GL_RGB,
1635       .DataType = GL_FLOAT,
1636       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 0,
1637       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1638       .IsSRGBFormat = 0,
1639       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1640       .BytesPerBlock = 16,
1641       .Swizzle = { 0, 1, 2, 5 },
1642       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 4, 0, 1, 2, 5),
1643    },
1644    {
1645       .Name = MESA_FORMAT_Z_FLOAT32,
1646       .StrName = "MESA_FORMAT_Z_FLOAT32",
1647       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1648       .BaseFormat = GL_DEPTH_COMPONENT,
1649       .DataType = GL_FLOAT,
1650       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
1651       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 32, .StencilBits = 0,
1652       .IsSRGBFormat = 0,
1653       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1654       .BytesPerBlock = 4,
1655       .Swizzle = { 0, 6, 6, 6 },
1656       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 1, 1, 1, 0, 6, 6, 6),
1657    },
1658    {
1659       .Name = MESA_FORMAT_A8B8G8R8_UINT,
1660       .StrName = "MESA_FORMAT_A8B8G8R8_UINT",
1661       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1662       .BaseFormat = GL_RGBA,
1663       .DataType = GL_UNSIGNED_INT,
1664       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1665       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1666       .IsSRGBFormat = 0,
1667       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1668       .BytesPerBlock = 4,
1669       .Swizzle = { 3, 2, 1, 0 },
1670       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 4, 3, 2, 1, 0),
1671    },
1672    {
1673       .Name = MESA_FORMAT_A8R8G8B8_UINT,
1674       .StrName = "MESA_FORMAT_A8R8G8B8_UINT",
1675       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1676       .BaseFormat = GL_RGBA,
1677       .DataType = GL_UNSIGNED_INT,
1678       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1679       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1680       .IsSRGBFormat = 0,
1681       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1682       .BytesPerBlock = 4,
1683       .Swizzle = { 1, 2, 3, 0 },
1684       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 4, 1, 2, 3, 0),
1685    },
1686    {
1687       .Name = MESA_FORMAT_R8G8B8A8_UINT,
1688       .StrName = "MESA_FORMAT_R8G8B8A8_UINT",
1689       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1690       .BaseFormat = GL_RGBA,
1691       .DataType = GL_UNSIGNED_INT,
1692       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1693       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1694       .IsSRGBFormat = 0,
1695       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1696       .BytesPerBlock = 4,
1697       .Swizzle = { 0, 1, 2, 3 },
1698       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 4, 0, 1, 2, 3),
1699    },
1700    {
1701       .Name = MESA_FORMAT_B8G8R8A8_UINT,
1702       .StrName = "MESA_FORMAT_B8G8R8A8_UINT",
1703       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1704       .BaseFormat = GL_RGBA,
1705       .DataType = GL_UNSIGNED_INT,
1706       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
1707       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1708       .IsSRGBFormat = 0,
1709       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1710       .BytesPerBlock = 4,
1711       .Swizzle = { 2, 1, 0, 3 },
1712       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 4, 2, 1, 0, 3),
1713    },
1714    {
1715       .Name = MESA_FORMAT_B10G10R10A2_UINT,
1716       .StrName = "MESA_FORMAT_B10G10R10A2_UINT",
1717       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1718       .BaseFormat = GL_RGBA,
1719       .DataType = GL_UNSIGNED_INT,
1720       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
1721       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1722       .IsSRGBFormat = 0,
1723       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1724       .BytesPerBlock = 4,
1725       .Swizzle = { 2, 1, 0, 3 },
1726       .ArrayFormat = 0,
1727    },
1728    {
1729       .Name = MESA_FORMAT_R10G10B10A2_UINT,
1730       .StrName = "MESA_FORMAT_R10G10B10A2_UINT",
1731       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1732       .BaseFormat = GL_RGBA,
1733       .DataType = GL_UNSIGNED_INT,
1734       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
1735       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1736       .IsSRGBFormat = 0,
1737       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1738       .BytesPerBlock = 4,
1739       .Swizzle = { 0, 1, 2, 3 },
1740       .ArrayFormat = 0,
1741    },
1742    {
1743       .Name = MESA_FORMAT_A2B10G10R10_UINT,
1744       .StrName = "MESA_FORMAT_A2B10G10R10_UINT",
1745       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1746       .BaseFormat = GL_RGBA,
1747       .DataType = GL_UNSIGNED_INT,
1748       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
1749       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1750       .IsSRGBFormat = 0,
1751       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1752       .BytesPerBlock = 4,
1753       .Swizzle = { 3, 2, 1, 0 },
1754       .ArrayFormat = 0,
1755    },
1756    {
1757       .Name = MESA_FORMAT_A2R10G10B10_UINT,
1758       .StrName = "MESA_FORMAT_A2R10G10B10_UINT",
1759       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1760       .BaseFormat = GL_RGBA,
1761       .DataType = GL_UNSIGNED_INT,
1762       .RedBits = 10, .GreenBits = 10, .BlueBits = 10, .AlphaBits = 2,
1763       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1764       .IsSRGBFormat = 0,
1765       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1766       .BytesPerBlock = 4,
1767       .Swizzle = { 1, 2, 3, 0 },
1768       .ArrayFormat = 0,
1769    },
1770    {
1771       .Name = MESA_FORMAT_B5G6R5_UINT,
1772       .StrName = "MESA_FORMAT_B5G6R5_UINT",
1773       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1774       .BaseFormat = GL_RGB,
1775       .DataType = GL_UNSIGNED_INT,
1776       .RedBits = 5, .GreenBits = 6, .BlueBits = 5, .AlphaBits = 0,
1777       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1778       .IsSRGBFormat = 0,
1779       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1780       .BytesPerBlock = 2,
1781       .Swizzle = { 2, 1, 0, 5 },
1782       .ArrayFormat = 0,
1783    },
1784    {
1785       .Name = MESA_FORMAT_R5G6B5_UINT,
1786       .StrName = "MESA_FORMAT_R5G6B5_UINT",
1787       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1788       .BaseFormat = GL_RGB,
1789       .DataType = GL_UNSIGNED_INT,
1790       .RedBits = 5, .GreenBits = 6, .BlueBits = 5, .AlphaBits = 0,
1791       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1792       .IsSRGBFormat = 0,
1793       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1794       .BytesPerBlock = 2,
1795       .Swizzle = { 0, 1, 2, 5 },
1796       .ArrayFormat = 0,
1797    },
1798    {
1799       .Name = MESA_FORMAT_B2G3R3_UINT,
1800       .StrName = "MESA_FORMAT_B2G3R3_UINT",
1801       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1802       .BaseFormat = GL_RGB,
1803       .DataType = GL_UNSIGNED_INT,
1804       .RedBits = 3, .GreenBits = 3, .BlueBits = 2, .AlphaBits = 0,
1805       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1806       .IsSRGBFormat = 0,
1807       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1808       .BytesPerBlock = 1,
1809       .Swizzle = { 2, 1, 0, 5 },
1810       .ArrayFormat = 0,
1811    },
1812    {
1813       .Name = MESA_FORMAT_R3G3B2_UINT,
1814       .StrName = "MESA_FORMAT_R3G3B2_UINT",
1815       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1816       .BaseFormat = GL_RGB,
1817       .DataType = GL_UNSIGNED_INT,
1818       .RedBits = 3, .GreenBits = 3, .BlueBits = 2, .AlphaBits = 0,
1819       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1820       .IsSRGBFormat = 0,
1821       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1822       .BytesPerBlock = 1,
1823       .Swizzle = { 0, 1, 2, 5 },
1824       .ArrayFormat = 0,
1825    },
1826    {
1827       .Name = MESA_FORMAT_A4B4G4R4_UINT,
1828       .StrName = "MESA_FORMAT_A4B4G4R4_UINT",
1829       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1830       .BaseFormat = GL_RGBA,
1831       .DataType = GL_UNSIGNED_INT,
1832       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
1833       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1834       .IsSRGBFormat = 0,
1835       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1836       .BytesPerBlock = 2,
1837       .Swizzle = { 3, 2, 1, 0 },
1838       .ArrayFormat = 0,
1839    },
1840    {
1841       .Name = MESA_FORMAT_R4G4B4A4_UINT,
1842       .StrName = "MESA_FORMAT_R4G4B4A4_UINT",
1843       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1844       .BaseFormat = GL_RGBA,
1845       .DataType = GL_UNSIGNED_INT,
1846       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
1847       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1848       .IsSRGBFormat = 0,
1849       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1850       .BytesPerBlock = 2,
1851       .Swizzle = { 0, 1, 2, 3 },
1852       .ArrayFormat = 0,
1853    },
1854    {
1855       .Name = MESA_FORMAT_B4G4R4A4_UINT,
1856       .StrName = "MESA_FORMAT_B4G4R4A4_UINT",
1857       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1858       .BaseFormat = GL_RGBA,
1859       .DataType = GL_UNSIGNED_INT,
1860       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
1861       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1862       .IsSRGBFormat = 0,
1863       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1864       .BytesPerBlock = 2,
1865       .Swizzle = { 2, 1, 0, 3 },
1866       .ArrayFormat = 0,
1867    },
1868    {
1869       .Name = MESA_FORMAT_A4R4G4B4_UINT,
1870       .StrName = "MESA_FORMAT_A4R4G4B4_UINT",
1871       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1872       .BaseFormat = GL_RGBA,
1873       .DataType = GL_UNSIGNED_INT,
1874       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
1875       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1876       .IsSRGBFormat = 0,
1877       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1878       .BytesPerBlock = 2,
1879       .Swizzle = { 1, 2, 3, 0 },
1880       .ArrayFormat = 0,
1881    },
1882    {
1883       .Name = MESA_FORMAT_A1B5G5R5_UINT,
1884       .StrName = "MESA_FORMAT_A1B5G5R5_UINT",
1885       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1886       .BaseFormat = GL_RGBA,
1887       .DataType = GL_UNSIGNED_INT,
1888       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
1889       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1890       .IsSRGBFormat = 0,
1891       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1892       .BytesPerBlock = 2,
1893       .Swizzle = { 3, 2, 1, 0 },
1894       .ArrayFormat = 0,
1895    },
1896    {
1897       .Name = MESA_FORMAT_B5G5R5A1_UINT,
1898       .StrName = "MESA_FORMAT_B5G5R5A1_UINT",
1899       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1900       .BaseFormat = GL_RGBA,
1901       .DataType = GL_UNSIGNED_INT,
1902       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
1903       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1904       .IsSRGBFormat = 0,
1905       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1906       .BytesPerBlock = 2,
1907       .Swizzle = { 2, 1, 0, 3 },
1908       .ArrayFormat = 0,
1909    },
1910    {
1911       .Name = MESA_FORMAT_A1R5G5B5_UINT,
1912       .StrName = "MESA_FORMAT_A1R5G5B5_UINT",
1913       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1914       .BaseFormat = GL_RGBA,
1915       .DataType = GL_UNSIGNED_INT,
1916       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
1917       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1918       .IsSRGBFormat = 0,
1919       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1920       .BytesPerBlock = 2,
1921       .Swizzle = { 1, 2, 3, 0 },
1922       .ArrayFormat = 0,
1923    },
1924    {
1925       .Name = MESA_FORMAT_R5G5B5A1_UINT,
1926       .StrName = "MESA_FORMAT_R5G5B5A1_UINT",
1927       .Layout = MESA_FORMAT_LAYOUT_PACKED,
1928       .BaseFormat = GL_RGBA,
1929       .DataType = GL_UNSIGNED_INT,
1930       .RedBits = 5, .GreenBits = 5, .BlueBits = 5, .AlphaBits = 1,
1931       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1932       .IsSRGBFormat = 0,
1933       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1934       .BytesPerBlock = 2,
1935       .Swizzle = { 0, 1, 2, 3 },
1936       .ArrayFormat = 0,
1937    },
1938    {
1939       .Name = MESA_FORMAT_A_UINT8,
1940       .StrName = "MESA_FORMAT_A_UINT8",
1941       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1942       .BaseFormat = GL_ALPHA,
1943       .DataType = GL_UNSIGNED_INT,
1944       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
1945       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1946       .IsSRGBFormat = 0,
1947       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1948       .BytesPerBlock = 1,
1949       .Swizzle = { 4, 4, 4, 0 },
1950       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 1, 4, 4, 4, 0),
1951    },
1952    {
1953       .Name = MESA_FORMAT_A_UINT16,
1954       .StrName = "MESA_FORMAT_A_UINT16",
1955       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1956       .BaseFormat = GL_ALPHA,
1957       .DataType = GL_UNSIGNED_INT,
1958       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
1959       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1960       .IsSRGBFormat = 0,
1961       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1962       .BytesPerBlock = 2,
1963       .Swizzle = { 4, 4, 4, 0 },
1964       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 1, 4, 4, 4, 0),
1965    },
1966    {
1967       .Name = MESA_FORMAT_A_UINT32,
1968       .StrName = "MESA_FORMAT_A_UINT32",
1969       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1970       .BaseFormat = GL_ALPHA,
1971       .DataType = GL_UNSIGNED_INT,
1972       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 32,
1973       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1974       .IsSRGBFormat = 0,
1975       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1976       .BytesPerBlock = 4,
1977       .Swizzle = { 4, 4, 4, 0 },
1978       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 1, 4, 4, 4, 0),
1979    },
1980    {
1981       .Name = MESA_FORMAT_A_SINT8,
1982       .StrName = "MESA_FORMAT_A_SINT8",
1983       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1984       .BaseFormat = GL_ALPHA,
1985       .DataType = GL_INT,
1986       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
1987       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
1988       .IsSRGBFormat = 0,
1989       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
1990       .BytesPerBlock = 1,
1991       .Swizzle = { 4, 4, 4, 0 },
1992       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 1, 4, 4, 4, 0),
1993    },
1994    {
1995       .Name = MESA_FORMAT_A_SINT16,
1996       .StrName = "MESA_FORMAT_A_SINT16",
1997       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
1998       .BaseFormat = GL_ALPHA,
1999       .DataType = GL_INT,
2000       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
2001       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2002       .IsSRGBFormat = 0,
2003       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2004       .BytesPerBlock = 2,
2005       .Swizzle = { 4, 4, 4, 0 },
2006       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 1, 4, 4, 4, 0),
2007    },
2008    {
2009       .Name = MESA_FORMAT_A_SINT32,
2010       .StrName = "MESA_FORMAT_A_SINT32",
2011       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2012       .BaseFormat = GL_ALPHA,
2013       .DataType = GL_INT,
2014       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 32,
2015       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2016       .IsSRGBFormat = 0,
2017       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2018       .BytesPerBlock = 4,
2019       .Swizzle = { 4, 4, 4, 0 },
2020       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 1, 4, 4, 4, 0),
2021    },
2022    {
2023       .Name = MESA_FORMAT_I_UINT8,
2024       .StrName = "MESA_FORMAT_I_UINT8",
2025       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2026       .BaseFormat = GL_INTENSITY,
2027       .DataType = GL_UNSIGNED_INT,
2028       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2029       .LuminanceBits = 0, .IntensityBits = 8, .DepthBits = 0, .StencilBits = 0,
2030       .IsSRGBFormat = 0,
2031       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2032       .BytesPerBlock = 1,
2033       .Swizzle = { 0, 0, 0, 0 },
2034       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 1, 0, 0, 0, 0),
2035    },
2036    {
2037       .Name = MESA_FORMAT_I_UINT16,
2038       .StrName = "MESA_FORMAT_I_UINT16",
2039       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2040       .BaseFormat = GL_INTENSITY,
2041       .DataType = GL_UNSIGNED_INT,
2042       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2043       .LuminanceBits = 0, .IntensityBits = 16, .DepthBits = 0, .StencilBits = 0,
2044       .IsSRGBFormat = 0,
2045       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2046       .BytesPerBlock = 2,
2047       .Swizzle = { 0, 0, 0, 0 },
2048       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 1, 0, 0, 0, 0),
2049    },
2050    {
2051       .Name = MESA_FORMAT_I_UINT32,
2052       .StrName = "MESA_FORMAT_I_UINT32",
2053       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2054       .BaseFormat = GL_INTENSITY,
2055       .DataType = GL_UNSIGNED_INT,
2056       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2057       .LuminanceBits = 0, .IntensityBits = 32, .DepthBits = 0, .StencilBits = 0,
2058       .IsSRGBFormat = 0,
2059       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2060       .BytesPerBlock = 4,
2061       .Swizzle = { 0, 0, 0, 0 },
2062       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 1, 0, 0, 0, 0),
2063    },
2064    {
2065       .Name = MESA_FORMAT_I_SINT8,
2066       .StrName = "MESA_FORMAT_I_SINT8",
2067       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2068       .BaseFormat = GL_INTENSITY,
2069       .DataType = GL_INT,
2070       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2071       .LuminanceBits = 0, .IntensityBits = 8, .DepthBits = 0, .StencilBits = 0,
2072       .IsSRGBFormat = 0,
2073       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2074       .BytesPerBlock = 1,
2075       .Swizzle = { 0, 0, 0, 0 },
2076       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 1, 0, 0, 0, 0),
2077    },
2078    {
2079       .Name = MESA_FORMAT_I_SINT16,
2080       .StrName = "MESA_FORMAT_I_SINT16",
2081       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2082       .BaseFormat = GL_INTENSITY,
2083       .DataType = GL_INT,
2084       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2085       .LuminanceBits = 0, .IntensityBits = 16, .DepthBits = 0, .StencilBits = 0,
2086       .IsSRGBFormat = 0,
2087       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2088       .BytesPerBlock = 2,
2089       .Swizzle = { 0, 0, 0, 0 },
2090       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 1, 0, 0, 0, 0),
2091    },
2092    {
2093       .Name = MESA_FORMAT_I_SINT32,
2094       .StrName = "MESA_FORMAT_I_SINT32",
2095       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2096       .BaseFormat = GL_INTENSITY,
2097       .DataType = GL_INT,
2098       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2099       .LuminanceBits = 0, .IntensityBits = 32, .DepthBits = 0, .StencilBits = 0,
2100       .IsSRGBFormat = 0,
2101       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2102       .BytesPerBlock = 4,
2103       .Swizzle = { 0, 0, 0, 0 },
2104       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 1, 0, 0, 0, 0),
2105    },
2106    {
2107       .Name = MESA_FORMAT_L_UINT8,
2108       .StrName = "MESA_FORMAT_L_UINT8",
2109       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2110       .BaseFormat = GL_LUMINANCE,
2111       .DataType = GL_UNSIGNED_INT,
2112       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2113       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2114       .IsSRGBFormat = 0,
2115       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2116       .BytesPerBlock = 1,
2117       .Swizzle = { 0, 0, 0, 5 },
2118       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 1, 0, 0, 0, 5),
2119    },
2120    {
2121       .Name = MESA_FORMAT_L_UINT16,
2122       .StrName = "MESA_FORMAT_L_UINT16",
2123       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2124       .BaseFormat = GL_LUMINANCE,
2125       .DataType = GL_UNSIGNED_INT,
2126       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2127       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2128       .IsSRGBFormat = 0,
2129       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2130       .BytesPerBlock = 2,
2131       .Swizzle = { 0, 0, 0, 5 },
2132       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 1, 0, 0, 0, 5),
2133    },
2134    {
2135       .Name = MESA_FORMAT_L_UINT32,
2136       .StrName = "MESA_FORMAT_L_UINT32",
2137       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2138       .BaseFormat = GL_LUMINANCE,
2139       .DataType = GL_UNSIGNED_INT,
2140       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2141       .LuminanceBits = 32, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2142       .IsSRGBFormat = 0,
2143       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2144       .BytesPerBlock = 4,
2145       .Swizzle = { 0, 0, 0, 5 },
2146       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 1, 0, 0, 0, 5),
2147    },
2148    {
2149       .Name = MESA_FORMAT_L_SINT8,
2150       .StrName = "MESA_FORMAT_L_SINT8",
2151       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2152       .BaseFormat = GL_LUMINANCE,
2153       .DataType = GL_INT,
2154       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2155       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2156       .IsSRGBFormat = 0,
2157       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2158       .BytesPerBlock = 1,
2159       .Swizzle = { 0, 0, 0, 5 },
2160       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 1, 0, 0, 0, 5),
2161    },
2162    {
2163       .Name = MESA_FORMAT_L_SINT16,
2164       .StrName = "MESA_FORMAT_L_SINT16",
2165       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2166       .BaseFormat = GL_LUMINANCE,
2167       .DataType = GL_INT,
2168       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2169       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2170       .IsSRGBFormat = 0,
2171       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2172       .BytesPerBlock = 2,
2173       .Swizzle = { 0, 0, 0, 5 },
2174       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 1, 0, 0, 0, 5),
2175    },
2176    {
2177       .Name = MESA_FORMAT_L_SINT32,
2178       .StrName = "MESA_FORMAT_L_SINT32",
2179       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2180       .BaseFormat = GL_LUMINANCE,
2181       .DataType = GL_INT,
2182       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2183       .LuminanceBits = 32, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2184       .IsSRGBFormat = 0,
2185       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2186       .BytesPerBlock = 4,
2187       .Swizzle = { 0, 0, 0, 5 },
2188       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 1, 0, 0, 0, 5),
2189    },
2190    {
2191       .Name = MESA_FORMAT_LA_UINT8,
2192       .StrName = "MESA_FORMAT_LA_UINT8",
2193       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2194       .BaseFormat = GL_LUMINANCE_ALPHA,
2195       .DataType = GL_UNSIGNED_INT,
2196       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
2197       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2198       .IsSRGBFormat = 0,
2199       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2200       .BytesPerBlock = 2,
2201       .Swizzle = { 0, 0, 0, 1 },
2202       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 2, 0, 0, 0, 1),
2203    },
2204    {
2205       .Name = MESA_FORMAT_LA_UINT16,
2206       .StrName = "MESA_FORMAT_LA_UINT16",
2207       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2208       .BaseFormat = GL_LUMINANCE_ALPHA,
2209       .DataType = GL_UNSIGNED_INT,
2210       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
2211       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2212       .IsSRGBFormat = 0,
2213       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2214       .BytesPerBlock = 4,
2215       .Swizzle = { 0, 0, 0, 1 },
2216       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 2, 0, 0, 0, 1),
2217    },
2218    {
2219       .Name = MESA_FORMAT_LA_UINT32,
2220       .StrName = "MESA_FORMAT_LA_UINT32",
2221       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2222       .BaseFormat = GL_LUMINANCE_ALPHA,
2223       .DataType = GL_UNSIGNED_INT,
2224       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 32,
2225       .LuminanceBits = 32, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2226       .IsSRGBFormat = 0,
2227       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2228       .BytesPerBlock = 8,
2229       .Swizzle = { 0, 0, 0, 1 },
2230       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 2, 0, 0, 0, 1),
2231    },
2232    {
2233       .Name = MESA_FORMAT_LA_SINT8,
2234       .StrName = "MESA_FORMAT_LA_SINT8",
2235       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2236       .BaseFormat = GL_LUMINANCE_ALPHA,
2237       .DataType = GL_INT,
2238       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
2239       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2240       .IsSRGBFormat = 0,
2241       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2242       .BytesPerBlock = 2,
2243       .Swizzle = { 0, 0, 0, 1 },
2244       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 2, 0, 0, 0, 1),
2245    },
2246    {
2247       .Name = MESA_FORMAT_LA_SINT16,
2248       .StrName = "MESA_FORMAT_LA_SINT16",
2249       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2250       .BaseFormat = GL_LUMINANCE_ALPHA,
2251       .DataType = GL_INT,
2252       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 16,
2253       .LuminanceBits = 16, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2254       .IsSRGBFormat = 0,
2255       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2256       .BytesPerBlock = 4,
2257       .Swizzle = { 0, 0, 0, 1 },
2258       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 2, 0, 0, 0, 1),
2259    },
2260    {
2261       .Name = MESA_FORMAT_LA_SINT32,
2262       .StrName = "MESA_FORMAT_LA_SINT32",
2263       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2264       .BaseFormat = GL_LUMINANCE_ALPHA,
2265       .DataType = GL_INT,
2266       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 32,
2267       .LuminanceBits = 32, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2268       .IsSRGBFormat = 0,
2269       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2270       .BytesPerBlock = 8,
2271       .Swizzle = { 0, 0, 0, 1 },
2272       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 2, 0, 0, 0, 1),
2273    },
2274    {
2275       .Name = MESA_FORMAT_R_UINT8,
2276       .StrName = "MESA_FORMAT_R_UINT8",
2277       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2278       .BaseFormat = GL_RED,
2279       .DataType = GL_UNSIGNED_INT,
2280       .RedBits = 8, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2281       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2282       .IsSRGBFormat = 0,
2283       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2284       .BytesPerBlock = 1,
2285       .Swizzle = { 0, 4, 4, 5 },
2286       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 1, 0, 4, 4, 5),
2287    },
2288    {
2289       .Name = MESA_FORMAT_R_UINT16,
2290       .StrName = "MESA_FORMAT_R_UINT16",
2291       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2292       .BaseFormat = GL_RED,
2293       .DataType = GL_UNSIGNED_INT,
2294       .RedBits = 16, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2295       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2296       .IsSRGBFormat = 0,
2297       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2298       .BytesPerBlock = 2,
2299       .Swizzle = { 0, 4, 4, 5 },
2300       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 1, 0, 4, 4, 5),
2301    },
2302    {
2303       .Name = MESA_FORMAT_R_UINT32,
2304       .StrName = "MESA_FORMAT_R_UINT32",
2305       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2306       .BaseFormat = GL_RED,
2307       .DataType = GL_UNSIGNED_INT,
2308       .RedBits = 32, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2309       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2310       .IsSRGBFormat = 0,
2311       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2312       .BytesPerBlock = 4,
2313       .Swizzle = { 0, 4, 4, 5 },
2314       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 1, 0, 4, 4, 5),
2315    },
2316    {
2317       .Name = MESA_FORMAT_R_SINT8,
2318       .StrName = "MESA_FORMAT_R_SINT8",
2319       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2320       .BaseFormat = GL_RED,
2321       .DataType = GL_INT,
2322       .RedBits = 8, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2323       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2324       .IsSRGBFormat = 0,
2325       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2326       .BytesPerBlock = 1,
2327       .Swizzle = { 0, 4, 4, 5 },
2328       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 1, 0, 4, 4, 5),
2329    },
2330    {
2331       .Name = MESA_FORMAT_R_SINT16,
2332       .StrName = "MESA_FORMAT_R_SINT16",
2333       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2334       .BaseFormat = GL_RED,
2335       .DataType = GL_INT,
2336       .RedBits = 16, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2337       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2338       .IsSRGBFormat = 0,
2339       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2340       .BytesPerBlock = 2,
2341       .Swizzle = { 0, 4, 4, 5 },
2342       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 1, 0, 4, 4, 5),
2343    },
2344    {
2345       .Name = MESA_FORMAT_R_SINT32,
2346       .StrName = "MESA_FORMAT_R_SINT32",
2347       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2348       .BaseFormat = GL_RED,
2349       .DataType = GL_INT,
2350       .RedBits = 32, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2351       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2352       .IsSRGBFormat = 0,
2353       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2354       .BytesPerBlock = 4,
2355       .Swizzle = { 0, 4, 4, 5 },
2356       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 1, 0, 4, 4, 5),
2357    },
2358    {
2359       .Name = MESA_FORMAT_RG_UINT8,
2360       .StrName = "MESA_FORMAT_RG_UINT8",
2361       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2362       .BaseFormat = GL_RG,
2363       .DataType = GL_UNSIGNED_INT,
2364       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
2365       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2366       .IsSRGBFormat = 0,
2367       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2368       .BytesPerBlock = 2,
2369       .Swizzle = { 0, 1, 4, 5 },
2370       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 2, 0, 1, 4, 5),
2371    },
2372    {
2373       .Name = MESA_FORMAT_RG_UINT16,
2374       .StrName = "MESA_FORMAT_RG_UINT16",
2375       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2376       .BaseFormat = GL_RG,
2377       .DataType = GL_UNSIGNED_INT,
2378       .RedBits = 16, .GreenBits = 16, .BlueBits = 0, .AlphaBits = 0,
2379       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2380       .IsSRGBFormat = 0,
2381       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2382       .BytesPerBlock = 4,
2383       .Swizzle = { 0, 1, 4, 5 },
2384       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 2, 0, 1, 4, 5),
2385    },
2386    {
2387       .Name = MESA_FORMAT_RG_UINT32,
2388       .StrName = "MESA_FORMAT_RG_UINT32",
2389       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2390       .BaseFormat = GL_RG,
2391       .DataType = GL_UNSIGNED_INT,
2392       .RedBits = 32, .GreenBits = 32, .BlueBits = 0, .AlphaBits = 0,
2393       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2394       .IsSRGBFormat = 0,
2395       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2396       .BytesPerBlock = 8,
2397       .Swizzle = { 0, 1, 4, 5 },
2398       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 2, 0, 1, 4, 5),
2399    },
2400    {
2401       .Name = MESA_FORMAT_RG_SINT8,
2402       .StrName = "MESA_FORMAT_RG_SINT8",
2403       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2404       .BaseFormat = GL_RG,
2405       .DataType = GL_INT,
2406       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
2407       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2408       .IsSRGBFormat = 0,
2409       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2410       .BytesPerBlock = 2,
2411       .Swizzle = { 0, 1, 4, 5 },
2412       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 2, 0, 1, 4, 5),
2413    },
2414    {
2415       .Name = MESA_FORMAT_RG_SINT16,
2416       .StrName = "MESA_FORMAT_RG_SINT16",
2417       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2418       .BaseFormat = GL_RG,
2419       .DataType = GL_INT,
2420       .RedBits = 16, .GreenBits = 16, .BlueBits = 0, .AlphaBits = 0,
2421       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2422       .IsSRGBFormat = 0,
2423       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2424       .BytesPerBlock = 4,
2425       .Swizzle = { 0, 1, 4, 5 },
2426       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 2, 0, 1, 4, 5),
2427    },
2428    {
2429       .Name = MESA_FORMAT_RG_SINT32,
2430       .StrName = "MESA_FORMAT_RG_SINT32",
2431       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2432       .BaseFormat = GL_RG,
2433       .DataType = GL_INT,
2434       .RedBits = 32, .GreenBits = 32, .BlueBits = 0, .AlphaBits = 0,
2435       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2436       .IsSRGBFormat = 0,
2437       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2438       .BytesPerBlock = 8,
2439       .Swizzle = { 0, 1, 4, 5 },
2440       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 2, 0, 1, 4, 5),
2441    },
2442    {
2443       .Name = MESA_FORMAT_RGB_UINT8,
2444       .StrName = "MESA_FORMAT_RGB_UINT8",
2445       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2446       .BaseFormat = GL_RGB,
2447       .DataType = GL_UNSIGNED_INT,
2448       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
2449       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2450       .IsSRGBFormat = 0,
2451       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2452       .BytesPerBlock = 3,
2453       .Swizzle = { 0, 1, 2, 5 },
2454       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 3, 0, 1, 2, 5),
2455    },
2456    {
2457       .Name = MESA_FORMAT_RGB_UINT16,
2458       .StrName = "MESA_FORMAT_RGB_UINT16",
2459       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2460       .BaseFormat = GL_RGB,
2461       .DataType = GL_UNSIGNED_INT,
2462       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
2463       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2464       .IsSRGBFormat = 0,
2465       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2466       .BytesPerBlock = 6,
2467       .Swizzle = { 0, 1, 2, 5 },
2468       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 3, 0, 1, 2, 5),
2469    },
2470    {
2471       .Name = MESA_FORMAT_RGB_UINT32,
2472       .StrName = "MESA_FORMAT_RGB_UINT32",
2473       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2474       .BaseFormat = GL_RGB,
2475       .DataType = GL_UNSIGNED_INT,
2476       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 0,
2477       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2478       .IsSRGBFormat = 0,
2479       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2480       .BytesPerBlock = 12,
2481       .Swizzle = { 0, 1, 2, 5 },
2482       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 3, 0, 1, 2, 5),
2483    },
2484    {
2485       .Name = MESA_FORMAT_RGB_SINT8,
2486       .StrName = "MESA_FORMAT_RGB_SINT8",
2487       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2488       .BaseFormat = GL_RGB,
2489       .DataType = GL_INT,
2490       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
2491       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2492       .IsSRGBFormat = 0,
2493       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2494       .BytesPerBlock = 3,
2495       .Swizzle = { 0, 1, 2, 5 },
2496       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 3, 0, 1, 2, 5),
2497    },
2498    {
2499       .Name = MESA_FORMAT_RGB_SINT16,
2500       .StrName = "MESA_FORMAT_RGB_SINT16",
2501       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2502       .BaseFormat = GL_RGB,
2503       .DataType = GL_INT,
2504       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
2505       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2506       .IsSRGBFormat = 0,
2507       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2508       .BytesPerBlock = 6,
2509       .Swizzle = { 0, 1, 2, 5 },
2510       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 3, 0, 1, 2, 5),
2511    },
2512    {
2513       .Name = MESA_FORMAT_RGB_SINT32,
2514       .StrName = "MESA_FORMAT_RGB_SINT32",
2515       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2516       .BaseFormat = GL_RGB,
2517       .DataType = GL_INT,
2518       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 0,
2519       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2520       .IsSRGBFormat = 0,
2521       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2522       .BytesPerBlock = 12,
2523       .Swizzle = { 0, 1, 2, 5 },
2524       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 3, 0, 1, 2, 5),
2525    },
2526    {
2527       .Name = MESA_FORMAT_RGBA_UINT8,
2528       .StrName = "MESA_FORMAT_RGBA_UINT8",
2529       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2530       .BaseFormat = GL_RGBA,
2531       .DataType = GL_UNSIGNED_INT,
2532       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
2533       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2534       .IsSRGBFormat = 0,
2535       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2536       .BytesPerBlock = 4,
2537       .Swizzle = { 0, 1, 2, 3 },
2538       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 4, 0, 1, 2, 3),
2539    },
2540    {
2541       .Name = MESA_FORMAT_RGBA_UINT16,
2542       .StrName = "MESA_FORMAT_RGBA_UINT16",
2543       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2544       .BaseFormat = GL_RGBA,
2545       .DataType = GL_UNSIGNED_INT,
2546       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
2547       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2548       .IsSRGBFormat = 0,
2549       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2550       .BytesPerBlock = 8,
2551       .Swizzle = { 0, 1, 2, 3 },
2552       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 4, 0, 1, 2, 3),
2553    },
2554    {
2555       .Name = MESA_FORMAT_RGBA_UINT32,
2556       .StrName = "MESA_FORMAT_RGBA_UINT32",
2557       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2558       .BaseFormat = GL_RGBA,
2559       .DataType = GL_UNSIGNED_INT,
2560       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 32,
2561       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2562       .IsSRGBFormat = 0,
2563       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2564       .BytesPerBlock = 16,
2565       .Swizzle = { 0, 1, 2, 3 },
2566       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 4, 0, 1, 2, 3),
2567    },
2568    {
2569       .Name = MESA_FORMAT_RGBA_SINT8,
2570       .StrName = "MESA_FORMAT_RGBA_SINT8",
2571       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2572       .BaseFormat = GL_RGBA,
2573       .DataType = GL_INT,
2574       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
2575       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2576       .IsSRGBFormat = 0,
2577       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2578       .BytesPerBlock = 4,
2579       .Swizzle = { 0, 1, 2, 3 },
2580       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 4, 0, 1, 2, 3),
2581    },
2582    {
2583       .Name = MESA_FORMAT_RGBA_SINT16,
2584       .StrName = "MESA_FORMAT_RGBA_SINT16",
2585       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2586       .BaseFormat = GL_RGBA,
2587       .DataType = GL_INT,
2588       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
2589       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2590       .IsSRGBFormat = 0,
2591       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2592       .BytesPerBlock = 8,
2593       .Swizzle = { 0, 1, 2, 3 },
2594       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 4, 0, 1, 2, 3),
2595    },
2596    {
2597       .Name = MESA_FORMAT_RGBA_SINT32,
2598       .StrName = "MESA_FORMAT_RGBA_SINT32",
2599       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2600       .BaseFormat = GL_RGBA,
2601       .DataType = GL_INT,
2602       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 32,
2603       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2604       .IsSRGBFormat = 0,
2605       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2606       .BytesPerBlock = 16,
2607       .Swizzle = { 0, 1, 2, 3 },
2608       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 4, 0, 1, 2, 3),
2609    },
2610    {
2611       .Name = MESA_FORMAT_RGBX_UINT8,
2612       .StrName = "MESA_FORMAT_RGBX_UINT8",
2613       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2614       .BaseFormat = GL_RGB,
2615       .DataType = GL_UNSIGNED_INT,
2616       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
2617       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2618       .IsSRGBFormat = 0,
2619       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2620       .BytesPerBlock = 4,
2621       .Swizzle = { 0, 1, 2, 5 },
2622       .ArrayFormat = MESA_ARRAY_FORMAT(1, 0, 0, 0, 4, 0, 1, 2, 5),
2623    },
2624    {
2625       .Name = MESA_FORMAT_RGBX_UINT16,
2626       .StrName = "MESA_FORMAT_RGBX_UINT16",
2627       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2628       .BaseFormat = GL_RGB,
2629       .DataType = GL_UNSIGNED_INT,
2630       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
2631       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2632       .IsSRGBFormat = 0,
2633       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2634       .BytesPerBlock = 8,
2635       .Swizzle = { 0, 1, 2, 5 },
2636       .ArrayFormat = MESA_ARRAY_FORMAT(2, 0, 0, 0, 4, 0, 1, 2, 5),
2637    },
2638    {
2639       .Name = MESA_FORMAT_RGBX_UINT32,
2640       .StrName = "MESA_FORMAT_RGBX_UINT32",
2641       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2642       .BaseFormat = GL_RGB,
2643       .DataType = GL_UNSIGNED_INT,
2644       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 0,
2645       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2646       .IsSRGBFormat = 0,
2647       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2648       .BytesPerBlock = 16,
2649       .Swizzle = { 0, 1, 2, 5 },
2650       .ArrayFormat = MESA_ARRAY_FORMAT(4, 0, 0, 0, 4, 0, 1, 2, 5),
2651    },
2652    {
2653       .Name = MESA_FORMAT_RGBX_SINT8,
2654       .StrName = "MESA_FORMAT_RGBX_SINT8",
2655       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2656       .BaseFormat = GL_RGB,
2657       .DataType = GL_INT,
2658       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
2659       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2660       .IsSRGBFormat = 0,
2661       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2662       .BytesPerBlock = 4,
2663       .Swizzle = { 0, 1, 2, 5 },
2664       .ArrayFormat = MESA_ARRAY_FORMAT(1, 1, 0, 0, 4, 0, 1, 2, 5),
2665    },
2666    {
2667       .Name = MESA_FORMAT_RGBX_SINT16,
2668       .StrName = "MESA_FORMAT_RGBX_SINT16",
2669       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2670       .BaseFormat = GL_RGB,
2671       .DataType = GL_INT,
2672       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
2673       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2674       .IsSRGBFormat = 0,
2675       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2676       .BytesPerBlock = 8,
2677       .Swizzle = { 0, 1, 2, 5 },
2678       .ArrayFormat = MESA_ARRAY_FORMAT(2, 1, 0, 0, 4, 0, 1, 2, 5),
2679    },
2680    {
2681       .Name = MESA_FORMAT_RGBX_SINT32,
2682       .StrName = "MESA_FORMAT_RGBX_SINT32",
2683       .Layout = MESA_FORMAT_LAYOUT_ARRAY,
2684       .BaseFormat = GL_RGB,
2685       .DataType = GL_INT,
2686       .RedBits = 32, .GreenBits = 32, .BlueBits = 32, .AlphaBits = 0,
2687       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2688       .IsSRGBFormat = 0,
2689       .BlockWidth = 1, .BlockHeight = 1, .BlockDepth = 1,
2690       .BytesPerBlock = 16,
2691       .Swizzle = { 0, 1, 2, 5 },
2692       .ArrayFormat = MESA_ARRAY_FORMAT(4, 1, 0, 0, 4, 0, 1, 2, 5),
2693    },
2694    {
2695       .Name = MESA_FORMAT_RGB_DXT1,
2696       .StrName = "MESA_FORMAT_RGB_DXT1",
2697       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2698       .BaseFormat = GL_RGB,
2699       .DataType = GL_UNSIGNED_NORMALIZED,
2700       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 0,
2701       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2702       .IsSRGBFormat = 0,
2703       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2704       .BytesPerBlock = 8,
2705       .Swizzle = { 0, 1, 2, 5 },
2706       .ArrayFormat = 0,
2707    },
2708    {
2709       .Name = MESA_FORMAT_RGBA_DXT1,
2710       .StrName = "MESA_FORMAT_RGBA_DXT1",
2711       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2712       .BaseFormat = GL_RGBA,
2713       .DataType = GL_UNSIGNED_NORMALIZED,
2714       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
2715       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2716       .IsSRGBFormat = 0,
2717       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2718       .BytesPerBlock = 8,
2719       .Swizzle = { 0, 1, 2, 3 },
2720       .ArrayFormat = 0,
2721    },
2722    {
2723       .Name = MESA_FORMAT_RGBA_DXT3,
2724       .StrName = "MESA_FORMAT_RGBA_DXT3",
2725       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2726       .BaseFormat = GL_RGBA,
2727       .DataType = GL_UNSIGNED_NORMALIZED,
2728       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
2729       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2730       .IsSRGBFormat = 0,
2731       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2732       .BytesPerBlock = 16,
2733       .Swizzle = { 0, 1, 2, 3 },
2734       .ArrayFormat = 0,
2735    },
2736    {
2737       .Name = MESA_FORMAT_RGBA_DXT5,
2738       .StrName = "MESA_FORMAT_RGBA_DXT5",
2739       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2740       .BaseFormat = GL_RGBA,
2741       .DataType = GL_UNSIGNED_NORMALIZED,
2742       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
2743       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2744       .IsSRGBFormat = 0,
2745       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2746       .BytesPerBlock = 16,
2747       .Swizzle = { 0, 1, 2, 3 },
2748       .ArrayFormat = 0,
2749    },
2750    {
2751       .Name = MESA_FORMAT_SRGB_DXT1,
2752       .StrName = "MESA_FORMAT_SRGB_DXT1",
2753       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2754       .BaseFormat = GL_RGB,
2755       .DataType = GL_UNSIGNED_NORMALIZED,
2756       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 0,
2757       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2758       .IsSRGBFormat = 1,
2759       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2760       .BytesPerBlock = 8,
2761       .Swizzle = { 0, 1, 2, 5 },
2762       .ArrayFormat = 0,
2763    },
2764    {
2765       .Name = MESA_FORMAT_SRGBA_DXT1,
2766       .StrName = "MESA_FORMAT_SRGBA_DXT1",
2767       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2768       .BaseFormat = GL_RGBA,
2769       .DataType = GL_UNSIGNED_NORMALIZED,
2770       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
2771       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2772       .IsSRGBFormat = 1,
2773       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2774       .BytesPerBlock = 8,
2775       .Swizzle = { 0, 1, 2, 3 },
2776       .ArrayFormat = 0,
2777    },
2778    {
2779       .Name = MESA_FORMAT_SRGBA_DXT3,
2780       .StrName = "MESA_FORMAT_SRGBA_DXT3",
2781       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2782       .BaseFormat = GL_RGBA,
2783       .DataType = GL_UNSIGNED_NORMALIZED,
2784       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
2785       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2786       .IsSRGBFormat = 1,
2787       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2788       .BytesPerBlock = 16,
2789       .Swizzle = { 0, 1, 2, 3 },
2790       .ArrayFormat = 0,
2791    },
2792    {
2793       .Name = MESA_FORMAT_SRGBA_DXT5,
2794       .StrName = "MESA_FORMAT_SRGBA_DXT5",
2795       .Layout = MESA_FORMAT_LAYOUT_S3TC,
2796       .BaseFormat = GL_RGBA,
2797       .DataType = GL_UNSIGNED_NORMALIZED,
2798       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 4,
2799       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2800       .IsSRGBFormat = 1,
2801       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2802       .BytesPerBlock = 16,
2803       .Swizzle = { 0, 1, 2, 3 },
2804       .ArrayFormat = 0,
2805    },
2806    {
2807       .Name = MESA_FORMAT_RGB_FXT1,
2808       .StrName = "MESA_FORMAT_RGB_FXT1",
2809       .Layout = MESA_FORMAT_LAYOUT_FXT1,
2810       .BaseFormat = GL_RGB,
2811       .DataType = GL_UNSIGNED_NORMALIZED,
2812       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 0,
2813       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2814       .IsSRGBFormat = 0,
2815       .BlockWidth = 8, .BlockHeight = 4, .BlockDepth = 1,
2816       .BytesPerBlock = 16,
2817       .Swizzle = { 0, 1, 2, 5 },
2818       .ArrayFormat = 0,
2819    },
2820    {
2821       .Name = MESA_FORMAT_RGBA_FXT1,
2822       .StrName = "MESA_FORMAT_RGBA_FXT1",
2823       .Layout = MESA_FORMAT_LAYOUT_FXT1,
2824       .BaseFormat = GL_RGBA,
2825       .DataType = GL_UNSIGNED_NORMALIZED,
2826       .RedBits = 4, .GreenBits = 4, .BlueBits = 4, .AlphaBits = 1,
2827       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2828       .IsSRGBFormat = 0,
2829       .BlockWidth = 8, .BlockHeight = 4, .BlockDepth = 1,
2830       .BytesPerBlock = 16,
2831       .Swizzle = { 0, 1, 2, 3 },
2832       .ArrayFormat = 0,
2833    },
2834    {
2835       .Name = MESA_FORMAT_R_RGTC1_UNORM,
2836       .StrName = "MESA_FORMAT_R_RGTC1_UNORM",
2837       .Layout = MESA_FORMAT_LAYOUT_RGTC,
2838       .BaseFormat = GL_RED,
2839       .DataType = GL_UNSIGNED_NORMALIZED,
2840       .RedBits = 8, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2841       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2842       .IsSRGBFormat = 0,
2843       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2844       .BytesPerBlock = 8,
2845       .Swizzle = { 0, 4, 4, 5 },
2846       .ArrayFormat = 0,
2847    },
2848    {
2849       .Name = MESA_FORMAT_R_RGTC1_SNORM,
2850       .StrName = "MESA_FORMAT_R_RGTC1_SNORM",
2851       .Layout = MESA_FORMAT_LAYOUT_RGTC,
2852       .BaseFormat = GL_RED,
2853       .DataType = GL_SIGNED_NORMALIZED,
2854       .RedBits = 8, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2855       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2856       .IsSRGBFormat = 0,
2857       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2858       .BytesPerBlock = 8,
2859       .Swizzle = { 0, 4, 4, 5 },
2860       .ArrayFormat = 0,
2861    },
2862    {
2863       .Name = MESA_FORMAT_RG_RGTC2_UNORM,
2864       .StrName = "MESA_FORMAT_RG_RGTC2_UNORM",
2865       .Layout = MESA_FORMAT_LAYOUT_RGTC,
2866       .BaseFormat = GL_RG,
2867       .DataType = GL_UNSIGNED_NORMALIZED,
2868       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
2869       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2870       .IsSRGBFormat = 0,
2871       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2872       .BytesPerBlock = 16,
2873       .Swizzle = { 0, 1, 4, 5 },
2874       .ArrayFormat = 0,
2875    },
2876    {
2877       .Name = MESA_FORMAT_RG_RGTC2_SNORM,
2878       .StrName = "MESA_FORMAT_RG_RGTC2_SNORM",
2879       .Layout = MESA_FORMAT_LAYOUT_RGTC,
2880       .BaseFormat = GL_RG,
2881       .DataType = GL_SIGNED_NORMALIZED,
2882       .RedBits = 8, .GreenBits = 8, .BlueBits = 0, .AlphaBits = 0,
2883       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2884       .IsSRGBFormat = 0,
2885       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2886       .BytesPerBlock = 16,
2887       .Swizzle = { 0, 1, 4, 5 },
2888       .ArrayFormat = 0,
2889    },
2890    {
2891       .Name = MESA_FORMAT_L_LATC1_UNORM,
2892       .StrName = "MESA_FORMAT_L_LATC1_UNORM",
2893       .Layout = MESA_FORMAT_LAYOUT_LATC,
2894       .BaseFormat = GL_LUMINANCE,
2895       .DataType = GL_UNSIGNED_NORMALIZED,
2896       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2897       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2898       .IsSRGBFormat = 0,
2899       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2900       .BytesPerBlock = 8,
2901       .Swizzle = { 0, 0, 0, 5 },
2902       .ArrayFormat = 0,
2903    },
2904    {
2905       .Name = MESA_FORMAT_L_LATC1_SNORM,
2906       .StrName = "MESA_FORMAT_L_LATC1_SNORM",
2907       .Layout = MESA_FORMAT_LAYOUT_LATC,
2908       .BaseFormat = GL_LUMINANCE,
2909       .DataType = GL_SIGNED_NORMALIZED,
2910       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
2911       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2912       .IsSRGBFormat = 0,
2913       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2914       .BytesPerBlock = 8,
2915       .Swizzle = { 0, 0, 0, 5 },
2916       .ArrayFormat = 0,
2917    },
2918    {
2919       .Name = MESA_FORMAT_LA_LATC2_UNORM,
2920       .StrName = "MESA_FORMAT_LA_LATC2_UNORM",
2921       .Layout = MESA_FORMAT_LAYOUT_LATC,
2922       .BaseFormat = GL_LUMINANCE_ALPHA,
2923       .DataType = GL_UNSIGNED_NORMALIZED,
2924       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
2925       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2926       .IsSRGBFormat = 0,
2927       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2928       .BytesPerBlock = 16,
2929       .Swizzle = { 0, 0, 0, 1 },
2930       .ArrayFormat = 0,
2931    },
2932    {
2933       .Name = MESA_FORMAT_LA_LATC2_SNORM,
2934       .StrName = "MESA_FORMAT_LA_LATC2_SNORM",
2935       .Layout = MESA_FORMAT_LAYOUT_LATC,
2936       .BaseFormat = GL_LUMINANCE_ALPHA,
2937       .DataType = GL_SIGNED_NORMALIZED,
2938       .RedBits = 0, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 8,
2939       .LuminanceBits = 8, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2940       .IsSRGBFormat = 0,
2941       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2942       .BytesPerBlock = 16,
2943       .Swizzle = { 0, 0, 0, 1 },
2944       .ArrayFormat = 0,
2945    },
2946    {
2947       .Name = MESA_FORMAT_ETC1_RGB8,
2948       .StrName = "MESA_FORMAT_ETC1_RGB8",
2949       .Layout = MESA_FORMAT_LAYOUT_ETC1,
2950       .BaseFormat = GL_RGB,
2951       .DataType = GL_UNSIGNED_NORMALIZED,
2952       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
2953       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2954       .IsSRGBFormat = 0,
2955       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2956       .BytesPerBlock = 8,
2957       .Swizzle = { 0, 1, 2, 5 },
2958       .ArrayFormat = 0,
2959    },
2960    {
2961       .Name = MESA_FORMAT_ETC2_RGB8,
2962       .StrName = "MESA_FORMAT_ETC2_RGB8",
2963       .Layout = MESA_FORMAT_LAYOUT_ETC2,
2964       .BaseFormat = GL_RGB,
2965       .DataType = GL_UNSIGNED_NORMALIZED,
2966       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
2967       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2968       .IsSRGBFormat = 0,
2969       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2970       .BytesPerBlock = 8,
2971       .Swizzle = { 0, 1, 2, 5 },
2972       .ArrayFormat = 0,
2973    },
2974    {
2975       .Name = MESA_FORMAT_ETC2_SRGB8,
2976       .StrName = "MESA_FORMAT_ETC2_SRGB8",
2977       .Layout = MESA_FORMAT_LAYOUT_ETC2,
2978       .BaseFormat = GL_RGB,
2979       .DataType = GL_UNSIGNED_NORMALIZED,
2980       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 0,
2981       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2982       .IsSRGBFormat = 1,
2983       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2984       .BytesPerBlock = 8,
2985       .Swizzle = { 0, 1, 2, 5 },
2986       .ArrayFormat = 0,
2987    },
2988    {
2989       .Name = MESA_FORMAT_ETC2_RGBA8_EAC,
2990       .StrName = "MESA_FORMAT_ETC2_RGBA8_EAC",
2991       .Layout = MESA_FORMAT_LAYOUT_ETC2,
2992       .BaseFormat = GL_RGBA,
2993       .DataType = GL_UNSIGNED_NORMALIZED,
2994       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
2995       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
2996       .IsSRGBFormat = 0,
2997       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
2998       .BytesPerBlock = 16,
2999       .Swizzle = { 0, 1, 2, 3 },
3000       .ArrayFormat = 0,
3001    },
3002    {
3003       .Name = MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC,
3004       .StrName = "MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC",
3005       .Layout = MESA_FORMAT_LAYOUT_ETC2,
3006       .BaseFormat = GL_RGBA,
3007       .DataType = GL_UNSIGNED_NORMALIZED,
3008       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3009       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3010       .IsSRGBFormat = 1,
3011       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3012       .BytesPerBlock = 16,
3013       .Swizzle = { 0, 1, 2, 3 },
3014       .ArrayFormat = 0,
3015    },
3016    {
3017       .Name = MESA_FORMAT_ETC2_R11_EAC,
3018       .StrName = "MESA_FORMAT_ETC2_R11_EAC",
3019       .Layout = MESA_FORMAT_LAYOUT_ETC2,
3020       .BaseFormat = GL_RED,
3021       .DataType = GL_UNSIGNED_NORMALIZED,
3022       .RedBits = 11, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
3023       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3024       .IsSRGBFormat = 0,
3025       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3026       .BytesPerBlock = 8,
3027       .Swizzle = { 0, 4, 4, 5 },
3028       .ArrayFormat = 0,
3029    },
3030    {
3031       .Name = MESA_FORMAT_ETC2_RG11_EAC,
3032       .StrName = "MESA_FORMAT_ETC2_RG11_EAC",
3033       .Layout = MESA_FORMAT_LAYOUT_ETC2,
3034       .BaseFormat = GL_RG,
3035       .DataType = GL_UNSIGNED_NORMALIZED,
3036       .RedBits = 11, .GreenBits = 11, .BlueBits = 0, .AlphaBits = 0,
3037       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3038       .IsSRGBFormat = 0,
3039       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3040       .BytesPerBlock = 16,
3041       .Swizzle = { 0, 1, 4, 5 },
3042       .ArrayFormat = 0,
3043    },
3044    {
3045       .Name = MESA_FORMAT_ETC2_SIGNED_R11_EAC,
3046       .StrName = "MESA_FORMAT_ETC2_SIGNED_R11_EAC",
3047       .Layout = MESA_FORMAT_LAYOUT_ETC2,
3048       .BaseFormat = GL_RED,
3049       .DataType = GL_SIGNED_NORMALIZED,
3050       .RedBits = 11, .GreenBits = 0, .BlueBits = 0, .AlphaBits = 0,
3051       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3052       .IsSRGBFormat = 0,
3053       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3054       .BytesPerBlock = 8,
3055       .Swizzle = { 0, 4, 4, 5 },
3056       .ArrayFormat = 0,
3057    },
3058    {
3059       .Name = MESA_FORMAT_ETC2_SIGNED_RG11_EAC,
3060       .StrName = "MESA_FORMAT_ETC2_SIGNED_RG11_EAC",
3061       .Layout = MESA_FORMAT_LAYOUT_ETC2,
3062       .BaseFormat = GL_RG,
3063       .DataType = GL_SIGNED_NORMALIZED,
3064       .RedBits = 11, .GreenBits = 11, .BlueBits = 0, .AlphaBits = 0,
3065       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3066       .IsSRGBFormat = 0,
3067       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3068       .BytesPerBlock = 16,
3069       .Swizzle = { 0, 1, 4, 5 },
3070       .ArrayFormat = 0,
3071    },
3072    {
3073       .Name = MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1,
3074       .StrName = "MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1",
3075       .Layout = MESA_FORMAT_LAYOUT_ETC2,
3076       .BaseFormat = GL_RGBA,
3077       .DataType = GL_UNSIGNED_NORMALIZED,
3078       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 1,
3079       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3080       .IsSRGBFormat = 0,
3081       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3082       .BytesPerBlock = 8,
3083       .Swizzle = { 0, 1, 2, 3 },
3084       .ArrayFormat = 0,
3085    },
3086    {
3087       .Name = MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1,
3088       .StrName = "MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1",
3089       .Layout = MESA_FORMAT_LAYOUT_ETC2,
3090       .BaseFormat = GL_RGBA,
3091       .DataType = GL_UNSIGNED_NORMALIZED,
3092       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 1,
3093       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3094       .IsSRGBFormat = 1,
3095       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3096       .BytesPerBlock = 8,
3097       .Swizzle = { 0, 1, 2, 3 },
3098       .ArrayFormat = 0,
3099    },
3100    {
3101       .Name = MESA_FORMAT_BPTC_RGBA_UNORM,
3102       .StrName = "MESA_FORMAT_BPTC_RGBA_UNORM",
3103       .Layout = MESA_FORMAT_LAYOUT_BPTC,
3104       .BaseFormat = GL_RGBA,
3105       .DataType = GL_UNSIGNED_NORMALIZED,
3106       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3107       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3108       .IsSRGBFormat = 0,
3109       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3110       .BytesPerBlock = 16,
3111       .Swizzle = { 0, 1, 2, 3 },
3112       .ArrayFormat = 0,
3113    },
3114    {
3115       .Name = MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM,
3116       .StrName = "MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM",
3117       .Layout = MESA_FORMAT_LAYOUT_BPTC,
3118       .BaseFormat = GL_RGBA,
3119       .DataType = GL_UNSIGNED_NORMALIZED,
3120       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3121       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3122       .IsSRGBFormat = 1,
3123       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3124       .BytesPerBlock = 16,
3125       .Swizzle = { 0, 1, 2, 3 },
3126       .ArrayFormat = 0,
3127    },
3128    {
3129       .Name = MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT,
3130       .StrName = "MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT",
3131       .Layout = MESA_FORMAT_LAYOUT_BPTC,
3132       .BaseFormat = GL_RGB,
3133       .DataType = GL_FLOAT,
3134       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
3135       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3136       .IsSRGBFormat = 0,
3137       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3138       .BytesPerBlock = 16,
3139       .Swizzle = { 0, 1, 2, 5 },
3140       .ArrayFormat = 0,
3141    },
3142    {
3143       .Name = MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT,
3144       .StrName = "MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT",
3145       .Layout = MESA_FORMAT_LAYOUT_BPTC,
3146       .BaseFormat = GL_RGB,
3147       .DataType = GL_FLOAT,
3148       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 0,
3149       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3150       .IsSRGBFormat = 0,
3151       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3152       .BytesPerBlock = 16,
3153       .Swizzle = { 0, 1, 2, 5 },
3154       .ArrayFormat = 0,
3155    },
3156    {
3157       .Name = MESA_FORMAT_RGBA_ASTC_4x4,
3158       .StrName = "MESA_FORMAT_RGBA_ASTC_4x4",
3159       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3160       .BaseFormat = GL_RGBA,
3161       .DataType = GL_UNSIGNED_NORMALIZED,
3162       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3163       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3164       .IsSRGBFormat = 0,
3165       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3166       .BytesPerBlock = 16,
3167       .Swizzle = { 0, 1, 2, 3 },
3168       .ArrayFormat = 0,
3169    },
3170    {
3171       .Name = MESA_FORMAT_RGBA_ASTC_5x4,
3172       .StrName = "MESA_FORMAT_RGBA_ASTC_5x4",
3173       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3174       .BaseFormat = GL_RGBA,
3175       .DataType = GL_UNSIGNED_NORMALIZED,
3176       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3177       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3178       .IsSRGBFormat = 0,
3179       .BlockWidth = 5, .BlockHeight = 4, .BlockDepth = 1,
3180       .BytesPerBlock = 16,
3181       .Swizzle = { 0, 1, 2, 3 },
3182       .ArrayFormat = 0,
3183    },
3184    {
3185       .Name = MESA_FORMAT_RGBA_ASTC_5x5,
3186       .StrName = "MESA_FORMAT_RGBA_ASTC_5x5",
3187       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3188       .BaseFormat = GL_RGBA,
3189       .DataType = GL_UNSIGNED_NORMALIZED,
3190       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3191       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3192       .IsSRGBFormat = 0,
3193       .BlockWidth = 5, .BlockHeight = 5, .BlockDepth = 1,
3194       .BytesPerBlock = 16,
3195       .Swizzle = { 0, 1, 2, 3 },
3196       .ArrayFormat = 0,
3197    },
3198    {
3199       .Name = MESA_FORMAT_RGBA_ASTC_6x5,
3200       .StrName = "MESA_FORMAT_RGBA_ASTC_6x5",
3201       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3202       .BaseFormat = GL_RGBA,
3203       .DataType = GL_UNSIGNED_NORMALIZED,
3204       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3205       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3206       .IsSRGBFormat = 0,
3207       .BlockWidth = 6, .BlockHeight = 5, .BlockDepth = 1,
3208       .BytesPerBlock = 16,
3209       .Swizzle = { 0, 1, 2, 3 },
3210       .ArrayFormat = 0,
3211    },
3212    {
3213       .Name = MESA_FORMAT_RGBA_ASTC_6x6,
3214       .StrName = "MESA_FORMAT_RGBA_ASTC_6x6",
3215       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3216       .BaseFormat = GL_RGBA,
3217       .DataType = GL_UNSIGNED_NORMALIZED,
3218       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3219       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3220       .IsSRGBFormat = 0,
3221       .BlockWidth = 6, .BlockHeight = 6, .BlockDepth = 1,
3222       .BytesPerBlock = 16,
3223       .Swizzle = { 0, 1, 2, 3 },
3224       .ArrayFormat = 0,
3225    },
3226    {
3227       .Name = MESA_FORMAT_RGBA_ASTC_8x5,
3228       .StrName = "MESA_FORMAT_RGBA_ASTC_8x5",
3229       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3230       .BaseFormat = GL_RGBA,
3231       .DataType = GL_UNSIGNED_NORMALIZED,
3232       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3233       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3234       .IsSRGBFormat = 0,
3235       .BlockWidth = 8, .BlockHeight = 5, .BlockDepth = 1,
3236       .BytesPerBlock = 16,
3237       .Swizzle = { 0, 1, 2, 3 },
3238       .ArrayFormat = 0,
3239    },
3240    {
3241       .Name = MESA_FORMAT_RGBA_ASTC_8x6,
3242       .StrName = "MESA_FORMAT_RGBA_ASTC_8x6",
3243       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3244       .BaseFormat = GL_RGBA,
3245       .DataType = GL_UNSIGNED_NORMALIZED,
3246       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3247       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3248       .IsSRGBFormat = 0,
3249       .BlockWidth = 8, .BlockHeight = 6, .BlockDepth = 1,
3250       .BytesPerBlock = 16,
3251       .Swizzle = { 0, 1, 2, 3 },
3252       .ArrayFormat = 0,
3253    },
3254    {
3255       .Name = MESA_FORMAT_RGBA_ASTC_8x8,
3256       .StrName = "MESA_FORMAT_RGBA_ASTC_8x8",
3257       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3258       .BaseFormat = GL_RGBA,
3259       .DataType = GL_UNSIGNED_NORMALIZED,
3260       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3261       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3262       .IsSRGBFormat = 0,
3263       .BlockWidth = 8, .BlockHeight = 8, .BlockDepth = 1,
3264       .BytesPerBlock = 16,
3265       .Swizzle = { 0, 1, 2, 3 },
3266       .ArrayFormat = 0,
3267    },
3268    {
3269       .Name = MESA_FORMAT_RGBA_ASTC_10x5,
3270       .StrName = "MESA_FORMAT_RGBA_ASTC_10x5",
3271       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3272       .BaseFormat = GL_RGBA,
3273       .DataType = GL_UNSIGNED_NORMALIZED,
3274       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3275       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3276       .IsSRGBFormat = 0,
3277       .BlockWidth = 10, .BlockHeight = 5, .BlockDepth = 1,
3278       .BytesPerBlock = 16,
3279       .Swizzle = { 0, 1, 2, 3 },
3280       .ArrayFormat = 0,
3281    },
3282    {
3283       .Name = MESA_FORMAT_RGBA_ASTC_10x6,
3284       .StrName = "MESA_FORMAT_RGBA_ASTC_10x6",
3285       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3286       .BaseFormat = GL_RGBA,
3287       .DataType = GL_UNSIGNED_NORMALIZED,
3288       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3289       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3290       .IsSRGBFormat = 0,
3291       .BlockWidth = 10, .BlockHeight = 6, .BlockDepth = 1,
3292       .BytesPerBlock = 16,
3293       .Swizzle = { 0, 1, 2, 3 },
3294       .ArrayFormat = 0,
3295    },
3296    {
3297       .Name = MESA_FORMAT_RGBA_ASTC_10x8,
3298       .StrName = "MESA_FORMAT_RGBA_ASTC_10x8",
3299       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3300       .BaseFormat = GL_RGBA,
3301       .DataType = GL_UNSIGNED_NORMALIZED,
3302       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3303       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3304       .IsSRGBFormat = 0,
3305       .BlockWidth = 10, .BlockHeight = 8, .BlockDepth = 1,
3306       .BytesPerBlock = 16,
3307       .Swizzle = { 0, 1, 2, 3 },
3308       .ArrayFormat = 0,
3309    },
3310    {
3311       .Name = MESA_FORMAT_RGBA_ASTC_10x10,
3312       .StrName = "MESA_FORMAT_RGBA_ASTC_10x10",
3313       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3314       .BaseFormat = GL_RGBA,
3315       .DataType = GL_UNSIGNED_NORMALIZED,
3316       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3317       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3318       .IsSRGBFormat = 0,
3319       .BlockWidth = 10, .BlockHeight = 10, .BlockDepth = 1,
3320       .BytesPerBlock = 16,
3321       .Swizzle = { 0, 1, 2, 3 },
3322       .ArrayFormat = 0,
3323    },
3324    {
3325       .Name = MESA_FORMAT_RGBA_ASTC_12x10,
3326       .StrName = "MESA_FORMAT_RGBA_ASTC_12x10",
3327       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3328       .BaseFormat = GL_RGBA,
3329       .DataType = GL_UNSIGNED_NORMALIZED,
3330       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3331       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3332       .IsSRGBFormat = 0,
3333       .BlockWidth = 12, .BlockHeight = 10, .BlockDepth = 1,
3334       .BytesPerBlock = 16,
3335       .Swizzle = { 0, 1, 2, 3 },
3336       .ArrayFormat = 0,
3337    },
3338    {
3339       .Name = MESA_FORMAT_RGBA_ASTC_12x12,
3340       .StrName = "MESA_FORMAT_RGBA_ASTC_12x12",
3341       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3342       .BaseFormat = GL_RGBA,
3343       .DataType = GL_UNSIGNED_NORMALIZED,
3344       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3345       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3346       .IsSRGBFormat = 0,
3347       .BlockWidth = 12, .BlockHeight = 12, .BlockDepth = 1,
3348       .BytesPerBlock = 16,
3349       .Swizzle = { 0, 1, 2, 3 },
3350       .ArrayFormat = 0,
3351    },
3352    {
3353       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4,
3354       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4",
3355       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3356       .BaseFormat = GL_RGBA,
3357       .DataType = GL_UNSIGNED_NORMALIZED,
3358       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3359       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3360       .IsSRGBFormat = 1,
3361       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 1,
3362       .BytesPerBlock = 16,
3363       .Swizzle = { 0, 1, 2, 3 },
3364       .ArrayFormat = 0,
3365    },
3366    {
3367       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4,
3368       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4",
3369       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3370       .BaseFormat = GL_RGBA,
3371       .DataType = GL_UNSIGNED_NORMALIZED,
3372       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3373       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3374       .IsSRGBFormat = 1,
3375       .BlockWidth = 5, .BlockHeight = 4, .BlockDepth = 1,
3376       .BytesPerBlock = 16,
3377       .Swizzle = { 0, 1, 2, 3 },
3378       .ArrayFormat = 0,
3379    },
3380    {
3381       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5,
3382       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5",
3383       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3384       .BaseFormat = GL_RGBA,
3385       .DataType = GL_UNSIGNED_NORMALIZED,
3386       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3387       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3388       .IsSRGBFormat = 1,
3389       .BlockWidth = 5, .BlockHeight = 5, .BlockDepth = 1,
3390       .BytesPerBlock = 16,
3391       .Swizzle = { 0, 1, 2, 3 },
3392       .ArrayFormat = 0,
3393    },
3394    {
3395       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5,
3396       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5",
3397       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3398       .BaseFormat = GL_RGBA,
3399       .DataType = GL_UNSIGNED_NORMALIZED,
3400       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3401       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3402       .IsSRGBFormat = 1,
3403       .BlockWidth = 6, .BlockHeight = 5, .BlockDepth = 1,
3404       .BytesPerBlock = 16,
3405       .Swizzle = { 0, 1, 2, 3 },
3406       .ArrayFormat = 0,
3407    },
3408    {
3409       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6,
3410       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6",
3411       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3412       .BaseFormat = GL_RGBA,
3413       .DataType = GL_UNSIGNED_NORMALIZED,
3414       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3415       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3416       .IsSRGBFormat = 1,
3417       .BlockWidth = 6, .BlockHeight = 6, .BlockDepth = 1,
3418       .BytesPerBlock = 16,
3419       .Swizzle = { 0, 1, 2, 3 },
3420       .ArrayFormat = 0,
3421    },
3422    {
3423       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5,
3424       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5",
3425       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3426       .BaseFormat = GL_RGBA,
3427       .DataType = GL_UNSIGNED_NORMALIZED,
3428       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3429       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3430       .IsSRGBFormat = 1,
3431       .BlockWidth = 8, .BlockHeight = 5, .BlockDepth = 1,
3432       .BytesPerBlock = 16,
3433       .Swizzle = { 0, 1, 2, 3 },
3434       .ArrayFormat = 0,
3435    },
3436    {
3437       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6,
3438       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6",
3439       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3440       .BaseFormat = GL_RGBA,
3441       .DataType = GL_UNSIGNED_NORMALIZED,
3442       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3443       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3444       .IsSRGBFormat = 1,
3445       .BlockWidth = 8, .BlockHeight = 6, .BlockDepth = 1,
3446       .BytesPerBlock = 16,
3447       .Swizzle = { 0, 1, 2, 3 },
3448       .ArrayFormat = 0,
3449    },
3450    {
3451       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8,
3452       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8",
3453       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3454       .BaseFormat = GL_RGBA,
3455       .DataType = GL_UNSIGNED_NORMALIZED,
3456       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3457       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3458       .IsSRGBFormat = 1,
3459       .BlockWidth = 8, .BlockHeight = 8, .BlockDepth = 1,
3460       .BytesPerBlock = 16,
3461       .Swizzle = { 0, 1, 2, 3 },
3462       .ArrayFormat = 0,
3463    },
3464    {
3465       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5,
3466       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5",
3467       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3468       .BaseFormat = GL_RGBA,
3469       .DataType = GL_UNSIGNED_NORMALIZED,
3470       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3471       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3472       .IsSRGBFormat = 1,
3473       .BlockWidth = 10, .BlockHeight = 5, .BlockDepth = 1,
3474       .BytesPerBlock = 16,
3475       .Swizzle = { 0, 1, 2, 3 },
3476       .ArrayFormat = 0,
3477    },
3478    {
3479       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6,
3480       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6",
3481       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3482       .BaseFormat = GL_RGBA,
3483       .DataType = GL_UNSIGNED_NORMALIZED,
3484       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3485       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3486       .IsSRGBFormat = 1,
3487       .BlockWidth = 10, .BlockHeight = 6, .BlockDepth = 1,
3488       .BytesPerBlock = 16,
3489       .Swizzle = { 0, 1, 2, 3 },
3490       .ArrayFormat = 0,
3491    },
3492    {
3493       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8,
3494       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8",
3495       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3496       .BaseFormat = GL_RGBA,
3497       .DataType = GL_UNSIGNED_NORMALIZED,
3498       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3499       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3500       .IsSRGBFormat = 1,
3501       .BlockWidth = 10, .BlockHeight = 8, .BlockDepth = 1,
3502       .BytesPerBlock = 16,
3503       .Swizzle = { 0, 1, 2, 3 },
3504       .ArrayFormat = 0,
3505    },
3506    {
3507       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10,
3508       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10",
3509       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3510       .BaseFormat = GL_RGBA,
3511       .DataType = GL_UNSIGNED_NORMALIZED,
3512       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3513       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3514       .IsSRGBFormat = 1,
3515       .BlockWidth = 10, .BlockHeight = 10, .BlockDepth = 1,
3516       .BytesPerBlock = 16,
3517       .Swizzle = { 0, 1, 2, 3 },
3518       .ArrayFormat = 0,
3519    },
3520    {
3521       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10,
3522       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10",
3523       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3524       .BaseFormat = GL_RGBA,
3525       .DataType = GL_UNSIGNED_NORMALIZED,
3526       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3527       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3528       .IsSRGBFormat = 1,
3529       .BlockWidth = 12, .BlockHeight = 10, .BlockDepth = 1,
3530       .BytesPerBlock = 16,
3531       .Swizzle = { 0, 1, 2, 3 },
3532       .ArrayFormat = 0,
3533    },
3534    {
3535       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12,
3536       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12",
3537       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3538       .BaseFormat = GL_RGBA,
3539       .DataType = GL_UNSIGNED_NORMALIZED,
3540       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3541       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3542       .IsSRGBFormat = 1,
3543       .BlockWidth = 12, .BlockHeight = 12, .BlockDepth = 1,
3544       .BytesPerBlock = 16,
3545       .Swizzle = { 0, 1, 2, 3 },
3546       .ArrayFormat = 0,
3547    },
3548    {
3549       .Name = MESA_FORMAT_RGBA_ASTC_3x3x3,
3550       .StrName = "MESA_FORMAT_RGBA_ASTC_3x3x3",
3551       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3552       .BaseFormat = GL_RGBA,
3553       .DataType = GL_UNSIGNED_NORMALIZED,
3554       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3555       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3556       .IsSRGBFormat = 0,
3557       .BlockWidth = 3, .BlockHeight = 3, .BlockDepth = 3,
3558       .BytesPerBlock = 16,
3559       .Swizzle = { 0, 1, 2, 3 },
3560       .ArrayFormat = 0,
3561    },
3562    {
3563       .Name = MESA_FORMAT_RGBA_ASTC_4x3x3,
3564       .StrName = "MESA_FORMAT_RGBA_ASTC_4x3x3",
3565       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3566       .BaseFormat = GL_RGBA,
3567       .DataType = GL_UNSIGNED_NORMALIZED,
3568       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3569       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3570       .IsSRGBFormat = 0,
3571       .BlockWidth = 4, .BlockHeight = 3, .BlockDepth = 3,
3572       .BytesPerBlock = 16,
3573       .Swizzle = { 0, 1, 2, 3 },
3574       .ArrayFormat = 0,
3575    },
3576    {
3577       .Name = MESA_FORMAT_RGBA_ASTC_4x4x3,
3578       .StrName = "MESA_FORMAT_RGBA_ASTC_4x4x3",
3579       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3580       .BaseFormat = GL_RGBA,
3581       .DataType = GL_UNSIGNED_NORMALIZED,
3582       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3583       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3584       .IsSRGBFormat = 0,
3585       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 3,
3586       .BytesPerBlock = 16,
3587       .Swizzle = { 0, 1, 2, 3 },
3588       .ArrayFormat = 0,
3589    },
3590    {
3591       .Name = MESA_FORMAT_RGBA_ASTC_4x4x4,
3592       .StrName = "MESA_FORMAT_RGBA_ASTC_4x4x4",
3593       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3594       .BaseFormat = GL_RGBA,
3595       .DataType = GL_UNSIGNED_NORMALIZED,
3596       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3597       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3598       .IsSRGBFormat = 0,
3599       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 4,
3600       .BytesPerBlock = 16,
3601       .Swizzle = { 0, 1, 2, 3 },
3602       .ArrayFormat = 0,
3603    },
3604    {
3605       .Name = MESA_FORMAT_RGBA_ASTC_5x4x4,
3606       .StrName = "MESA_FORMAT_RGBA_ASTC_5x4x4",
3607       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3608       .BaseFormat = GL_RGBA,
3609       .DataType = GL_UNSIGNED_NORMALIZED,
3610       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3611       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3612       .IsSRGBFormat = 0,
3613       .BlockWidth = 5, .BlockHeight = 4, .BlockDepth = 4,
3614       .BytesPerBlock = 16,
3615       .Swizzle = { 0, 1, 2, 3 },
3616       .ArrayFormat = 0,
3617    },
3618    {
3619       .Name = MESA_FORMAT_RGBA_ASTC_5x5x4,
3620       .StrName = "MESA_FORMAT_RGBA_ASTC_5x5x4",
3621       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3622       .BaseFormat = GL_RGBA,
3623       .DataType = GL_UNSIGNED_NORMALIZED,
3624       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3625       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3626       .IsSRGBFormat = 0,
3627       .BlockWidth = 5, .BlockHeight = 5, .BlockDepth = 4,
3628       .BytesPerBlock = 16,
3629       .Swizzle = { 0, 1, 2, 3 },
3630       .ArrayFormat = 0,
3631    },
3632    {
3633       .Name = MESA_FORMAT_RGBA_ASTC_5x5x5,
3634       .StrName = "MESA_FORMAT_RGBA_ASTC_5x5x5",
3635       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3636       .BaseFormat = GL_RGBA,
3637       .DataType = GL_UNSIGNED_NORMALIZED,
3638       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3639       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3640       .IsSRGBFormat = 0,
3641       .BlockWidth = 5, .BlockHeight = 5, .BlockDepth = 5,
3642       .BytesPerBlock = 16,
3643       .Swizzle = { 0, 1, 2, 3 },
3644       .ArrayFormat = 0,
3645    },
3646    {
3647       .Name = MESA_FORMAT_RGBA_ASTC_6x5x5,
3648       .StrName = "MESA_FORMAT_RGBA_ASTC_6x5x5",
3649       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3650       .BaseFormat = GL_RGBA,
3651       .DataType = GL_UNSIGNED_NORMALIZED,
3652       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3653       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3654       .IsSRGBFormat = 0,
3655       .BlockWidth = 6, .BlockHeight = 5, .BlockDepth = 5,
3656       .BytesPerBlock = 16,
3657       .Swizzle = { 0, 1, 2, 3 },
3658       .ArrayFormat = 0,
3659    },
3660    {
3661       .Name = MESA_FORMAT_RGBA_ASTC_6x6x5,
3662       .StrName = "MESA_FORMAT_RGBA_ASTC_6x6x5",
3663       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3664       .BaseFormat = GL_RGBA,
3665       .DataType = GL_UNSIGNED_NORMALIZED,
3666       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3667       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3668       .IsSRGBFormat = 0,
3669       .BlockWidth = 6, .BlockHeight = 6, .BlockDepth = 5,
3670       .BytesPerBlock = 16,
3671       .Swizzle = { 0, 1, 2, 3 },
3672       .ArrayFormat = 0,
3673    },
3674    {
3675       .Name = MESA_FORMAT_RGBA_ASTC_6x6x6,
3676       .StrName = "MESA_FORMAT_RGBA_ASTC_6x6x6",
3677       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3678       .BaseFormat = GL_RGBA,
3679       .DataType = GL_UNSIGNED_NORMALIZED,
3680       .RedBits = 16, .GreenBits = 16, .BlueBits = 16, .AlphaBits = 16,
3681       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3682       .IsSRGBFormat = 0,
3683       .BlockWidth = 6, .BlockHeight = 6, .BlockDepth = 6,
3684       .BytesPerBlock = 16,
3685       .Swizzle = { 0, 1, 2, 3 },
3686       .ArrayFormat = 0,
3687    },
3688    {
3689       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3,
3690       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3",
3691       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3692       .BaseFormat = GL_RGBA,
3693       .DataType = GL_UNSIGNED_NORMALIZED,
3694       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3695       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3696       .IsSRGBFormat = 1,
3697       .BlockWidth = 3, .BlockHeight = 3, .BlockDepth = 3,
3698       .BytesPerBlock = 16,
3699       .Swizzle = { 0, 1, 2, 3 },
3700       .ArrayFormat = 0,
3701    },
3702    {
3703       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3,
3704       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3",
3705       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3706       .BaseFormat = GL_RGBA,
3707       .DataType = GL_UNSIGNED_NORMALIZED,
3708       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3709       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3710       .IsSRGBFormat = 1,
3711       .BlockWidth = 4, .BlockHeight = 3, .BlockDepth = 3,
3712       .BytesPerBlock = 16,
3713       .Swizzle = { 0, 1, 2, 3 },
3714       .ArrayFormat = 0,
3715    },
3716    {
3717       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3,
3718       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3",
3719       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3720       .BaseFormat = GL_RGBA,
3721       .DataType = GL_UNSIGNED_NORMALIZED,
3722       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3723       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3724       .IsSRGBFormat = 1,
3725       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 3,
3726       .BytesPerBlock = 16,
3727       .Swizzle = { 0, 1, 2, 3 },
3728       .ArrayFormat = 0,
3729    },
3730    {
3731       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4,
3732       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4",
3733       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3734       .BaseFormat = GL_RGBA,
3735       .DataType = GL_UNSIGNED_NORMALIZED,
3736       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3737       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3738       .IsSRGBFormat = 1,
3739       .BlockWidth = 4, .BlockHeight = 4, .BlockDepth = 4,
3740       .BytesPerBlock = 16,
3741       .Swizzle = { 0, 1, 2, 3 },
3742       .ArrayFormat = 0,
3743    },
3744    {
3745       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4,
3746       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4",
3747       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3748       .BaseFormat = GL_RGBA,
3749       .DataType = GL_UNSIGNED_NORMALIZED,
3750       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3751       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3752       .IsSRGBFormat = 1,
3753       .BlockWidth = 5, .BlockHeight = 4, .BlockDepth = 4,
3754       .BytesPerBlock = 16,
3755       .Swizzle = { 0, 1, 2, 3 },
3756       .ArrayFormat = 0,
3757    },
3758    {
3759       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4,
3760       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4",
3761       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3762       .BaseFormat = GL_RGBA,
3763       .DataType = GL_UNSIGNED_NORMALIZED,
3764       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3765       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3766       .IsSRGBFormat = 1,
3767       .BlockWidth = 5, .BlockHeight = 5, .BlockDepth = 4,
3768       .BytesPerBlock = 16,
3769       .Swizzle = { 0, 1, 2, 3 },
3770       .ArrayFormat = 0,
3771    },
3772    {
3773       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5,
3774       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5",
3775       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3776       .BaseFormat = GL_RGBA,
3777       .DataType = GL_UNSIGNED_NORMALIZED,
3778       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3779       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3780       .IsSRGBFormat = 1,
3781       .BlockWidth = 5, .BlockHeight = 5, .BlockDepth = 5,
3782       .BytesPerBlock = 16,
3783       .Swizzle = { 0, 1, 2, 3 },
3784       .ArrayFormat = 0,
3785    },
3786    {
3787       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5,
3788       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5",
3789       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3790       .BaseFormat = GL_RGBA,
3791       .DataType = GL_UNSIGNED_NORMALIZED,
3792       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3793       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3794       .IsSRGBFormat = 1,
3795       .BlockWidth = 6, .BlockHeight = 5, .BlockDepth = 5,
3796       .BytesPerBlock = 16,
3797       .Swizzle = { 0, 1, 2, 3 },
3798       .ArrayFormat = 0,
3799    },
3800    {
3801       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5,
3802       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5",
3803       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3804       .BaseFormat = GL_RGBA,
3805       .DataType = GL_UNSIGNED_NORMALIZED,
3806       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3807       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3808       .IsSRGBFormat = 1,
3809       .BlockWidth = 6, .BlockHeight = 6, .BlockDepth = 5,
3810       .BytesPerBlock = 16,
3811       .Swizzle = { 0, 1, 2, 3 },
3812       .ArrayFormat = 0,
3813    },
3814    {
3815       .Name = MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6,
3816       .StrName = "MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6",
3817       .Layout = MESA_FORMAT_LAYOUT_ASTC,
3818       .BaseFormat = GL_RGBA,
3819       .DataType = GL_UNSIGNED_NORMALIZED,
3820       .RedBits = 8, .GreenBits = 8, .BlueBits = 8, .AlphaBits = 8,
3821       .LuminanceBits = 0, .IntensityBits = 0, .DepthBits = 0, .StencilBits = 0,
3822       .IsSRGBFormat = 1,
3823       .BlockWidth = 6, .BlockHeight = 6, .BlockDepth = 6,
3824       .BytesPerBlock = 16,
3825       .Swizzle = { 0, 1, 2, 3 },
3826       .ArrayFormat = 0,
3827    },
3828 };
3829