1 /* This file is autogenerated by u_format_table.py from u_format.csv. Do not edit directly. */
2
3 /**************************************************************************
4 *
5 * Copyright 2010 VMware, Inc.
6 * All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sub license, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the
17 * next paragraph) shall be included in all copies or substantial portions
18 * of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
23 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
24 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 *
28 **************************************************************************/
29
30 #include "pipe/p_compiler.h"
31 #include "u_format.h"
32 #include "u_half.h"
33 #include "u_math.h"
34
35 const struct util_format_description
36 util_format_none_description = {
37 PIPE_FORMAT_NONE,
38 "PIPE_FORMAT_NONE",
39 "none",
40 {1, 1, 8}, /* block */
41 UTIL_FORMAT_LAYOUT_PLAIN,
42 1, /* nr_channels */
43 TRUE, /* is_array */
44 TRUE, /* is_bitmask */
45 FALSE, /* is_mixed */
46 {
47 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
48 {0, 0, 0, 0, 0},
49 {0, 0, 0, 0, 0},
50 {0, 0, 0, 0, 0}
51 },
52 {
53 UTIL_FORMAT_SWIZZLE_X, /* r */
54 UTIL_FORMAT_SWIZZLE_0, /* g */
55 UTIL_FORMAT_SWIZZLE_0, /* b */
56 UTIL_FORMAT_SWIZZLE_1 /* a */
57 },
58 UTIL_FORMAT_COLORSPACE_RGB,
59 };
60
61 const struct util_format_description
62 util_format_b8g8r8a8_unorm_description = {
63 PIPE_FORMAT_B8G8R8A8_UNORM,
64 "PIPE_FORMAT_B8G8R8A8_UNORM",
65 "b8g8r8a8_unorm",
66 {1, 1, 32}, /* block */
67 UTIL_FORMAT_LAYOUT_PLAIN,
68 4, /* nr_channels */
69 TRUE, /* is_array */
70 TRUE, /* is_bitmask */
71 FALSE, /* is_mixed */
72 #ifdef PIPE_ARCH_BIG_ENDIAN
73 {
74 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = b */
75 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
76 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = r */
77 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = a */
78 },
79 #else
80 {
81 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
82 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
83 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
84 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
85 },
86 #endif
87 #ifdef PIPE_ARCH_BIG_ENDIAN
88 {
89 UTIL_FORMAT_SWIZZLE_Z, /* r */
90 UTIL_FORMAT_SWIZZLE_Y, /* g */
91 UTIL_FORMAT_SWIZZLE_X, /* b */
92 UTIL_FORMAT_SWIZZLE_W /* a */
93 },
94 #else
95 {
96 UTIL_FORMAT_SWIZZLE_Z, /* r */
97 UTIL_FORMAT_SWIZZLE_Y, /* g */
98 UTIL_FORMAT_SWIZZLE_X, /* b */
99 UTIL_FORMAT_SWIZZLE_W /* a */
100 },
101 #endif
102 UTIL_FORMAT_COLORSPACE_RGB,
103 };
104
105 const struct util_format_description
106 util_format_b8g8r8x8_unorm_description = {
107 PIPE_FORMAT_B8G8R8X8_UNORM,
108 "PIPE_FORMAT_B8G8R8X8_UNORM",
109 "b8g8r8x8_unorm",
110 {1, 1, 32}, /* block */
111 UTIL_FORMAT_LAYOUT_PLAIN,
112 4, /* nr_channels */
113 TRUE, /* is_array */
114 TRUE, /* is_bitmask */
115 FALSE, /* is_mixed */
116 #ifdef PIPE_ARCH_BIG_ENDIAN
117 {
118 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = b */
119 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
120 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = r */
121 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
122 },
123 #else
124 {
125 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
126 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
127 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
128 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
129 },
130 #endif
131 #ifdef PIPE_ARCH_BIG_ENDIAN
132 {
133 UTIL_FORMAT_SWIZZLE_Z, /* r */
134 UTIL_FORMAT_SWIZZLE_Y, /* g */
135 UTIL_FORMAT_SWIZZLE_X, /* b */
136 UTIL_FORMAT_SWIZZLE_1 /* a */
137 },
138 #else
139 {
140 UTIL_FORMAT_SWIZZLE_Z, /* r */
141 UTIL_FORMAT_SWIZZLE_Y, /* g */
142 UTIL_FORMAT_SWIZZLE_X, /* b */
143 UTIL_FORMAT_SWIZZLE_1 /* a */
144 },
145 #endif
146 UTIL_FORMAT_COLORSPACE_RGB,
147 };
148
149 const struct util_format_description
150 util_format_a8r8g8b8_unorm_description = {
151 PIPE_FORMAT_A8R8G8B8_UNORM,
152 "PIPE_FORMAT_A8R8G8B8_UNORM",
153 "a8r8g8b8_unorm",
154 {1, 1, 32}, /* block */
155 UTIL_FORMAT_LAYOUT_PLAIN,
156 4, /* nr_channels */
157 TRUE, /* is_array */
158 TRUE, /* is_bitmask */
159 FALSE, /* is_mixed */
160 #ifdef PIPE_ARCH_BIG_ENDIAN
161 {
162 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = a */
163 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = r */
164 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
165 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = b */
166 },
167 #else
168 {
169 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
170 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
171 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
172 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
173 },
174 #endif
175 #ifdef PIPE_ARCH_BIG_ENDIAN
176 {
177 UTIL_FORMAT_SWIZZLE_Y, /* r */
178 UTIL_FORMAT_SWIZZLE_Z, /* g */
179 UTIL_FORMAT_SWIZZLE_W, /* b */
180 UTIL_FORMAT_SWIZZLE_X /* a */
181 },
182 #else
183 {
184 UTIL_FORMAT_SWIZZLE_Y, /* r */
185 UTIL_FORMAT_SWIZZLE_Z, /* g */
186 UTIL_FORMAT_SWIZZLE_W, /* b */
187 UTIL_FORMAT_SWIZZLE_X /* a */
188 },
189 #endif
190 UTIL_FORMAT_COLORSPACE_RGB,
191 };
192
193 const struct util_format_description
194 util_format_x8r8g8b8_unorm_description = {
195 PIPE_FORMAT_X8R8G8B8_UNORM,
196 "PIPE_FORMAT_X8R8G8B8_UNORM",
197 "x8r8g8b8_unorm",
198 {1, 1, 32}, /* block */
199 UTIL_FORMAT_LAYOUT_PLAIN,
200 4, /* nr_channels */
201 TRUE, /* is_array */
202 TRUE, /* is_bitmask */
203 FALSE, /* is_mixed */
204 #ifdef PIPE_ARCH_BIG_ENDIAN
205 {
206 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
207 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = r */
208 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
209 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = b */
210 },
211 #else
212 {
213 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
214 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
215 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
216 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
217 },
218 #endif
219 #ifdef PIPE_ARCH_BIG_ENDIAN
220 {
221 UTIL_FORMAT_SWIZZLE_Y, /* r */
222 UTIL_FORMAT_SWIZZLE_Z, /* g */
223 UTIL_FORMAT_SWIZZLE_W, /* b */
224 UTIL_FORMAT_SWIZZLE_1 /* a */
225 },
226 #else
227 {
228 UTIL_FORMAT_SWIZZLE_Y, /* r */
229 UTIL_FORMAT_SWIZZLE_Z, /* g */
230 UTIL_FORMAT_SWIZZLE_W, /* b */
231 UTIL_FORMAT_SWIZZLE_1 /* a */
232 },
233 #endif
234 UTIL_FORMAT_COLORSPACE_RGB,
235 };
236
237 const struct util_format_description
238 util_format_a8b8g8r8_unorm_description = {
239 PIPE_FORMAT_A8B8G8R8_UNORM,
240 "PIPE_FORMAT_A8B8G8R8_UNORM",
241 "a8b8g8r8_unorm",
242 {1, 1, 32}, /* block */
243 UTIL_FORMAT_LAYOUT_PLAIN,
244 4, /* nr_channels */
245 TRUE, /* is_array */
246 TRUE, /* is_bitmask */
247 FALSE, /* is_mixed */
248 #ifdef PIPE_ARCH_BIG_ENDIAN
249 {
250 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = a */
251 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = b */
252 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
253 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = r */
254 },
255 #else
256 {
257 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
258 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
259 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
260 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
261 },
262 #endif
263 #ifdef PIPE_ARCH_BIG_ENDIAN
264 {
265 UTIL_FORMAT_SWIZZLE_W, /* r */
266 UTIL_FORMAT_SWIZZLE_Z, /* g */
267 UTIL_FORMAT_SWIZZLE_Y, /* b */
268 UTIL_FORMAT_SWIZZLE_X /* a */
269 },
270 #else
271 {
272 UTIL_FORMAT_SWIZZLE_W, /* r */
273 UTIL_FORMAT_SWIZZLE_Z, /* g */
274 UTIL_FORMAT_SWIZZLE_Y, /* b */
275 UTIL_FORMAT_SWIZZLE_X /* a */
276 },
277 #endif
278 UTIL_FORMAT_COLORSPACE_RGB,
279 };
280
281 const struct util_format_description
282 util_format_x8b8g8r8_unorm_description = {
283 PIPE_FORMAT_X8B8G8R8_UNORM,
284 "PIPE_FORMAT_X8B8G8R8_UNORM",
285 "x8b8g8r8_unorm",
286 {1, 1, 32}, /* block */
287 UTIL_FORMAT_LAYOUT_PLAIN,
288 4, /* nr_channels */
289 TRUE, /* is_array */
290 TRUE, /* is_bitmask */
291 FALSE, /* is_mixed */
292 #ifdef PIPE_ARCH_BIG_ENDIAN
293 {
294 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
295 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = b */
296 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
297 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = r */
298 },
299 #else
300 {
301 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
302 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
303 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
304 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
305 },
306 #endif
307 #ifdef PIPE_ARCH_BIG_ENDIAN
308 {
309 UTIL_FORMAT_SWIZZLE_W, /* r */
310 UTIL_FORMAT_SWIZZLE_Z, /* g */
311 UTIL_FORMAT_SWIZZLE_Y, /* b */
312 UTIL_FORMAT_SWIZZLE_1 /* a */
313 },
314 #else
315 {
316 UTIL_FORMAT_SWIZZLE_W, /* r */
317 UTIL_FORMAT_SWIZZLE_Z, /* g */
318 UTIL_FORMAT_SWIZZLE_Y, /* b */
319 UTIL_FORMAT_SWIZZLE_1 /* a */
320 },
321 #endif
322 UTIL_FORMAT_COLORSPACE_RGB,
323 };
324
325 const struct util_format_description
326 util_format_r8g8b8x8_unorm_description = {
327 PIPE_FORMAT_R8G8B8X8_UNORM,
328 "PIPE_FORMAT_R8G8B8X8_UNORM",
329 "r8g8b8x8_unorm",
330 {1, 1, 32}, /* block */
331 UTIL_FORMAT_LAYOUT_PLAIN,
332 4, /* nr_channels */
333 TRUE, /* is_array */
334 TRUE, /* is_bitmask */
335 FALSE, /* is_mixed */
336 #ifdef PIPE_ARCH_BIG_ENDIAN
337 {
338 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = r */
339 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
340 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = b */
341 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
342 },
343 #else
344 {
345 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
346 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
347 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
348 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
349 },
350 #endif
351 #ifdef PIPE_ARCH_BIG_ENDIAN
352 {
353 UTIL_FORMAT_SWIZZLE_X, /* r */
354 UTIL_FORMAT_SWIZZLE_Y, /* g */
355 UTIL_FORMAT_SWIZZLE_Z, /* b */
356 UTIL_FORMAT_SWIZZLE_1 /* a */
357 },
358 #else
359 {
360 UTIL_FORMAT_SWIZZLE_X, /* r */
361 UTIL_FORMAT_SWIZZLE_Y, /* g */
362 UTIL_FORMAT_SWIZZLE_Z, /* b */
363 UTIL_FORMAT_SWIZZLE_1 /* a */
364 },
365 #endif
366 UTIL_FORMAT_COLORSPACE_RGB,
367 };
368
369 const struct util_format_description
370 util_format_b5g5r5x1_unorm_description = {
371 PIPE_FORMAT_B5G5R5X1_UNORM,
372 "PIPE_FORMAT_B5G5R5X1_UNORM",
373 "b5g5r5x1_unorm",
374 {1, 1, 16}, /* block */
375 UTIL_FORMAT_LAYOUT_PLAIN,
376 4, /* nr_channels */
377 FALSE, /* is_array */
378 TRUE, /* is_bitmask */
379 FALSE, /* is_mixed */
380 #ifdef PIPE_ARCH_BIG_ENDIAN
381 {
382 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 1, 15}, /* x = x */
383 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 10}, /* y = r */
384 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 5}, /* z = g */
385 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0} /* w = b */
386 },
387 #else
388 {
389 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* x = b */
390 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 5}, /* y = g */
391 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 10}, /* z = r */
392 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 1, 15} /* w = x */
393 },
394 #endif
395 #ifdef PIPE_ARCH_BIG_ENDIAN
396 {
397 UTIL_FORMAT_SWIZZLE_Y, /* r */
398 UTIL_FORMAT_SWIZZLE_Z, /* g */
399 UTIL_FORMAT_SWIZZLE_W, /* b */
400 UTIL_FORMAT_SWIZZLE_1 /* a */
401 },
402 #else
403 {
404 UTIL_FORMAT_SWIZZLE_Z, /* r */
405 UTIL_FORMAT_SWIZZLE_Y, /* g */
406 UTIL_FORMAT_SWIZZLE_X, /* b */
407 UTIL_FORMAT_SWIZZLE_1 /* a */
408 },
409 #endif
410 UTIL_FORMAT_COLORSPACE_RGB,
411 };
412
413 const struct util_format_description
414 util_format_b5g5r5a1_unorm_description = {
415 PIPE_FORMAT_B5G5R5A1_UNORM,
416 "PIPE_FORMAT_B5G5R5A1_UNORM",
417 "b5g5r5a1_unorm",
418 {1, 1, 16}, /* block */
419 UTIL_FORMAT_LAYOUT_PLAIN,
420 4, /* nr_channels */
421 FALSE, /* is_array */
422 TRUE, /* is_bitmask */
423 FALSE, /* is_mixed */
424 #ifdef PIPE_ARCH_BIG_ENDIAN
425 {
426 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 1, 15}, /* x = a */
427 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 10}, /* y = r */
428 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 5}, /* z = g */
429 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0} /* w = b */
430 },
431 #else
432 {
433 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* x = b */
434 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 5}, /* y = g */
435 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 10}, /* z = r */
436 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 1, 15} /* w = a */
437 },
438 #endif
439 #ifdef PIPE_ARCH_BIG_ENDIAN
440 {
441 UTIL_FORMAT_SWIZZLE_Y, /* r */
442 UTIL_FORMAT_SWIZZLE_Z, /* g */
443 UTIL_FORMAT_SWIZZLE_W, /* b */
444 UTIL_FORMAT_SWIZZLE_X /* a */
445 },
446 #else
447 {
448 UTIL_FORMAT_SWIZZLE_Z, /* r */
449 UTIL_FORMAT_SWIZZLE_Y, /* g */
450 UTIL_FORMAT_SWIZZLE_X, /* b */
451 UTIL_FORMAT_SWIZZLE_W /* a */
452 },
453 #endif
454 UTIL_FORMAT_COLORSPACE_RGB,
455 };
456
457 const struct util_format_description
458 util_format_b4g4r4a4_unorm_description = {
459 PIPE_FORMAT_B4G4R4A4_UNORM,
460 "PIPE_FORMAT_B4G4R4A4_UNORM",
461 "b4g4r4a4_unorm",
462 {1, 1, 16}, /* block */
463 UTIL_FORMAT_LAYOUT_PLAIN,
464 4, /* nr_channels */
465 FALSE, /* is_array */
466 TRUE, /* is_bitmask */
467 FALSE, /* is_mixed */
468 #ifdef PIPE_ARCH_BIG_ENDIAN
469 {
470 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 12}, /* x = a */
471 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* y = r */
472 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* z = g */
473 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0} /* w = b */
474 },
475 #else
476 {
477 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = b */
478 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = g */
479 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* z = r */
480 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 12} /* w = a */
481 },
482 #endif
483 #ifdef PIPE_ARCH_BIG_ENDIAN
484 {
485 UTIL_FORMAT_SWIZZLE_Y, /* r */
486 UTIL_FORMAT_SWIZZLE_Z, /* g */
487 UTIL_FORMAT_SWIZZLE_W, /* b */
488 UTIL_FORMAT_SWIZZLE_X /* a */
489 },
490 #else
491 {
492 UTIL_FORMAT_SWIZZLE_Z, /* r */
493 UTIL_FORMAT_SWIZZLE_Y, /* g */
494 UTIL_FORMAT_SWIZZLE_X, /* b */
495 UTIL_FORMAT_SWIZZLE_W /* a */
496 },
497 #endif
498 UTIL_FORMAT_COLORSPACE_RGB,
499 };
500
501 const struct util_format_description
502 util_format_b4g4r4x4_unorm_description = {
503 PIPE_FORMAT_B4G4R4X4_UNORM,
504 "PIPE_FORMAT_B4G4R4X4_UNORM",
505 "b4g4r4x4_unorm",
506 {1, 1, 16}, /* block */
507 UTIL_FORMAT_LAYOUT_PLAIN,
508 4, /* nr_channels */
509 FALSE, /* is_array */
510 TRUE, /* is_bitmask */
511 FALSE, /* is_mixed */
512 #ifdef PIPE_ARCH_BIG_ENDIAN
513 {
514 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 4, 12}, /* x = x */
515 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* y = r */
516 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* z = g */
517 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0} /* w = b */
518 },
519 #else
520 {
521 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = b */
522 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = g */
523 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* z = r */
524 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 4, 12} /* w = x */
525 },
526 #endif
527 #ifdef PIPE_ARCH_BIG_ENDIAN
528 {
529 UTIL_FORMAT_SWIZZLE_Y, /* r */
530 UTIL_FORMAT_SWIZZLE_Z, /* g */
531 UTIL_FORMAT_SWIZZLE_W, /* b */
532 UTIL_FORMAT_SWIZZLE_1 /* a */
533 },
534 #else
535 {
536 UTIL_FORMAT_SWIZZLE_Z, /* r */
537 UTIL_FORMAT_SWIZZLE_Y, /* g */
538 UTIL_FORMAT_SWIZZLE_X, /* b */
539 UTIL_FORMAT_SWIZZLE_1 /* a */
540 },
541 #endif
542 UTIL_FORMAT_COLORSPACE_RGB,
543 };
544
545 const struct util_format_description
546 util_format_a4b4g4r4_unorm_description = {
547 PIPE_FORMAT_A4B4G4R4_UNORM,
548 "PIPE_FORMAT_A4B4G4R4_UNORM",
549 "a4b4g4r4_unorm",
550 {1, 1, 16}, /* block */
551 UTIL_FORMAT_LAYOUT_PLAIN,
552 4, /* nr_channels */
553 FALSE, /* is_array */
554 TRUE, /* is_bitmask */
555 FALSE, /* is_mixed */
556 #ifdef PIPE_ARCH_BIG_ENDIAN
557 {
558 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 12}, /* x = r */
559 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* y = g */
560 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* z = b */
561 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0} /* w = a */
562 },
563 #else
564 {
565 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = a */
566 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = b */
567 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 8}, /* z = g */
568 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 12} /* w = r */
569 },
570 #endif
571 #ifdef PIPE_ARCH_BIG_ENDIAN
572 {
573 UTIL_FORMAT_SWIZZLE_X, /* r */
574 UTIL_FORMAT_SWIZZLE_Y, /* g */
575 UTIL_FORMAT_SWIZZLE_Z, /* b */
576 UTIL_FORMAT_SWIZZLE_W /* a */
577 },
578 #else
579 {
580 UTIL_FORMAT_SWIZZLE_W, /* r */
581 UTIL_FORMAT_SWIZZLE_Z, /* g */
582 UTIL_FORMAT_SWIZZLE_Y, /* b */
583 UTIL_FORMAT_SWIZZLE_X /* a */
584 },
585 #endif
586 UTIL_FORMAT_COLORSPACE_RGB,
587 };
588
589 const struct util_format_description
590 util_format_b5g6r5_unorm_description = {
591 PIPE_FORMAT_B5G6R5_UNORM,
592 "PIPE_FORMAT_B5G6R5_UNORM",
593 "b5g6r5_unorm",
594 {1, 1, 16}, /* block */
595 UTIL_FORMAT_LAYOUT_PLAIN,
596 3, /* nr_channels */
597 FALSE, /* is_array */
598 TRUE, /* is_bitmask */
599 FALSE, /* is_mixed */
600 #ifdef PIPE_ARCH_BIG_ENDIAN
601 {
602 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 11}, /* x = r */
603 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 5}, /* y = g */
604 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* z = b */
605 {0, 0, 0, 0, 0}
606 },
607 #else
608 {
609 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* x = b */
610 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 5}, /* y = g */
611 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 11}, /* z = r */
612 {0, 0, 0, 0, 0}
613 },
614 #endif
615 #ifdef PIPE_ARCH_BIG_ENDIAN
616 {
617 UTIL_FORMAT_SWIZZLE_X, /* r */
618 UTIL_FORMAT_SWIZZLE_Y, /* g */
619 UTIL_FORMAT_SWIZZLE_Z, /* b */
620 UTIL_FORMAT_SWIZZLE_1 /* a */
621 },
622 #else
623 {
624 UTIL_FORMAT_SWIZZLE_Z, /* r */
625 UTIL_FORMAT_SWIZZLE_Y, /* g */
626 UTIL_FORMAT_SWIZZLE_X, /* b */
627 UTIL_FORMAT_SWIZZLE_1 /* a */
628 },
629 #endif
630 UTIL_FORMAT_COLORSPACE_RGB,
631 };
632
633 const struct util_format_description
634 util_format_r10g10b10a2_unorm_description = {
635 PIPE_FORMAT_R10G10B10A2_UNORM,
636 "PIPE_FORMAT_R10G10B10A2_UNORM",
637 "r10g10b10a2_unorm",
638 {1, 1, 32}, /* block */
639 UTIL_FORMAT_LAYOUT_PLAIN,
640 4, /* nr_channels */
641 FALSE, /* is_array */
642 TRUE, /* is_bitmask */
643 FALSE, /* is_mixed */
644 #ifdef PIPE_ARCH_BIG_ENDIAN
645 {
646 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30}, /* x = a */
647 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* y = b */
648 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* z = g */
649 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0} /* w = r */
650 },
651 #else
652 {
653 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0}, /* x = r */
654 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* y = g */
655 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* z = b */
656 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30} /* w = a */
657 },
658 #endif
659 #ifdef PIPE_ARCH_BIG_ENDIAN
660 {
661 UTIL_FORMAT_SWIZZLE_W, /* r */
662 UTIL_FORMAT_SWIZZLE_Z, /* g */
663 UTIL_FORMAT_SWIZZLE_Y, /* b */
664 UTIL_FORMAT_SWIZZLE_X /* a */
665 },
666 #else
667 {
668 UTIL_FORMAT_SWIZZLE_X, /* r */
669 UTIL_FORMAT_SWIZZLE_Y, /* g */
670 UTIL_FORMAT_SWIZZLE_Z, /* b */
671 UTIL_FORMAT_SWIZZLE_W /* a */
672 },
673 #endif
674 UTIL_FORMAT_COLORSPACE_RGB,
675 };
676
677 const struct util_format_description
678 util_format_r10g10b10x2_unorm_description = {
679 PIPE_FORMAT_R10G10B10X2_UNORM,
680 "PIPE_FORMAT_R10G10B10X2_UNORM",
681 "r10g10b10x2_unorm",
682 {1, 1, 32}, /* block */
683 UTIL_FORMAT_LAYOUT_PLAIN,
684 4, /* nr_channels */
685 FALSE, /* is_array */
686 TRUE, /* is_bitmask */
687 FALSE, /* is_mixed */
688 #ifdef PIPE_ARCH_BIG_ENDIAN
689 {
690 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30}, /* x = x */
691 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* y = b */
692 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* z = g */
693 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0} /* w = r */
694 },
695 #else
696 {
697 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0}, /* x = r */
698 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* y = g */
699 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* z = b */
700 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30} /* w = x */
701 },
702 #endif
703 #ifdef PIPE_ARCH_BIG_ENDIAN
704 {
705 UTIL_FORMAT_SWIZZLE_W, /* r */
706 UTIL_FORMAT_SWIZZLE_Z, /* g */
707 UTIL_FORMAT_SWIZZLE_Y, /* b */
708 UTIL_FORMAT_SWIZZLE_1 /* a */
709 },
710 #else
711 {
712 UTIL_FORMAT_SWIZZLE_X, /* r */
713 UTIL_FORMAT_SWIZZLE_Y, /* g */
714 UTIL_FORMAT_SWIZZLE_Z, /* b */
715 UTIL_FORMAT_SWIZZLE_1 /* a */
716 },
717 #endif
718 UTIL_FORMAT_COLORSPACE_RGB,
719 };
720
721 const struct util_format_description
722 util_format_b10g10r10a2_unorm_description = {
723 PIPE_FORMAT_B10G10R10A2_UNORM,
724 "PIPE_FORMAT_B10G10R10A2_UNORM",
725 "b10g10r10a2_unorm",
726 {1, 1, 32}, /* block */
727 UTIL_FORMAT_LAYOUT_PLAIN,
728 4, /* nr_channels */
729 FALSE, /* is_array */
730 TRUE, /* is_bitmask */
731 FALSE, /* is_mixed */
732 #ifdef PIPE_ARCH_BIG_ENDIAN
733 {
734 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30}, /* x = a */
735 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* y = r */
736 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* z = g */
737 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0} /* w = b */
738 },
739 #else
740 {
741 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0}, /* x = b */
742 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* y = g */
743 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* z = r */
744 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30} /* w = a */
745 },
746 #endif
747 #ifdef PIPE_ARCH_BIG_ENDIAN
748 {
749 UTIL_FORMAT_SWIZZLE_Y, /* r */
750 UTIL_FORMAT_SWIZZLE_Z, /* g */
751 UTIL_FORMAT_SWIZZLE_W, /* b */
752 UTIL_FORMAT_SWIZZLE_X /* a */
753 },
754 #else
755 {
756 UTIL_FORMAT_SWIZZLE_Z, /* r */
757 UTIL_FORMAT_SWIZZLE_Y, /* g */
758 UTIL_FORMAT_SWIZZLE_X, /* b */
759 UTIL_FORMAT_SWIZZLE_W /* a */
760 },
761 #endif
762 UTIL_FORMAT_COLORSPACE_RGB,
763 };
764
765 const struct util_format_description
766 util_format_b2g3r3_unorm_description = {
767 PIPE_FORMAT_B2G3R3_UNORM,
768 "PIPE_FORMAT_B2G3R3_UNORM",
769 "b2g3r3_unorm",
770 {1, 1, 8}, /* block */
771 UTIL_FORMAT_LAYOUT_PLAIN,
772 3, /* nr_channels */
773 FALSE, /* is_array */
774 TRUE, /* is_bitmask */
775 FALSE, /* is_mixed */
776 #ifdef PIPE_ARCH_BIG_ENDIAN
777 {
778 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3, 5}, /* x = r */
779 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3, 2}, /* y = g */
780 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 0}, /* z = b */
781 {0, 0, 0, 0, 0}
782 },
783 #else
784 {
785 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 0}, /* x = b */
786 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3, 2}, /* y = g */
787 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3, 5}, /* z = r */
788 {0, 0, 0, 0, 0}
789 },
790 #endif
791 #ifdef PIPE_ARCH_BIG_ENDIAN
792 {
793 UTIL_FORMAT_SWIZZLE_X, /* r */
794 UTIL_FORMAT_SWIZZLE_Y, /* g */
795 UTIL_FORMAT_SWIZZLE_Z, /* b */
796 UTIL_FORMAT_SWIZZLE_1 /* a */
797 },
798 #else
799 {
800 UTIL_FORMAT_SWIZZLE_Z, /* r */
801 UTIL_FORMAT_SWIZZLE_Y, /* g */
802 UTIL_FORMAT_SWIZZLE_X, /* b */
803 UTIL_FORMAT_SWIZZLE_1 /* a */
804 },
805 #endif
806 UTIL_FORMAT_COLORSPACE_RGB,
807 };
808
809 const struct util_format_description
810 util_format_l8_unorm_description = {
811 PIPE_FORMAT_L8_UNORM,
812 "PIPE_FORMAT_L8_UNORM",
813 "l8_unorm",
814 {1, 1, 8}, /* block */
815 UTIL_FORMAT_LAYOUT_PLAIN,
816 1, /* nr_channels */
817 TRUE, /* is_array */
818 TRUE, /* is_bitmask */
819 FALSE, /* is_mixed */
820 {
821 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
822 {0, 0, 0, 0, 0},
823 {0, 0, 0, 0, 0},
824 {0, 0, 0, 0, 0}
825 },
826 {
827 UTIL_FORMAT_SWIZZLE_X, /* r */
828 UTIL_FORMAT_SWIZZLE_X, /* g */
829 UTIL_FORMAT_SWIZZLE_X, /* b */
830 UTIL_FORMAT_SWIZZLE_1 /* a */
831 },
832 UTIL_FORMAT_COLORSPACE_RGB,
833 };
834
835 const struct util_format_description
836 util_format_a8_unorm_description = {
837 PIPE_FORMAT_A8_UNORM,
838 "PIPE_FORMAT_A8_UNORM",
839 "a8_unorm",
840 {1, 1, 8}, /* block */
841 UTIL_FORMAT_LAYOUT_PLAIN,
842 1, /* nr_channels */
843 TRUE, /* is_array */
844 TRUE, /* is_bitmask */
845 FALSE, /* is_mixed */
846 {
847 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
848 {0, 0, 0, 0, 0},
849 {0, 0, 0, 0, 0},
850 {0, 0, 0, 0, 0}
851 },
852 {
853 UTIL_FORMAT_SWIZZLE_0, /* r */
854 UTIL_FORMAT_SWIZZLE_0, /* g */
855 UTIL_FORMAT_SWIZZLE_0, /* b */
856 UTIL_FORMAT_SWIZZLE_X /* a */
857 },
858 UTIL_FORMAT_COLORSPACE_RGB,
859 };
860
861 const struct util_format_description
862 util_format_i8_unorm_description = {
863 PIPE_FORMAT_I8_UNORM,
864 "PIPE_FORMAT_I8_UNORM",
865 "i8_unorm",
866 {1, 1, 8}, /* block */
867 UTIL_FORMAT_LAYOUT_PLAIN,
868 1, /* nr_channels */
869 TRUE, /* is_array */
870 TRUE, /* is_bitmask */
871 FALSE, /* is_mixed */
872 {
873 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgba */
874 {0, 0, 0, 0, 0},
875 {0, 0, 0, 0, 0},
876 {0, 0, 0, 0, 0}
877 },
878 {
879 UTIL_FORMAT_SWIZZLE_X, /* r */
880 UTIL_FORMAT_SWIZZLE_X, /* g */
881 UTIL_FORMAT_SWIZZLE_X, /* b */
882 UTIL_FORMAT_SWIZZLE_X /* a */
883 },
884 UTIL_FORMAT_COLORSPACE_RGB,
885 };
886
887 const struct util_format_description
888 util_format_l4a4_unorm_description = {
889 PIPE_FORMAT_L4A4_UNORM,
890 "PIPE_FORMAT_L4A4_UNORM",
891 "l4a4_unorm",
892 {1, 1, 8}, /* block */
893 UTIL_FORMAT_LAYOUT_PLAIN,
894 2, /* nr_channels */
895 FALSE, /* is_array */
896 TRUE, /* is_bitmask */
897 FALSE, /* is_mixed */
898 #ifdef PIPE_ARCH_BIG_ENDIAN
899 {
900 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* x = a */
901 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* y = rgb */
902 {0, 0, 0, 0, 0},
903 {0, 0, 0, 0, 0}
904 },
905 #else
906 {
907 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = rgb */
908 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = a */
909 {0, 0, 0, 0, 0},
910 {0, 0, 0, 0, 0}
911 },
912 #endif
913 #ifdef PIPE_ARCH_BIG_ENDIAN
914 {
915 UTIL_FORMAT_SWIZZLE_Y, /* r */
916 UTIL_FORMAT_SWIZZLE_Y, /* g */
917 UTIL_FORMAT_SWIZZLE_Y, /* b */
918 UTIL_FORMAT_SWIZZLE_X /* a */
919 },
920 #else
921 {
922 UTIL_FORMAT_SWIZZLE_X, /* r */
923 UTIL_FORMAT_SWIZZLE_X, /* g */
924 UTIL_FORMAT_SWIZZLE_X, /* b */
925 UTIL_FORMAT_SWIZZLE_Y /* a */
926 },
927 #endif
928 UTIL_FORMAT_COLORSPACE_RGB,
929 };
930
931 const struct util_format_description
932 util_format_l8a8_unorm_description = {
933 PIPE_FORMAT_L8A8_UNORM,
934 "PIPE_FORMAT_L8A8_UNORM",
935 "l8a8_unorm",
936 {1, 1, 16}, /* block */
937 UTIL_FORMAT_LAYOUT_PLAIN,
938 2, /* nr_channels */
939 TRUE, /* is_array */
940 TRUE, /* is_bitmask */
941 FALSE, /* is_mixed */
942 #ifdef PIPE_ARCH_BIG_ENDIAN
943 {
944 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = rgb */
945 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = a */
946 {0, 0, 0, 0, 0},
947 {0, 0, 0, 0, 0}
948 },
949 #else
950 {
951 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
952 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = a */
953 {0, 0, 0, 0, 0},
954 {0, 0, 0, 0, 0}
955 },
956 #endif
957 #ifdef PIPE_ARCH_BIG_ENDIAN
958 {
959 UTIL_FORMAT_SWIZZLE_X, /* r */
960 UTIL_FORMAT_SWIZZLE_X, /* g */
961 UTIL_FORMAT_SWIZZLE_X, /* b */
962 UTIL_FORMAT_SWIZZLE_Y /* a */
963 },
964 #else
965 {
966 UTIL_FORMAT_SWIZZLE_X, /* r */
967 UTIL_FORMAT_SWIZZLE_X, /* g */
968 UTIL_FORMAT_SWIZZLE_X, /* b */
969 UTIL_FORMAT_SWIZZLE_Y /* a */
970 },
971 #endif
972 UTIL_FORMAT_COLORSPACE_RGB,
973 };
974
975 const struct util_format_description
976 util_format_l16_unorm_description = {
977 PIPE_FORMAT_L16_UNORM,
978 "PIPE_FORMAT_L16_UNORM",
979 "l16_unorm",
980 {1, 1, 16}, /* block */
981 UTIL_FORMAT_LAYOUT_PLAIN,
982 1, /* nr_channels */
983 TRUE, /* is_array */
984 TRUE, /* is_bitmask */
985 FALSE, /* is_mixed */
986 {
987 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
988 {0, 0, 0, 0, 0},
989 {0, 0, 0, 0, 0},
990 {0, 0, 0, 0, 0}
991 },
992 {
993 UTIL_FORMAT_SWIZZLE_X, /* r */
994 UTIL_FORMAT_SWIZZLE_X, /* g */
995 UTIL_FORMAT_SWIZZLE_X, /* b */
996 UTIL_FORMAT_SWIZZLE_1 /* a */
997 },
998 UTIL_FORMAT_COLORSPACE_RGB,
999 };
1000
1001 const struct util_format_description
1002 util_format_a16_unorm_description = {
1003 PIPE_FORMAT_A16_UNORM,
1004 "PIPE_FORMAT_A16_UNORM",
1005 "a16_unorm",
1006 {1, 1, 16}, /* block */
1007 UTIL_FORMAT_LAYOUT_PLAIN,
1008 1, /* nr_channels */
1009 TRUE, /* is_array */
1010 TRUE, /* is_bitmask */
1011 FALSE, /* is_mixed */
1012 {
1013 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = a */
1014 {0, 0, 0, 0, 0},
1015 {0, 0, 0, 0, 0},
1016 {0, 0, 0, 0, 0}
1017 },
1018 {
1019 UTIL_FORMAT_SWIZZLE_0, /* r */
1020 UTIL_FORMAT_SWIZZLE_0, /* g */
1021 UTIL_FORMAT_SWIZZLE_0, /* b */
1022 UTIL_FORMAT_SWIZZLE_X /* a */
1023 },
1024 UTIL_FORMAT_COLORSPACE_RGB,
1025 };
1026
1027 const struct util_format_description
1028 util_format_i16_unorm_description = {
1029 PIPE_FORMAT_I16_UNORM,
1030 "PIPE_FORMAT_I16_UNORM",
1031 "i16_unorm",
1032 {1, 1, 16}, /* block */
1033 UTIL_FORMAT_LAYOUT_PLAIN,
1034 1, /* nr_channels */
1035 TRUE, /* is_array */
1036 TRUE, /* is_bitmask */
1037 FALSE, /* is_mixed */
1038 {
1039 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = rgba */
1040 {0, 0, 0, 0, 0},
1041 {0, 0, 0, 0, 0},
1042 {0, 0, 0, 0, 0}
1043 },
1044 {
1045 UTIL_FORMAT_SWIZZLE_X, /* r */
1046 UTIL_FORMAT_SWIZZLE_X, /* g */
1047 UTIL_FORMAT_SWIZZLE_X, /* b */
1048 UTIL_FORMAT_SWIZZLE_X /* a */
1049 },
1050 UTIL_FORMAT_COLORSPACE_RGB,
1051 };
1052
1053 const struct util_format_description
1054 util_format_l16a16_unorm_description = {
1055 PIPE_FORMAT_L16A16_UNORM,
1056 "PIPE_FORMAT_L16A16_UNORM",
1057 "l16a16_unorm",
1058 {1, 1, 32}, /* block */
1059 UTIL_FORMAT_LAYOUT_PLAIN,
1060 2, /* nr_channels */
1061 TRUE, /* is_array */
1062 TRUE, /* is_bitmask */
1063 FALSE, /* is_mixed */
1064 #ifdef PIPE_ARCH_BIG_ENDIAN
1065 {
1066 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* x = rgb */
1067 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* y = a */
1068 {0, 0, 0, 0, 0},
1069 {0, 0, 0, 0, 0}
1070 },
1071 #else
1072 {
1073 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
1074 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = a */
1075 {0, 0, 0, 0, 0},
1076 {0, 0, 0, 0, 0}
1077 },
1078 #endif
1079 #ifdef PIPE_ARCH_BIG_ENDIAN
1080 {
1081 UTIL_FORMAT_SWIZZLE_X, /* r */
1082 UTIL_FORMAT_SWIZZLE_X, /* g */
1083 UTIL_FORMAT_SWIZZLE_X, /* b */
1084 UTIL_FORMAT_SWIZZLE_Y /* a */
1085 },
1086 #else
1087 {
1088 UTIL_FORMAT_SWIZZLE_X, /* r */
1089 UTIL_FORMAT_SWIZZLE_X, /* g */
1090 UTIL_FORMAT_SWIZZLE_X, /* b */
1091 UTIL_FORMAT_SWIZZLE_Y /* a */
1092 },
1093 #endif
1094 UTIL_FORMAT_COLORSPACE_RGB,
1095 };
1096
1097 const struct util_format_description
1098 util_format_a8_snorm_description = {
1099 PIPE_FORMAT_A8_SNORM,
1100 "PIPE_FORMAT_A8_SNORM",
1101 "a8_snorm",
1102 {1, 1, 8}, /* block */
1103 UTIL_FORMAT_LAYOUT_PLAIN,
1104 1, /* nr_channels */
1105 TRUE, /* is_array */
1106 TRUE, /* is_bitmask */
1107 FALSE, /* is_mixed */
1108 {
1109 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = a */
1110 {0, 0, 0, 0, 0},
1111 {0, 0, 0, 0, 0},
1112 {0, 0, 0, 0, 0}
1113 },
1114 {
1115 UTIL_FORMAT_SWIZZLE_0, /* r */
1116 UTIL_FORMAT_SWIZZLE_0, /* g */
1117 UTIL_FORMAT_SWIZZLE_0, /* b */
1118 UTIL_FORMAT_SWIZZLE_X /* a */
1119 },
1120 UTIL_FORMAT_COLORSPACE_RGB,
1121 };
1122
1123 const struct util_format_description
1124 util_format_l8_snorm_description = {
1125 PIPE_FORMAT_L8_SNORM,
1126 "PIPE_FORMAT_L8_SNORM",
1127 "l8_snorm",
1128 {1, 1, 8}, /* block */
1129 UTIL_FORMAT_LAYOUT_PLAIN,
1130 1, /* nr_channels */
1131 TRUE, /* is_array */
1132 TRUE, /* is_bitmask */
1133 FALSE, /* is_mixed */
1134 {
1135 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
1136 {0, 0, 0, 0, 0},
1137 {0, 0, 0, 0, 0},
1138 {0, 0, 0, 0, 0}
1139 },
1140 {
1141 UTIL_FORMAT_SWIZZLE_X, /* r */
1142 UTIL_FORMAT_SWIZZLE_X, /* g */
1143 UTIL_FORMAT_SWIZZLE_X, /* b */
1144 UTIL_FORMAT_SWIZZLE_1 /* a */
1145 },
1146 UTIL_FORMAT_COLORSPACE_RGB,
1147 };
1148
1149 const struct util_format_description
1150 util_format_l8a8_snorm_description = {
1151 PIPE_FORMAT_L8A8_SNORM,
1152 "PIPE_FORMAT_L8A8_SNORM",
1153 "l8a8_snorm",
1154 {1, 1, 16}, /* block */
1155 UTIL_FORMAT_LAYOUT_PLAIN,
1156 2, /* nr_channels */
1157 TRUE, /* is_array */
1158 TRUE, /* is_bitmask */
1159 FALSE, /* is_mixed */
1160 #ifdef PIPE_ARCH_BIG_ENDIAN
1161 {
1162 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* x = rgb */
1163 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* y = a */
1164 {0, 0, 0, 0, 0},
1165 {0, 0, 0, 0, 0}
1166 },
1167 #else
1168 {
1169 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
1170 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = a */
1171 {0, 0, 0, 0, 0},
1172 {0, 0, 0, 0, 0}
1173 },
1174 #endif
1175 #ifdef PIPE_ARCH_BIG_ENDIAN
1176 {
1177 UTIL_FORMAT_SWIZZLE_X, /* r */
1178 UTIL_FORMAT_SWIZZLE_X, /* g */
1179 UTIL_FORMAT_SWIZZLE_X, /* b */
1180 UTIL_FORMAT_SWIZZLE_Y /* a */
1181 },
1182 #else
1183 {
1184 UTIL_FORMAT_SWIZZLE_X, /* r */
1185 UTIL_FORMAT_SWIZZLE_X, /* g */
1186 UTIL_FORMAT_SWIZZLE_X, /* b */
1187 UTIL_FORMAT_SWIZZLE_Y /* a */
1188 },
1189 #endif
1190 UTIL_FORMAT_COLORSPACE_RGB,
1191 };
1192
1193 const struct util_format_description
1194 util_format_i8_snorm_description = {
1195 PIPE_FORMAT_I8_SNORM,
1196 "PIPE_FORMAT_I8_SNORM",
1197 "i8_snorm",
1198 {1, 1, 8}, /* block */
1199 UTIL_FORMAT_LAYOUT_PLAIN,
1200 1, /* nr_channels */
1201 TRUE, /* is_array */
1202 TRUE, /* is_bitmask */
1203 FALSE, /* is_mixed */
1204 {
1205 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = rgba */
1206 {0, 0, 0, 0, 0},
1207 {0, 0, 0, 0, 0},
1208 {0, 0, 0, 0, 0}
1209 },
1210 {
1211 UTIL_FORMAT_SWIZZLE_X, /* r */
1212 UTIL_FORMAT_SWIZZLE_X, /* g */
1213 UTIL_FORMAT_SWIZZLE_X, /* b */
1214 UTIL_FORMAT_SWIZZLE_X /* a */
1215 },
1216 UTIL_FORMAT_COLORSPACE_RGB,
1217 };
1218
1219 const struct util_format_description
1220 util_format_a16_snorm_description = {
1221 PIPE_FORMAT_A16_SNORM,
1222 "PIPE_FORMAT_A16_SNORM",
1223 "a16_snorm",
1224 {1, 1, 16}, /* block */
1225 UTIL_FORMAT_LAYOUT_PLAIN,
1226 1, /* nr_channels */
1227 TRUE, /* is_array */
1228 TRUE, /* is_bitmask */
1229 FALSE, /* is_mixed */
1230 {
1231 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = a */
1232 {0, 0, 0, 0, 0},
1233 {0, 0, 0, 0, 0},
1234 {0, 0, 0, 0, 0}
1235 },
1236 {
1237 UTIL_FORMAT_SWIZZLE_0, /* r */
1238 UTIL_FORMAT_SWIZZLE_0, /* g */
1239 UTIL_FORMAT_SWIZZLE_0, /* b */
1240 UTIL_FORMAT_SWIZZLE_X /* a */
1241 },
1242 UTIL_FORMAT_COLORSPACE_RGB,
1243 };
1244
1245 const struct util_format_description
1246 util_format_l16_snorm_description = {
1247 PIPE_FORMAT_L16_SNORM,
1248 "PIPE_FORMAT_L16_SNORM",
1249 "l16_snorm",
1250 {1, 1, 16}, /* block */
1251 UTIL_FORMAT_LAYOUT_PLAIN,
1252 1, /* nr_channels */
1253 TRUE, /* is_array */
1254 TRUE, /* is_bitmask */
1255 FALSE, /* is_mixed */
1256 {
1257 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
1258 {0, 0, 0, 0, 0},
1259 {0, 0, 0, 0, 0},
1260 {0, 0, 0, 0, 0}
1261 },
1262 {
1263 UTIL_FORMAT_SWIZZLE_X, /* r */
1264 UTIL_FORMAT_SWIZZLE_X, /* g */
1265 UTIL_FORMAT_SWIZZLE_X, /* b */
1266 UTIL_FORMAT_SWIZZLE_1 /* a */
1267 },
1268 UTIL_FORMAT_COLORSPACE_RGB,
1269 };
1270
1271 const struct util_format_description
1272 util_format_l16a16_snorm_description = {
1273 PIPE_FORMAT_L16A16_SNORM,
1274 "PIPE_FORMAT_L16A16_SNORM",
1275 "l16a16_snorm",
1276 {1, 1, 32}, /* block */
1277 UTIL_FORMAT_LAYOUT_PLAIN,
1278 2, /* nr_channels */
1279 TRUE, /* is_array */
1280 TRUE, /* is_bitmask */
1281 FALSE, /* is_mixed */
1282 #ifdef PIPE_ARCH_BIG_ENDIAN
1283 {
1284 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* x = rgb */
1285 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* y = a */
1286 {0, 0, 0, 0, 0},
1287 {0, 0, 0, 0, 0}
1288 },
1289 #else
1290 {
1291 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = rgb */
1292 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = a */
1293 {0, 0, 0, 0, 0},
1294 {0, 0, 0, 0, 0}
1295 },
1296 #endif
1297 #ifdef PIPE_ARCH_BIG_ENDIAN
1298 {
1299 UTIL_FORMAT_SWIZZLE_X, /* r */
1300 UTIL_FORMAT_SWIZZLE_X, /* g */
1301 UTIL_FORMAT_SWIZZLE_X, /* b */
1302 UTIL_FORMAT_SWIZZLE_Y /* a */
1303 },
1304 #else
1305 {
1306 UTIL_FORMAT_SWIZZLE_X, /* r */
1307 UTIL_FORMAT_SWIZZLE_X, /* g */
1308 UTIL_FORMAT_SWIZZLE_X, /* b */
1309 UTIL_FORMAT_SWIZZLE_Y /* a */
1310 },
1311 #endif
1312 UTIL_FORMAT_COLORSPACE_RGB,
1313 };
1314
1315 const struct util_format_description
1316 util_format_i16_snorm_description = {
1317 PIPE_FORMAT_I16_SNORM,
1318 "PIPE_FORMAT_I16_SNORM",
1319 "i16_snorm",
1320 {1, 1, 16}, /* block */
1321 UTIL_FORMAT_LAYOUT_PLAIN,
1322 1, /* nr_channels */
1323 TRUE, /* is_array */
1324 TRUE, /* is_bitmask */
1325 FALSE, /* is_mixed */
1326 {
1327 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = rgba */
1328 {0, 0, 0, 0, 0},
1329 {0, 0, 0, 0, 0},
1330 {0, 0, 0, 0, 0}
1331 },
1332 {
1333 UTIL_FORMAT_SWIZZLE_X, /* r */
1334 UTIL_FORMAT_SWIZZLE_X, /* g */
1335 UTIL_FORMAT_SWIZZLE_X, /* b */
1336 UTIL_FORMAT_SWIZZLE_X /* a */
1337 },
1338 UTIL_FORMAT_COLORSPACE_RGB,
1339 };
1340
1341 const struct util_format_description
1342 util_format_a16_float_description = {
1343 PIPE_FORMAT_A16_FLOAT,
1344 "PIPE_FORMAT_A16_FLOAT",
1345 "a16_float",
1346 {1, 1, 16}, /* block */
1347 UTIL_FORMAT_LAYOUT_PLAIN,
1348 1, /* nr_channels */
1349 TRUE, /* is_array */
1350 FALSE, /* is_bitmask */
1351 FALSE, /* is_mixed */
1352 {
1353 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = a */
1354 {0, 0, 0, 0, 0},
1355 {0, 0, 0, 0, 0},
1356 {0, 0, 0, 0, 0}
1357 },
1358 {
1359 UTIL_FORMAT_SWIZZLE_0, /* r */
1360 UTIL_FORMAT_SWIZZLE_0, /* g */
1361 UTIL_FORMAT_SWIZZLE_0, /* b */
1362 UTIL_FORMAT_SWIZZLE_X /* a */
1363 },
1364 UTIL_FORMAT_COLORSPACE_RGB,
1365 };
1366
1367 const struct util_format_description
1368 util_format_l16_float_description = {
1369 PIPE_FORMAT_L16_FLOAT,
1370 "PIPE_FORMAT_L16_FLOAT",
1371 "l16_float",
1372 {1, 1, 16}, /* block */
1373 UTIL_FORMAT_LAYOUT_PLAIN,
1374 1, /* nr_channels */
1375 TRUE, /* is_array */
1376 FALSE, /* is_bitmask */
1377 FALSE, /* is_mixed */
1378 {
1379 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = rgb */
1380 {0, 0, 0, 0, 0},
1381 {0, 0, 0, 0, 0},
1382 {0, 0, 0, 0, 0}
1383 },
1384 {
1385 UTIL_FORMAT_SWIZZLE_X, /* r */
1386 UTIL_FORMAT_SWIZZLE_X, /* g */
1387 UTIL_FORMAT_SWIZZLE_X, /* b */
1388 UTIL_FORMAT_SWIZZLE_1 /* a */
1389 },
1390 UTIL_FORMAT_COLORSPACE_RGB,
1391 };
1392
1393 const struct util_format_description
1394 util_format_l16a16_float_description = {
1395 PIPE_FORMAT_L16A16_FLOAT,
1396 "PIPE_FORMAT_L16A16_FLOAT",
1397 "l16a16_float",
1398 {1, 1, 32}, /* block */
1399 UTIL_FORMAT_LAYOUT_PLAIN,
1400 2, /* nr_channels */
1401 TRUE, /* is_array */
1402 FALSE, /* is_bitmask */
1403 FALSE, /* is_mixed */
1404 #ifdef PIPE_ARCH_BIG_ENDIAN
1405 {
1406 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* x = rgb */
1407 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* y = a */
1408 {0, 0, 0, 0, 0},
1409 {0, 0, 0, 0, 0}
1410 },
1411 #else
1412 {
1413 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = rgb */
1414 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = a */
1415 {0, 0, 0, 0, 0},
1416 {0, 0, 0, 0, 0}
1417 },
1418 #endif
1419 #ifdef PIPE_ARCH_BIG_ENDIAN
1420 {
1421 UTIL_FORMAT_SWIZZLE_X, /* r */
1422 UTIL_FORMAT_SWIZZLE_X, /* g */
1423 UTIL_FORMAT_SWIZZLE_X, /* b */
1424 UTIL_FORMAT_SWIZZLE_Y /* a */
1425 },
1426 #else
1427 {
1428 UTIL_FORMAT_SWIZZLE_X, /* r */
1429 UTIL_FORMAT_SWIZZLE_X, /* g */
1430 UTIL_FORMAT_SWIZZLE_X, /* b */
1431 UTIL_FORMAT_SWIZZLE_Y /* a */
1432 },
1433 #endif
1434 UTIL_FORMAT_COLORSPACE_RGB,
1435 };
1436
1437 const struct util_format_description
1438 util_format_i16_float_description = {
1439 PIPE_FORMAT_I16_FLOAT,
1440 "PIPE_FORMAT_I16_FLOAT",
1441 "i16_float",
1442 {1, 1, 16}, /* block */
1443 UTIL_FORMAT_LAYOUT_PLAIN,
1444 1, /* nr_channels */
1445 TRUE, /* is_array */
1446 FALSE, /* is_bitmask */
1447 FALSE, /* is_mixed */
1448 {
1449 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = rgba */
1450 {0, 0, 0, 0, 0},
1451 {0, 0, 0, 0, 0},
1452 {0, 0, 0, 0, 0}
1453 },
1454 {
1455 UTIL_FORMAT_SWIZZLE_X, /* r */
1456 UTIL_FORMAT_SWIZZLE_X, /* g */
1457 UTIL_FORMAT_SWIZZLE_X, /* b */
1458 UTIL_FORMAT_SWIZZLE_X /* a */
1459 },
1460 UTIL_FORMAT_COLORSPACE_RGB,
1461 };
1462
1463 const struct util_format_description
1464 util_format_a32_float_description = {
1465 PIPE_FORMAT_A32_FLOAT,
1466 "PIPE_FORMAT_A32_FLOAT",
1467 "a32_float",
1468 {1, 1, 32}, /* block */
1469 UTIL_FORMAT_LAYOUT_PLAIN,
1470 1, /* nr_channels */
1471 TRUE, /* is_array */
1472 FALSE, /* is_bitmask */
1473 FALSE, /* is_mixed */
1474 {
1475 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = a */
1476 {0, 0, 0, 0, 0},
1477 {0, 0, 0, 0, 0},
1478 {0, 0, 0, 0, 0}
1479 },
1480 {
1481 UTIL_FORMAT_SWIZZLE_0, /* r */
1482 UTIL_FORMAT_SWIZZLE_0, /* g */
1483 UTIL_FORMAT_SWIZZLE_0, /* b */
1484 UTIL_FORMAT_SWIZZLE_X /* a */
1485 },
1486 UTIL_FORMAT_COLORSPACE_RGB,
1487 };
1488
1489 const struct util_format_description
1490 util_format_l32_float_description = {
1491 PIPE_FORMAT_L32_FLOAT,
1492 "PIPE_FORMAT_L32_FLOAT",
1493 "l32_float",
1494 {1, 1, 32}, /* block */
1495 UTIL_FORMAT_LAYOUT_PLAIN,
1496 1, /* nr_channels */
1497 TRUE, /* is_array */
1498 FALSE, /* is_bitmask */
1499 FALSE, /* is_mixed */
1500 {
1501 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = rgb */
1502 {0, 0, 0, 0, 0},
1503 {0, 0, 0, 0, 0},
1504 {0, 0, 0, 0, 0}
1505 },
1506 {
1507 UTIL_FORMAT_SWIZZLE_X, /* r */
1508 UTIL_FORMAT_SWIZZLE_X, /* g */
1509 UTIL_FORMAT_SWIZZLE_X, /* b */
1510 UTIL_FORMAT_SWIZZLE_1 /* a */
1511 },
1512 UTIL_FORMAT_COLORSPACE_RGB,
1513 };
1514
1515 const struct util_format_description
1516 util_format_l32a32_float_description = {
1517 PIPE_FORMAT_L32A32_FLOAT,
1518 "PIPE_FORMAT_L32A32_FLOAT",
1519 "l32a32_float",
1520 {1, 1, 64}, /* block */
1521 UTIL_FORMAT_LAYOUT_PLAIN,
1522 2, /* nr_channels */
1523 TRUE, /* is_array */
1524 FALSE, /* is_bitmask */
1525 FALSE, /* is_mixed */
1526 #ifdef PIPE_ARCH_BIG_ENDIAN
1527 {
1528 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* x = rgb */
1529 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* y = a */
1530 {0, 0, 0, 0, 0},
1531 {0, 0, 0, 0, 0}
1532 },
1533 #else
1534 {
1535 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = rgb */
1536 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = a */
1537 {0, 0, 0, 0, 0},
1538 {0, 0, 0, 0, 0}
1539 },
1540 #endif
1541 #ifdef PIPE_ARCH_BIG_ENDIAN
1542 {
1543 UTIL_FORMAT_SWIZZLE_X, /* r */
1544 UTIL_FORMAT_SWIZZLE_X, /* g */
1545 UTIL_FORMAT_SWIZZLE_X, /* b */
1546 UTIL_FORMAT_SWIZZLE_Y /* a */
1547 },
1548 #else
1549 {
1550 UTIL_FORMAT_SWIZZLE_X, /* r */
1551 UTIL_FORMAT_SWIZZLE_X, /* g */
1552 UTIL_FORMAT_SWIZZLE_X, /* b */
1553 UTIL_FORMAT_SWIZZLE_Y /* a */
1554 },
1555 #endif
1556 UTIL_FORMAT_COLORSPACE_RGB,
1557 };
1558
1559 const struct util_format_description
1560 util_format_i32_float_description = {
1561 PIPE_FORMAT_I32_FLOAT,
1562 "PIPE_FORMAT_I32_FLOAT",
1563 "i32_float",
1564 {1, 1, 32}, /* block */
1565 UTIL_FORMAT_LAYOUT_PLAIN,
1566 1, /* nr_channels */
1567 TRUE, /* is_array */
1568 FALSE, /* is_bitmask */
1569 FALSE, /* is_mixed */
1570 {
1571 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = rgba */
1572 {0, 0, 0, 0, 0},
1573 {0, 0, 0, 0, 0},
1574 {0, 0, 0, 0, 0}
1575 },
1576 {
1577 UTIL_FORMAT_SWIZZLE_X, /* r */
1578 UTIL_FORMAT_SWIZZLE_X, /* g */
1579 UTIL_FORMAT_SWIZZLE_X, /* b */
1580 UTIL_FORMAT_SWIZZLE_X /* a */
1581 },
1582 UTIL_FORMAT_COLORSPACE_RGB,
1583 };
1584
1585 const struct util_format_description
1586 util_format_l8_srgb_description = {
1587 PIPE_FORMAT_L8_SRGB,
1588 "PIPE_FORMAT_L8_SRGB",
1589 "l8_srgb",
1590 {1, 1, 8}, /* block */
1591 UTIL_FORMAT_LAYOUT_PLAIN,
1592 1, /* nr_channels */
1593 TRUE, /* is_array */
1594 TRUE, /* is_bitmask */
1595 FALSE, /* is_mixed */
1596 {
1597 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
1598 {0, 0, 0, 0, 0},
1599 {0, 0, 0, 0, 0},
1600 {0, 0, 0, 0, 0}
1601 },
1602 {
1603 UTIL_FORMAT_SWIZZLE_X, /* sr */
1604 UTIL_FORMAT_SWIZZLE_X, /* sg */
1605 UTIL_FORMAT_SWIZZLE_X, /* sb */
1606 UTIL_FORMAT_SWIZZLE_1 /* a */
1607 },
1608 UTIL_FORMAT_COLORSPACE_SRGB,
1609 };
1610
1611 const struct util_format_description
1612 util_format_r8_srgb_description = {
1613 PIPE_FORMAT_R8_SRGB,
1614 "PIPE_FORMAT_R8_SRGB",
1615 "r8_srgb",
1616 {1, 1, 8}, /* block */
1617 UTIL_FORMAT_LAYOUT_PLAIN,
1618 1, /* nr_channels */
1619 TRUE, /* is_array */
1620 TRUE, /* is_bitmask */
1621 FALSE, /* is_mixed */
1622 {
1623 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
1624 {0, 0, 0, 0, 0},
1625 {0, 0, 0, 0, 0},
1626 {0, 0, 0, 0, 0}
1627 },
1628 {
1629 UTIL_FORMAT_SWIZZLE_X, /* sr */
1630 UTIL_FORMAT_SWIZZLE_0, /* sg */
1631 UTIL_FORMAT_SWIZZLE_0, /* sb */
1632 UTIL_FORMAT_SWIZZLE_1 /* a */
1633 },
1634 UTIL_FORMAT_COLORSPACE_SRGB,
1635 };
1636
1637 const struct util_format_description
1638 util_format_l8a8_srgb_description = {
1639 PIPE_FORMAT_L8A8_SRGB,
1640 "PIPE_FORMAT_L8A8_SRGB",
1641 "l8a8_srgb",
1642 {1, 1, 16}, /* block */
1643 UTIL_FORMAT_LAYOUT_PLAIN,
1644 2, /* nr_channels */
1645 TRUE, /* is_array */
1646 TRUE, /* is_bitmask */
1647 FALSE, /* is_mixed */
1648 #ifdef PIPE_ARCH_BIG_ENDIAN
1649 {
1650 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = rgb */
1651 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = a */
1652 {0, 0, 0, 0, 0},
1653 {0, 0, 0, 0, 0}
1654 },
1655 #else
1656 {
1657 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = rgb */
1658 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = a */
1659 {0, 0, 0, 0, 0},
1660 {0, 0, 0, 0, 0}
1661 },
1662 #endif
1663 #ifdef PIPE_ARCH_BIG_ENDIAN
1664 {
1665 UTIL_FORMAT_SWIZZLE_X, /* sr */
1666 UTIL_FORMAT_SWIZZLE_X, /* sg */
1667 UTIL_FORMAT_SWIZZLE_X, /* sb */
1668 UTIL_FORMAT_SWIZZLE_Y /* a */
1669 },
1670 #else
1671 {
1672 UTIL_FORMAT_SWIZZLE_X, /* sr */
1673 UTIL_FORMAT_SWIZZLE_X, /* sg */
1674 UTIL_FORMAT_SWIZZLE_X, /* sb */
1675 UTIL_FORMAT_SWIZZLE_Y /* a */
1676 },
1677 #endif
1678 UTIL_FORMAT_COLORSPACE_SRGB,
1679 };
1680
1681 const struct util_format_description
1682 util_format_r8g8b8_srgb_description = {
1683 PIPE_FORMAT_R8G8B8_SRGB,
1684 "PIPE_FORMAT_R8G8B8_SRGB",
1685 "r8g8b8_srgb",
1686 {1, 1, 24}, /* block */
1687 UTIL_FORMAT_LAYOUT_PLAIN,
1688 3, /* nr_channels */
1689 TRUE, /* is_array */
1690 FALSE, /* is_bitmask */
1691 FALSE, /* is_mixed */
1692 #ifdef PIPE_ARCH_BIG_ENDIAN
1693 {
1694 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* x = r */
1695 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
1696 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* z = b */
1697 {0, 0, 0, 0, 0}
1698 },
1699 #else
1700 {
1701 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
1702 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
1703 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
1704 {0, 0, 0, 0, 0}
1705 },
1706 #endif
1707 #ifdef PIPE_ARCH_BIG_ENDIAN
1708 {
1709 UTIL_FORMAT_SWIZZLE_X, /* sr */
1710 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1711 UTIL_FORMAT_SWIZZLE_Z, /* sb */
1712 UTIL_FORMAT_SWIZZLE_1 /* a */
1713 },
1714 #else
1715 {
1716 UTIL_FORMAT_SWIZZLE_X, /* sr */
1717 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1718 UTIL_FORMAT_SWIZZLE_Z, /* sb */
1719 UTIL_FORMAT_SWIZZLE_1 /* a */
1720 },
1721 #endif
1722 UTIL_FORMAT_COLORSPACE_SRGB,
1723 };
1724
1725 const struct util_format_description
1726 util_format_r8g8b8a8_srgb_description = {
1727 PIPE_FORMAT_R8G8B8A8_SRGB,
1728 "PIPE_FORMAT_R8G8B8A8_SRGB",
1729 "r8g8b8a8_srgb",
1730 {1, 1, 32}, /* block */
1731 UTIL_FORMAT_LAYOUT_PLAIN,
1732 4, /* nr_channels */
1733 TRUE, /* is_array */
1734 TRUE, /* is_bitmask */
1735 FALSE, /* is_mixed */
1736 #ifdef PIPE_ARCH_BIG_ENDIAN
1737 {
1738 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = r */
1739 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
1740 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = b */
1741 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = a */
1742 },
1743 #else
1744 {
1745 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
1746 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
1747 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
1748 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
1749 },
1750 #endif
1751 #ifdef PIPE_ARCH_BIG_ENDIAN
1752 {
1753 UTIL_FORMAT_SWIZZLE_X, /* sr */
1754 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1755 UTIL_FORMAT_SWIZZLE_Z, /* sb */
1756 UTIL_FORMAT_SWIZZLE_W /* a */
1757 },
1758 #else
1759 {
1760 UTIL_FORMAT_SWIZZLE_X, /* sr */
1761 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1762 UTIL_FORMAT_SWIZZLE_Z, /* sb */
1763 UTIL_FORMAT_SWIZZLE_W /* a */
1764 },
1765 #endif
1766 UTIL_FORMAT_COLORSPACE_SRGB,
1767 };
1768
1769 const struct util_format_description
1770 util_format_a8b8g8r8_srgb_description = {
1771 PIPE_FORMAT_A8B8G8R8_SRGB,
1772 "PIPE_FORMAT_A8B8G8R8_SRGB",
1773 "a8b8g8r8_srgb",
1774 {1, 1, 32}, /* block */
1775 UTIL_FORMAT_LAYOUT_PLAIN,
1776 4, /* nr_channels */
1777 TRUE, /* is_array */
1778 TRUE, /* is_bitmask */
1779 FALSE, /* is_mixed */
1780 #ifdef PIPE_ARCH_BIG_ENDIAN
1781 {
1782 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = a */
1783 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = b */
1784 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
1785 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = r */
1786 },
1787 #else
1788 {
1789 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
1790 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
1791 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
1792 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
1793 },
1794 #endif
1795 #ifdef PIPE_ARCH_BIG_ENDIAN
1796 {
1797 UTIL_FORMAT_SWIZZLE_W, /* sr */
1798 UTIL_FORMAT_SWIZZLE_Z, /* sg */
1799 UTIL_FORMAT_SWIZZLE_Y, /* sb */
1800 UTIL_FORMAT_SWIZZLE_X /* a */
1801 },
1802 #else
1803 {
1804 UTIL_FORMAT_SWIZZLE_W, /* sr */
1805 UTIL_FORMAT_SWIZZLE_Z, /* sg */
1806 UTIL_FORMAT_SWIZZLE_Y, /* sb */
1807 UTIL_FORMAT_SWIZZLE_X /* a */
1808 },
1809 #endif
1810 UTIL_FORMAT_COLORSPACE_SRGB,
1811 };
1812
1813 const struct util_format_description
1814 util_format_x8b8g8r8_srgb_description = {
1815 PIPE_FORMAT_X8B8G8R8_SRGB,
1816 "PIPE_FORMAT_X8B8G8R8_SRGB",
1817 "x8b8g8r8_srgb",
1818 {1, 1, 32}, /* block */
1819 UTIL_FORMAT_LAYOUT_PLAIN,
1820 4, /* nr_channels */
1821 TRUE, /* is_array */
1822 TRUE, /* is_bitmask */
1823 FALSE, /* is_mixed */
1824 #ifdef PIPE_ARCH_BIG_ENDIAN
1825 {
1826 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
1827 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = b */
1828 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
1829 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = r */
1830 },
1831 #else
1832 {
1833 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
1834 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = b */
1835 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
1836 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = r */
1837 },
1838 #endif
1839 #ifdef PIPE_ARCH_BIG_ENDIAN
1840 {
1841 UTIL_FORMAT_SWIZZLE_W, /* sr */
1842 UTIL_FORMAT_SWIZZLE_Z, /* sg */
1843 UTIL_FORMAT_SWIZZLE_Y, /* sb */
1844 UTIL_FORMAT_SWIZZLE_1 /* a */
1845 },
1846 #else
1847 {
1848 UTIL_FORMAT_SWIZZLE_W, /* sr */
1849 UTIL_FORMAT_SWIZZLE_Z, /* sg */
1850 UTIL_FORMAT_SWIZZLE_Y, /* sb */
1851 UTIL_FORMAT_SWIZZLE_1 /* a */
1852 },
1853 #endif
1854 UTIL_FORMAT_COLORSPACE_SRGB,
1855 };
1856
1857 const struct util_format_description
1858 util_format_b8g8r8a8_srgb_description = {
1859 PIPE_FORMAT_B8G8R8A8_SRGB,
1860 "PIPE_FORMAT_B8G8R8A8_SRGB",
1861 "b8g8r8a8_srgb",
1862 {1, 1, 32}, /* block */
1863 UTIL_FORMAT_LAYOUT_PLAIN,
1864 4, /* nr_channels */
1865 TRUE, /* is_array */
1866 TRUE, /* is_bitmask */
1867 FALSE, /* is_mixed */
1868 #ifdef PIPE_ARCH_BIG_ENDIAN
1869 {
1870 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = b */
1871 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
1872 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = r */
1873 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = a */
1874 },
1875 #else
1876 {
1877 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
1878 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
1879 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
1880 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
1881 },
1882 #endif
1883 #ifdef PIPE_ARCH_BIG_ENDIAN
1884 {
1885 UTIL_FORMAT_SWIZZLE_Z, /* sr */
1886 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1887 UTIL_FORMAT_SWIZZLE_X, /* sb */
1888 UTIL_FORMAT_SWIZZLE_W /* a */
1889 },
1890 #else
1891 {
1892 UTIL_FORMAT_SWIZZLE_Z, /* sr */
1893 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1894 UTIL_FORMAT_SWIZZLE_X, /* sb */
1895 UTIL_FORMAT_SWIZZLE_W /* a */
1896 },
1897 #endif
1898 UTIL_FORMAT_COLORSPACE_SRGB,
1899 };
1900
1901 const struct util_format_description
1902 util_format_b8g8r8x8_srgb_description = {
1903 PIPE_FORMAT_B8G8R8X8_SRGB,
1904 "PIPE_FORMAT_B8G8R8X8_SRGB",
1905 "b8g8r8x8_srgb",
1906 {1, 1, 32}, /* block */
1907 UTIL_FORMAT_LAYOUT_PLAIN,
1908 4, /* nr_channels */
1909 TRUE, /* is_array */
1910 TRUE, /* is_bitmask */
1911 FALSE, /* is_mixed */
1912 #ifdef PIPE_ARCH_BIG_ENDIAN
1913 {
1914 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = b */
1915 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
1916 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = r */
1917 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
1918 },
1919 #else
1920 {
1921 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = b */
1922 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
1923 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = r */
1924 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
1925 },
1926 #endif
1927 #ifdef PIPE_ARCH_BIG_ENDIAN
1928 {
1929 UTIL_FORMAT_SWIZZLE_Z, /* sr */
1930 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1931 UTIL_FORMAT_SWIZZLE_X, /* sb */
1932 UTIL_FORMAT_SWIZZLE_1 /* a */
1933 },
1934 #else
1935 {
1936 UTIL_FORMAT_SWIZZLE_Z, /* sr */
1937 UTIL_FORMAT_SWIZZLE_Y, /* sg */
1938 UTIL_FORMAT_SWIZZLE_X, /* sb */
1939 UTIL_FORMAT_SWIZZLE_1 /* a */
1940 },
1941 #endif
1942 UTIL_FORMAT_COLORSPACE_SRGB,
1943 };
1944
1945 const struct util_format_description
1946 util_format_a8r8g8b8_srgb_description = {
1947 PIPE_FORMAT_A8R8G8B8_SRGB,
1948 "PIPE_FORMAT_A8R8G8B8_SRGB",
1949 "a8r8g8b8_srgb",
1950 {1, 1, 32}, /* block */
1951 UTIL_FORMAT_LAYOUT_PLAIN,
1952 4, /* nr_channels */
1953 TRUE, /* is_array */
1954 TRUE, /* is_bitmask */
1955 FALSE, /* is_mixed */
1956 #ifdef PIPE_ARCH_BIG_ENDIAN
1957 {
1958 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = a */
1959 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = r */
1960 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
1961 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = b */
1962 },
1963 #else
1964 {
1965 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
1966 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
1967 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
1968 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
1969 },
1970 #endif
1971 #ifdef PIPE_ARCH_BIG_ENDIAN
1972 {
1973 UTIL_FORMAT_SWIZZLE_Y, /* sr */
1974 UTIL_FORMAT_SWIZZLE_Z, /* sg */
1975 UTIL_FORMAT_SWIZZLE_W, /* sb */
1976 UTIL_FORMAT_SWIZZLE_X /* a */
1977 },
1978 #else
1979 {
1980 UTIL_FORMAT_SWIZZLE_Y, /* sr */
1981 UTIL_FORMAT_SWIZZLE_Z, /* sg */
1982 UTIL_FORMAT_SWIZZLE_W, /* sb */
1983 UTIL_FORMAT_SWIZZLE_X /* a */
1984 },
1985 #endif
1986 UTIL_FORMAT_COLORSPACE_SRGB,
1987 };
1988
1989 const struct util_format_description
1990 util_format_x8r8g8b8_srgb_description = {
1991 PIPE_FORMAT_X8R8G8B8_SRGB,
1992 "PIPE_FORMAT_X8R8G8B8_SRGB",
1993 "x8r8g8b8_srgb",
1994 {1, 1, 32}, /* block */
1995 UTIL_FORMAT_LAYOUT_PLAIN,
1996 4, /* nr_channels */
1997 TRUE, /* is_array */
1998 TRUE, /* is_bitmask */
1999 FALSE, /* is_mixed */
2000 #ifdef PIPE_ARCH_BIG_ENDIAN
2001 {
2002 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
2003 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = r */
2004 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = g */
2005 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = b */
2006 },
2007 #else
2008 {
2009 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
2010 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
2011 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = g */
2012 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = b */
2013 },
2014 #endif
2015 #ifdef PIPE_ARCH_BIG_ENDIAN
2016 {
2017 UTIL_FORMAT_SWIZZLE_Y, /* sr */
2018 UTIL_FORMAT_SWIZZLE_Z, /* sg */
2019 UTIL_FORMAT_SWIZZLE_W, /* sb */
2020 UTIL_FORMAT_SWIZZLE_1 /* a */
2021 },
2022 #else
2023 {
2024 UTIL_FORMAT_SWIZZLE_Y, /* sr */
2025 UTIL_FORMAT_SWIZZLE_Z, /* sg */
2026 UTIL_FORMAT_SWIZZLE_W, /* sb */
2027 UTIL_FORMAT_SWIZZLE_1 /* a */
2028 },
2029 #endif
2030 UTIL_FORMAT_COLORSPACE_SRGB,
2031 };
2032
2033 const struct util_format_description
2034 util_format_r8sg8sb8ux8u_norm_description = {
2035 PIPE_FORMAT_R8SG8SB8UX8U_NORM,
2036 "PIPE_FORMAT_R8SG8SB8UX8U_NORM",
2037 "r8sg8sb8ux8u_norm",
2038 {1, 1, 32}, /* block */
2039 UTIL_FORMAT_LAYOUT_PLAIN,
2040 4, /* nr_channels */
2041 FALSE, /* is_array */
2042 TRUE, /* is_bitmask */
2043 TRUE, /* is_mixed */
2044 #ifdef PIPE_ARCH_BIG_ENDIAN
2045 {
2046 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24}, /* x = r */
2047 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* y = g */
2048 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = b */
2049 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
2050 },
2051 #else
2052 {
2053 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
2054 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
2055 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
2056 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
2057 },
2058 #endif
2059 #ifdef PIPE_ARCH_BIG_ENDIAN
2060 {
2061 UTIL_FORMAT_SWIZZLE_X, /* r */
2062 UTIL_FORMAT_SWIZZLE_Y, /* g */
2063 UTIL_FORMAT_SWIZZLE_Z, /* b */
2064 UTIL_FORMAT_SWIZZLE_1 /* a */
2065 },
2066 #else
2067 {
2068 UTIL_FORMAT_SWIZZLE_X, /* r */
2069 UTIL_FORMAT_SWIZZLE_Y, /* g */
2070 UTIL_FORMAT_SWIZZLE_Z, /* b */
2071 UTIL_FORMAT_SWIZZLE_1 /* a */
2072 },
2073 #endif
2074 UTIL_FORMAT_COLORSPACE_RGB,
2075 };
2076
2077 const struct util_format_description
2078 util_format_r10sg10sb10sa2u_norm_description = {
2079 PIPE_FORMAT_R10SG10SB10SA2U_NORM,
2080 "PIPE_FORMAT_R10SG10SB10SA2U_NORM",
2081 "r10sg10sb10sa2u_norm",
2082 {1, 1, 32}, /* block */
2083 UTIL_FORMAT_LAYOUT_PLAIN,
2084 4, /* nr_channels */
2085 FALSE, /* is_array */
2086 TRUE, /* is_bitmask */
2087 TRUE, /* is_mixed */
2088 #ifdef PIPE_ARCH_BIG_ENDIAN
2089 {
2090 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30}, /* x = a */
2091 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* y = b */
2092 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* z = g */
2093 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0} /* w = r */
2094 },
2095 #else
2096 {
2097 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = r */
2098 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
2099 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = b */
2100 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2, 30} /* w = a */
2101 },
2102 #endif
2103 #ifdef PIPE_ARCH_BIG_ENDIAN
2104 {
2105 UTIL_FORMAT_SWIZZLE_W, /* r */
2106 UTIL_FORMAT_SWIZZLE_Z, /* g */
2107 UTIL_FORMAT_SWIZZLE_Y, /* b */
2108 UTIL_FORMAT_SWIZZLE_X /* a */
2109 },
2110 #else
2111 {
2112 UTIL_FORMAT_SWIZZLE_X, /* r */
2113 UTIL_FORMAT_SWIZZLE_Y, /* g */
2114 UTIL_FORMAT_SWIZZLE_Z, /* b */
2115 UTIL_FORMAT_SWIZZLE_W /* a */
2116 },
2117 #endif
2118 UTIL_FORMAT_COLORSPACE_RGB,
2119 };
2120
2121 const struct util_format_description
2122 util_format_r5sg5sb6u_norm_description = {
2123 PIPE_FORMAT_R5SG5SB6U_NORM,
2124 "PIPE_FORMAT_R5SG5SB6U_NORM",
2125 "r5sg5sb6u_norm",
2126 {1, 1, 16}, /* block */
2127 UTIL_FORMAT_LAYOUT_PLAIN,
2128 3, /* nr_channels */
2129 FALSE, /* is_array */
2130 TRUE, /* is_bitmask */
2131 TRUE, /* is_mixed */
2132 #ifdef PIPE_ARCH_BIG_ENDIAN
2133 {
2134 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 10}, /* x = b */
2135 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5, 5}, /* y = g */
2136 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5, 0}, /* z = r */
2137 {0, 0, 0, 0, 0}
2138 },
2139 #else
2140 {
2141 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5, 0}, /* x = r */
2142 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5, 5}, /* y = g */
2143 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 10}, /* z = b */
2144 {0, 0, 0, 0, 0}
2145 },
2146 #endif
2147 #ifdef PIPE_ARCH_BIG_ENDIAN
2148 {
2149 UTIL_FORMAT_SWIZZLE_Z, /* r */
2150 UTIL_FORMAT_SWIZZLE_Y, /* g */
2151 UTIL_FORMAT_SWIZZLE_X, /* b */
2152 UTIL_FORMAT_SWIZZLE_1 /* a */
2153 },
2154 #else
2155 {
2156 UTIL_FORMAT_SWIZZLE_X, /* r */
2157 UTIL_FORMAT_SWIZZLE_Y, /* g */
2158 UTIL_FORMAT_SWIZZLE_Z, /* b */
2159 UTIL_FORMAT_SWIZZLE_1 /* a */
2160 },
2161 #endif
2162 UTIL_FORMAT_COLORSPACE_RGB,
2163 };
2164
2165 const struct util_format_description
2166 util_format_s8_uint_description = {
2167 PIPE_FORMAT_S8_UINT,
2168 "PIPE_FORMAT_S8_UINT",
2169 "s8_uint",
2170 {1, 1, 8}, /* block */
2171 UTIL_FORMAT_LAYOUT_PLAIN,
2172 1, /* nr_channels */
2173 TRUE, /* is_array */
2174 TRUE, /* is_bitmask */
2175 FALSE, /* is_mixed */
2176 {
2177 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = s */
2178 {0, 0, 0, 0, 0},
2179 {0, 0, 0, 0, 0},
2180 {0, 0, 0, 0, 0}
2181 },
2182 {
2183 UTIL_FORMAT_SWIZZLE_NONE, /* z */
2184 UTIL_FORMAT_SWIZZLE_X, /* s */
2185 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2186 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2187 },
2188 UTIL_FORMAT_COLORSPACE_ZS,
2189 };
2190
2191 const struct util_format_description
2192 util_format_z16_unorm_description = {
2193 PIPE_FORMAT_Z16_UNORM,
2194 "PIPE_FORMAT_Z16_UNORM",
2195 "z16_unorm",
2196 {1, 1, 16}, /* block */
2197 UTIL_FORMAT_LAYOUT_PLAIN,
2198 1, /* nr_channels */
2199 TRUE, /* is_array */
2200 TRUE, /* is_bitmask */
2201 FALSE, /* is_mixed */
2202 {
2203 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = z */
2204 {0, 0, 0, 0, 0},
2205 {0, 0, 0, 0, 0},
2206 {0, 0, 0, 0, 0}
2207 },
2208 {
2209 UTIL_FORMAT_SWIZZLE_X, /* z */
2210 UTIL_FORMAT_SWIZZLE_NONE, /* s */
2211 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2212 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2213 },
2214 UTIL_FORMAT_COLORSPACE_ZS,
2215 };
2216
2217 const struct util_format_description
2218 util_format_z32_unorm_description = {
2219 PIPE_FORMAT_Z32_UNORM,
2220 "PIPE_FORMAT_Z32_UNORM",
2221 "z32_unorm",
2222 {1, 1, 32}, /* block */
2223 UTIL_FORMAT_LAYOUT_PLAIN,
2224 1, /* nr_channels */
2225 TRUE, /* is_array */
2226 TRUE, /* is_bitmask */
2227 FALSE, /* is_mixed */
2228 {
2229 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = z */
2230 {0, 0, 0, 0, 0},
2231 {0, 0, 0, 0, 0},
2232 {0, 0, 0, 0, 0}
2233 },
2234 {
2235 UTIL_FORMAT_SWIZZLE_X, /* z */
2236 UTIL_FORMAT_SWIZZLE_NONE, /* s */
2237 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2238 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2239 },
2240 UTIL_FORMAT_COLORSPACE_ZS,
2241 };
2242
2243 const struct util_format_description
2244 util_format_z32_float_description = {
2245 PIPE_FORMAT_Z32_FLOAT,
2246 "PIPE_FORMAT_Z32_FLOAT",
2247 "z32_float",
2248 {1, 1, 32}, /* block */
2249 UTIL_FORMAT_LAYOUT_PLAIN,
2250 1, /* nr_channels */
2251 TRUE, /* is_array */
2252 FALSE, /* is_bitmask */
2253 FALSE, /* is_mixed */
2254 {
2255 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = z */
2256 {0, 0, 0, 0, 0},
2257 {0, 0, 0, 0, 0},
2258 {0, 0, 0, 0, 0}
2259 },
2260 {
2261 UTIL_FORMAT_SWIZZLE_X, /* z */
2262 UTIL_FORMAT_SWIZZLE_NONE, /* s */
2263 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2264 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2265 },
2266 UTIL_FORMAT_COLORSPACE_ZS,
2267 };
2268
2269 const struct util_format_description
2270 util_format_z24_unorm_s8_uint_description = {
2271 PIPE_FORMAT_Z24_UNORM_S8_UINT,
2272 "PIPE_FORMAT_Z24_UNORM_S8_UINT",
2273 "z24_unorm_s8_uint",
2274 {1, 1, 32}, /* block */
2275 UTIL_FORMAT_LAYOUT_PLAIN,
2276 2, /* nr_channels */
2277 FALSE, /* is_array */
2278 TRUE, /* is_bitmask */
2279 TRUE, /* is_mixed */
2280 #ifdef PIPE_ARCH_BIG_ENDIAN
2281 {
2282 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* x = s */
2283 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 0}, /* y = z */
2284 {0, 0, 0, 0, 0},
2285 {0, 0, 0, 0, 0}
2286 },
2287 #else
2288 {
2289 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 0}, /* x = z */
2290 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* y = s */
2291 {0, 0, 0, 0, 0},
2292 {0, 0, 0, 0, 0}
2293 },
2294 #endif
2295 #ifdef PIPE_ARCH_BIG_ENDIAN
2296 {
2297 UTIL_FORMAT_SWIZZLE_Y, /* z */
2298 UTIL_FORMAT_SWIZZLE_X, /* s */
2299 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2300 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2301 },
2302 #else
2303 {
2304 UTIL_FORMAT_SWIZZLE_X, /* z */
2305 UTIL_FORMAT_SWIZZLE_Y, /* s */
2306 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2307 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2308 },
2309 #endif
2310 UTIL_FORMAT_COLORSPACE_ZS,
2311 };
2312
2313 const struct util_format_description
2314 util_format_s8_uint_z24_unorm_description = {
2315 PIPE_FORMAT_S8_UINT_Z24_UNORM,
2316 "PIPE_FORMAT_S8_UINT_Z24_UNORM",
2317 "s8_uint_z24_unorm",
2318 {1, 1, 32}, /* block */
2319 UTIL_FORMAT_LAYOUT_PLAIN,
2320 2, /* nr_channels */
2321 FALSE, /* is_array */
2322 TRUE, /* is_bitmask */
2323 TRUE, /* is_mixed */
2324 #ifdef PIPE_ARCH_BIG_ENDIAN
2325 {
2326 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 8}, /* x = z */
2327 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* y = s */
2328 {0, 0, 0, 0, 0},
2329 {0, 0, 0, 0, 0}
2330 },
2331 #else
2332 {
2333 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = s */
2334 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 8}, /* y = z */
2335 {0, 0, 0, 0, 0},
2336 {0, 0, 0, 0, 0}
2337 },
2338 #endif
2339 #ifdef PIPE_ARCH_BIG_ENDIAN
2340 {
2341 UTIL_FORMAT_SWIZZLE_X, /* z */
2342 UTIL_FORMAT_SWIZZLE_Y, /* s */
2343 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2344 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2345 },
2346 #else
2347 {
2348 UTIL_FORMAT_SWIZZLE_Y, /* z */
2349 UTIL_FORMAT_SWIZZLE_X, /* s */
2350 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2351 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2352 },
2353 #endif
2354 UTIL_FORMAT_COLORSPACE_ZS,
2355 };
2356
2357 const struct util_format_description
2358 util_format_x24s8_uint_description = {
2359 PIPE_FORMAT_X24S8_UINT,
2360 "PIPE_FORMAT_X24S8_UINT",
2361 "x24s8_uint",
2362 {1, 1, 32}, /* block */
2363 UTIL_FORMAT_LAYOUT_PLAIN,
2364 2, /* nr_channels */
2365 FALSE, /* is_array */
2366 TRUE, /* is_bitmask */
2367 FALSE, /* is_mixed */
2368 #ifdef PIPE_ARCH_BIG_ENDIAN
2369 {
2370 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* x = s */
2371 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 0}, /* y = x */
2372 {0, 0, 0, 0, 0},
2373 {0, 0, 0, 0, 0}
2374 },
2375 #else
2376 {
2377 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 0}, /* x = x */
2378 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* y = s */
2379 {0, 0, 0, 0, 0},
2380 {0, 0, 0, 0, 0}
2381 },
2382 #endif
2383 #ifdef PIPE_ARCH_BIG_ENDIAN
2384 {
2385 UTIL_FORMAT_SWIZZLE_NONE, /* z */
2386 UTIL_FORMAT_SWIZZLE_X, /* s */
2387 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2388 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2389 },
2390 #else
2391 {
2392 UTIL_FORMAT_SWIZZLE_NONE, /* z */
2393 UTIL_FORMAT_SWIZZLE_Y, /* s */
2394 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2395 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2396 },
2397 #endif
2398 UTIL_FORMAT_COLORSPACE_ZS,
2399 };
2400
2401 const struct util_format_description
2402 util_format_s8x24_uint_description = {
2403 PIPE_FORMAT_S8X24_UINT,
2404 "PIPE_FORMAT_S8X24_UINT",
2405 "s8x24_uint",
2406 {1, 1, 32}, /* block */
2407 UTIL_FORMAT_LAYOUT_PLAIN,
2408 2, /* nr_channels */
2409 FALSE, /* is_array */
2410 TRUE, /* is_bitmask */
2411 FALSE, /* is_mixed */
2412 #ifdef PIPE_ARCH_BIG_ENDIAN
2413 {
2414 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 8}, /* x = x */
2415 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* y = s */
2416 {0, 0, 0, 0, 0},
2417 {0, 0, 0, 0, 0}
2418 },
2419 #else
2420 {
2421 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = s */
2422 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 8}, /* y = x */
2423 {0, 0, 0, 0, 0},
2424 {0, 0, 0, 0, 0}
2425 },
2426 #endif
2427 #ifdef PIPE_ARCH_BIG_ENDIAN
2428 {
2429 UTIL_FORMAT_SWIZZLE_NONE, /* z */
2430 UTIL_FORMAT_SWIZZLE_Y, /* s */
2431 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2432 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2433 },
2434 #else
2435 {
2436 UTIL_FORMAT_SWIZZLE_NONE, /* z */
2437 UTIL_FORMAT_SWIZZLE_X, /* s */
2438 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2439 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2440 },
2441 #endif
2442 UTIL_FORMAT_COLORSPACE_ZS,
2443 };
2444
2445 const struct util_format_description
2446 util_format_z24x8_unorm_description = {
2447 PIPE_FORMAT_Z24X8_UNORM,
2448 "PIPE_FORMAT_Z24X8_UNORM",
2449 "z24x8_unorm",
2450 {1, 1, 32}, /* block */
2451 UTIL_FORMAT_LAYOUT_PLAIN,
2452 2, /* nr_channels */
2453 FALSE, /* is_array */
2454 TRUE, /* is_bitmask */
2455 FALSE, /* is_mixed */
2456 #ifdef PIPE_ARCH_BIG_ENDIAN
2457 {
2458 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
2459 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 0}, /* y = z */
2460 {0, 0, 0, 0, 0},
2461 {0, 0, 0, 0, 0}
2462 },
2463 #else
2464 {
2465 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 0}, /* x = z */
2466 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* y = x */
2467 {0, 0, 0, 0, 0},
2468 {0, 0, 0, 0, 0}
2469 },
2470 #endif
2471 #ifdef PIPE_ARCH_BIG_ENDIAN
2472 {
2473 UTIL_FORMAT_SWIZZLE_Y, /* z */
2474 UTIL_FORMAT_SWIZZLE_NONE, /* s */
2475 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2476 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2477 },
2478 #else
2479 {
2480 UTIL_FORMAT_SWIZZLE_X, /* z */
2481 UTIL_FORMAT_SWIZZLE_NONE, /* s */
2482 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2483 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2484 },
2485 #endif
2486 UTIL_FORMAT_COLORSPACE_ZS,
2487 };
2488
2489 const struct util_format_description
2490 util_format_x8z24_unorm_description = {
2491 PIPE_FORMAT_X8Z24_UNORM,
2492 "PIPE_FORMAT_X8Z24_UNORM",
2493 "x8z24_unorm",
2494 {1, 1, 32}, /* block */
2495 UTIL_FORMAT_LAYOUT_PLAIN,
2496 2, /* nr_channels */
2497 FALSE, /* is_array */
2498 TRUE, /* is_bitmask */
2499 FALSE, /* is_mixed */
2500 #ifdef PIPE_ARCH_BIG_ENDIAN
2501 {
2502 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 8}, /* x = z */
2503 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* y = x */
2504 {0, 0, 0, 0, 0},
2505 {0, 0, 0, 0, 0}
2506 },
2507 #else
2508 {
2509 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
2510 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24, 8}, /* y = z */
2511 {0, 0, 0, 0, 0},
2512 {0, 0, 0, 0, 0}
2513 },
2514 #endif
2515 #ifdef PIPE_ARCH_BIG_ENDIAN
2516 {
2517 UTIL_FORMAT_SWIZZLE_X, /* z */
2518 UTIL_FORMAT_SWIZZLE_NONE, /* s */
2519 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2520 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2521 },
2522 #else
2523 {
2524 UTIL_FORMAT_SWIZZLE_Y, /* z */
2525 UTIL_FORMAT_SWIZZLE_NONE, /* s */
2526 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2527 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2528 },
2529 #endif
2530 UTIL_FORMAT_COLORSPACE_ZS,
2531 };
2532
2533 const struct util_format_description
2534 util_format_z32_float_s8x24_uint_description = {
2535 PIPE_FORMAT_Z32_FLOAT_S8X24_UINT,
2536 "PIPE_FORMAT_Z32_FLOAT_S8X24_UINT",
2537 "z32_float_s8x24_uint",
2538 {1, 1, 64}, /* block */
2539 UTIL_FORMAT_LAYOUT_PLAIN,
2540 3, /* nr_channels */
2541 FALSE, /* is_array */
2542 FALSE, /* is_bitmask */
2543 TRUE, /* is_mixed */
2544 #ifdef PIPE_ARCH_BIG_ENDIAN
2545 {
2546 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* x = z */
2547 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 8}, /* y = x */
2548 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* z = s */
2549 {0, 0, 0, 0, 0}
2550 },
2551 #else
2552 {
2553 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = z */
2554 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 32}, /* y = s */
2555 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 40}, /* z = x */
2556 {0, 0, 0, 0, 0}
2557 },
2558 #endif
2559 #ifdef PIPE_ARCH_BIG_ENDIAN
2560 {
2561 UTIL_FORMAT_SWIZZLE_X, /* z */
2562 UTIL_FORMAT_SWIZZLE_Z, /* s */
2563 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2564 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2565 },
2566 #else
2567 {
2568 UTIL_FORMAT_SWIZZLE_X, /* z */
2569 UTIL_FORMAT_SWIZZLE_Y, /* s */
2570 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2571 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2572 },
2573 #endif
2574 UTIL_FORMAT_COLORSPACE_ZS,
2575 };
2576
2577 const struct util_format_description
2578 util_format_x32_s8x24_uint_description = {
2579 PIPE_FORMAT_X32_S8X24_UINT,
2580 "PIPE_FORMAT_X32_S8X24_UINT",
2581 "x32_s8x24_uint",
2582 {1, 1, 64}, /* block */
2583 UTIL_FORMAT_LAYOUT_PLAIN,
2584 3, /* nr_channels */
2585 FALSE, /* is_array */
2586 FALSE, /* is_bitmask */
2587 FALSE, /* is_mixed */
2588 #ifdef PIPE_ARCH_BIG_ENDIAN
2589 {
2590 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 32}, /* x = x */
2591 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 8}, /* y = x */
2592 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* z = s */
2593 {0, 0, 0, 0, 0}
2594 },
2595 #else
2596 {
2597 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2598 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 32}, /* y = s */
2599 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24, 40}, /* z = x */
2600 {0, 0, 0, 0, 0}
2601 },
2602 #endif
2603 #ifdef PIPE_ARCH_BIG_ENDIAN
2604 {
2605 UTIL_FORMAT_SWIZZLE_NONE, /* z */
2606 UTIL_FORMAT_SWIZZLE_Z, /* s */
2607 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2608 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2609 },
2610 #else
2611 {
2612 UTIL_FORMAT_SWIZZLE_NONE, /* z */
2613 UTIL_FORMAT_SWIZZLE_Y, /* s */
2614 UTIL_FORMAT_SWIZZLE_NONE, /* ignored */
2615 UTIL_FORMAT_SWIZZLE_NONE /* ignored */
2616 },
2617 #endif
2618 UTIL_FORMAT_COLORSPACE_ZS,
2619 };
2620
2621 const struct util_format_description
2622 util_format_uyvy_description = {
2623 PIPE_FORMAT_UYVY,
2624 "PIPE_FORMAT_UYVY",
2625 "uyvy",
2626 {2, 1, 32}, /* block */
2627 UTIL_FORMAT_LAYOUT_SUBSAMPLED,
2628 1, /* nr_channels */
2629 FALSE, /* is_array */
2630 FALSE, /* is_bitmask */
2631 FALSE, /* is_mixed */
2632 {
2633 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2634 {0, 0, 0, 0, 0},
2635 {0, 0, 0, 0, 0},
2636 {0, 0, 0, 0, 0}
2637 },
2638 {
2639 UTIL_FORMAT_SWIZZLE_X, /* y */
2640 UTIL_FORMAT_SWIZZLE_Y, /* u */
2641 UTIL_FORMAT_SWIZZLE_Z, /* v */
2642 UTIL_FORMAT_SWIZZLE_1 /* ignored */
2643 },
2644 UTIL_FORMAT_COLORSPACE_YUV,
2645 };
2646
2647 const struct util_format_description
2648 util_format_yuyv_description = {
2649 PIPE_FORMAT_YUYV,
2650 "PIPE_FORMAT_YUYV",
2651 "yuyv",
2652 {2, 1, 32}, /* block */
2653 UTIL_FORMAT_LAYOUT_SUBSAMPLED,
2654 1, /* nr_channels */
2655 FALSE, /* is_array */
2656 FALSE, /* is_bitmask */
2657 FALSE, /* is_mixed */
2658 {
2659 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2660 {0, 0, 0, 0, 0},
2661 {0, 0, 0, 0, 0},
2662 {0, 0, 0, 0, 0}
2663 },
2664 {
2665 UTIL_FORMAT_SWIZZLE_X, /* y */
2666 UTIL_FORMAT_SWIZZLE_Y, /* u */
2667 UTIL_FORMAT_SWIZZLE_Z, /* v */
2668 UTIL_FORMAT_SWIZZLE_1 /* ignored */
2669 },
2670 UTIL_FORMAT_COLORSPACE_YUV,
2671 };
2672
2673 const struct util_format_description
2674 util_format_r8g8_b8g8_unorm_description = {
2675 PIPE_FORMAT_R8G8_B8G8_UNORM,
2676 "PIPE_FORMAT_R8G8_B8G8_UNORM",
2677 "r8g8_b8g8_unorm",
2678 {2, 1, 32}, /* block */
2679 UTIL_FORMAT_LAYOUT_SUBSAMPLED,
2680 1, /* nr_channels */
2681 FALSE, /* is_array */
2682 FALSE, /* is_bitmask */
2683 FALSE, /* is_mixed */
2684 {
2685 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2686 {0, 0, 0, 0, 0},
2687 {0, 0, 0, 0, 0},
2688 {0, 0, 0, 0, 0}
2689 },
2690 {
2691 UTIL_FORMAT_SWIZZLE_X, /* r */
2692 UTIL_FORMAT_SWIZZLE_Y, /* g */
2693 UTIL_FORMAT_SWIZZLE_Z, /* b */
2694 UTIL_FORMAT_SWIZZLE_1 /* a */
2695 },
2696 UTIL_FORMAT_COLORSPACE_RGB,
2697 };
2698
2699 const struct util_format_description
2700 util_format_g8r8_g8b8_unorm_description = {
2701 PIPE_FORMAT_G8R8_G8B8_UNORM,
2702 "PIPE_FORMAT_G8R8_G8B8_UNORM",
2703 "g8r8_g8b8_unorm",
2704 {2, 1, 32}, /* block */
2705 UTIL_FORMAT_LAYOUT_SUBSAMPLED,
2706 1, /* nr_channels */
2707 FALSE, /* is_array */
2708 FALSE, /* is_bitmask */
2709 FALSE, /* is_mixed */
2710 {
2711 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2712 {0, 0, 0, 0, 0},
2713 {0, 0, 0, 0, 0},
2714 {0, 0, 0, 0, 0}
2715 },
2716 {
2717 UTIL_FORMAT_SWIZZLE_X, /* r */
2718 UTIL_FORMAT_SWIZZLE_Y, /* g */
2719 UTIL_FORMAT_SWIZZLE_Z, /* b */
2720 UTIL_FORMAT_SWIZZLE_1 /* a */
2721 },
2722 UTIL_FORMAT_COLORSPACE_RGB,
2723 };
2724
2725 const struct util_format_description
2726 util_format_g8r8_b8r8_unorm_description = {
2727 PIPE_FORMAT_G8R8_B8R8_UNORM,
2728 "PIPE_FORMAT_G8R8_B8R8_UNORM",
2729 "g8r8_b8r8_unorm",
2730 {2, 1, 32}, /* block */
2731 UTIL_FORMAT_LAYOUT_SUBSAMPLED,
2732 1, /* nr_channels */
2733 FALSE, /* is_array */
2734 FALSE, /* is_bitmask */
2735 FALSE, /* is_mixed */
2736 {
2737 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2738 {0, 0, 0, 0, 0},
2739 {0, 0, 0, 0, 0},
2740 {0, 0, 0, 0, 0}
2741 },
2742 {
2743 UTIL_FORMAT_SWIZZLE_Y, /* r */
2744 UTIL_FORMAT_SWIZZLE_X, /* g */
2745 UTIL_FORMAT_SWIZZLE_Z, /* b */
2746 UTIL_FORMAT_SWIZZLE_1 /* a */
2747 },
2748 UTIL_FORMAT_COLORSPACE_RGB,
2749 };
2750
2751 const struct util_format_description
2752 util_format_r8g8_r8b8_unorm_description = {
2753 PIPE_FORMAT_R8G8_R8B8_UNORM,
2754 "PIPE_FORMAT_R8G8_R8B8_UNORM",
2755 "r8g8_r8b8_unorm",
2756 {2, 1, 32}, /* block */
2757 UTIL_FORMAT_LAYOUT_SUBSAMPLED,
2758 1, /* nr_channels */
2759 FALSE, /* is_array */
2760 FALSE, /* is_bitmask */
2761 FALSE, /* is_mixed */
2762 {
2763 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2764 {0, 0, 0, 0, 0},
2765 {0, 0, 0, 0, 0},
2766 {0, 0, 0, 0, 0}
2767 },
2768 {
2769 UTIL_FORMAT_SWIZZLE_Y, /* r */
2770 UTIL_FORMAT_SWIZZLE_X, /* g */
2771 UTIL_FORMAT_SWIZZLE_Z, /* b */
2772 UTIL_FORMAT_SWIZZLE_1 /* a */
2773 },
2774 UTIL_FORMAT_COLORSPACE_RGB,
2775 };
2776
2777 const struct util_format_description
2778 util_format_r11g11b10_float_description = {
2779 PIPE_FORMAT_R11G11B10_FLOAT,
2780 "PIPE_FORMAT_R11G11B10_FLOAT",
2781 "r11g11b10_float",
2782 {1, 1, 32}, /* block */
2783 UTIL_FORMAT_LAYOUT_OTHER,
2784 1, /* nr_channels */
2785 FALSE, /* is_array */
2786 FALSE, /* is_bitmask */
2787 FALSE, /* is_mixed */
2788 {
2789 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2790 {0, 0, 0, 0, 0},
2791 {0, 0, 0, 0, 0},
2792 {0, 0, 0, 0, 0}
2793 },
2794 {
2795 UTIL_FORMAT_SWIZZLE_X, /* r */
2796 UTIL_FORMAT_SWIZZLE_Y, /* g */
2797 UTIL_FORMAT_SWIZZLE_Z, /* b */
2798 UTIL_FORMAT_SWIZZLE_1 /* a */
2799 },
2800 UTIL_FORMAT_COLORSPACE_RGB,
2801 };
2802
2803 const struct util_format_description
2804 util_format_r9g9b9e5_float_description = {
2805 PIPE_FORMAT_R9G9B9E5_FLOAT,
2806 "PIPE_FORMAT_R9G9B9E5_FLOAT",
2807 "r9g9b9e5_float",
2808 {1, 1, 32}, /* block */
2809 UTIL_FORMAT_LAYOUT_OTHER,
2810 1, /* nr_channels */
2811 FALSE, /* is_array */
2812 FALSE, /* is_bitmask */
2813 FALSE, /* is_mixed */
2814 {
2815 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0}, /* x = x */
2816 {0, 0, 0, 0, 0},
2817 {0, 0, 0, 0, 0},
2818 {0, 0, 0, 0, 0}
2819 },
2820 {
2821 UTIL_FORMAT_SWIZZLE_X, /* r */
2822 UTIL_FORMAT_SWIZZLE_Y, /* g */
2823 UTIL_FORMAT_SWIZZLE_Z, /* b */
2824 UTIL_FORMAT_SWIZZLE_1 /* a */
2825 },
2826 UTIL_FORMAT_COLORSPACE_RGB,
2827 };
2828
2829 const struct util_format_description
2830 util_format_r1_unorm_description = {
2831 PIPE_FORMAT_R1_UNORM,
2832 "PIPE_FORMAT_R1_UNORM",
2833 "r1_unorm",
2834 {8, 1, 8}, /* block */
2835 UTIL_FORMAT_LAYOUT_OTHER,
2836 1, /* nr_channels */
2837 FALSE, /* is_array */
2838 FALSE, /* is_bitmask */
2839 FALSE, /* is_mixed */
2840 {
2841 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
2842 {0, 0, 0, 0, 0},
2843 {0, 0, 0, 0, 0},
2844 {0, 0, 0, 0, 0}
2845 },
2846 {
2847 UTIL_FORMAT_SWIZZLE_X, /* r */
2848 UTIL_FORMAT_SWIZZLE_0, /* g */
2849 UTIL_FORMAT_SWIZZLE_0, /* b */
2850 UTIL_FORMAT_SWIZZLE_1 /* a */
2851 },
2852 UTIL_FORMAT_COLORSPACE_RGB,
2853 };
2854
2855 const struct util_format_description
2856 util_format_r8g8bx_snorm_description = {
2857 PIPE_FORMAT_R8G8Bx_SNORM,
2858 "PIPE_FORMAT_R8G8Bx_SNORM",
2859 "r8g8bx_snorm",
2860 {1, 1, 16}, /* block */
2861 UTIL_FORMAT_LAYOUT_OTHER,
2862 2, /* nr_channels */
2863 FALSE, /* is_array */
2864 FALSE, /* is_bitmask */
2865 FALSE, /* is_mixed */
2866 #ifdef PIPE_ARCH_BIG_ENDIAN
2867 {
2868 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* x = x */
2869 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* y = y */
2870 {0, 0, 0, 0, 0},
2871 {0, 0, 0, 0, 0}
2872 },
2873 #else
2874 {
2875 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = x */
2876 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = y */
2877 {0, 0, 0, 0, 0},
2878 {0, 0, 0, 0, 0}
2879 },
2880 #endif
2881 #ifdef PIPE_ARCH_BIG_ENDIAN
2882 {
2883 UTIL_FORMAT_SWIZZLE_X, /* r */
2884 UTIL_FORMAT_SWIZZLE_Y, /* g */
2885 UTIL_FORMAT_SWIZZLE_Z, /* b */
2886 UTIL_FORMAT_SWIZZLE_1 /* a */
2887 },
2888 #else
2889 {
2890 UTIL_FORMAT_SWIZZLE_X, /* r */
2891 UTIL_FORMAT_SWIZZLE_Y, /* g */
2892 UTIL_FORMAT_SWIZZLE_Z, /* b */
2893 UTIL_FORMAT_SWIZZLE_1 /* a */
2894 },
2895 #endif
2896 UTIL_FORMAT_COLORSPACE_RGB,
2897 };
2898
2899 const struct util_format_description
2900 util_format_dxt1_rgb_description = {
2901 PIPE_FORMAT_DXT1_RGB,
2902 "PIPE_FORMAT_DXT1_RGB",
2903 "dxt1_rgb",
2904 {4, 4, 64}, /* block */
2905 UTIL_FORMAT_LAYOUT_S3TC,
2906 1, /* nr_channels */
2907 FALSE, /* is_array */
2908 FALSE, /* is_bitmask */
2909 FALSE, /* is_mixed */
2910 {
2911 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
2912 {0, 0, 0, 0, 0},
2913 {0, 0, 0, 0, 0},
2914 {0, 0, 0, 0, 0}
2915 },
2916 {
2917 UTIL_FORMAT_SWIZZLE_X, /* r */
2918 UTIL_FORMAT_SWIZZLE_Y, /* g */
2919 UTIL_FORMAT_SWIZZLE_Z, /* b */
2920 UTIL_FORMAT_SWIZZLE_1 /* a */
2921 },
2922 UTIL_FORMAT_COLORSPACE_RGB,
2923 };
2924
2925 const struct util_format_description
2926 util_format_dxt1_rgba_description = {
2927 PIPE_FORMAT_DXT1_RGBA,
2928 "PIPE_FORMAT_DXT1_RGBA",
2929 "dxt1_rgba",
2930 {4, 4, 64}, /* block */
2931 UTIL_FORMAT_LAYOUT_S3TC,
2932 1, /* nr_channels */
2933 FALSE, /* is_array */
2934 FALSE, /* is_bitmask */
2935 FALSE, /* is_mixed */
2936 {
2937 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
2938 {0, 0, 0, 0, 0},
2939 {0, 0, 0, 0, 0},
2940 {0, 0, 0, 0, 0}
2941 },
2942 {
2943 UTIL_FORMAT_SWIZZLE_X, /* r */
2944 UTIL_FORMAT_SWIZZLE_Y, /* g */
2945 UTIL_FORMAT_SWIZZLE_Z, /* b */
2946 UTIL_FORMAT_SWIZZLE_W /* a */
2947 },
2948 UTIL_FORMAT_COLORSPACE_RGB,
2949 };
2950
2951 const struct util_format_description
2952 util_format_dxt3_rgba_description = {
2953 PIPE_FORMAT_DXT3_RGBA,
2954 "PIPE_FORMAT_DXT3_RGBA",
2955 "dxt3_rgba",
2956 {4, 4, 128}, /* block */
2957 UTIL_FORMAT_LAYOUT_S3TC,
2958 1, /* nr_channels */
2959 FALSE, /* is_array */
2960 FALSE, /* is_bitmask */
2961 FALSE, /* is_mixed */
2962 {
2963 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
2964 {0, 0, 0, 0, 0},
2965 {0, 0, 0, 0, 0},
2966 {0, 0, 0, 0, 0}
2967 },
2968 {
2969 UTIL_FORMAT_SWIZZLE_X, /* r */
2970 UTIL_FORMAT_SWIZZLE_Y, /* g */
2971 UTIL_FORMAT_SWIZZLE_Z, /* b */
2972 UTIL_FORMAT_SWIZZLE_W /* a */
2973 },
2974 UTIL_FORMAT_COLORSPACE_RGB,
2975 };
2976
2977 const struct util_format_description
2978 util_format_dxt5_rgba_description = {
2979 PIPE_FORMAT_DXT5_RGBA,
2980 "PIPE_FORMAT_DXT5_RGBA",
2981 "dxt5_rgba",
2982 {4, 4, 128}, /* block */
2983 UTIL_FORMAT_LAYOUT_S3TC,
2984 1, /* nr_channels */
2985 FALSE, /* is_array */
2986 FALSE, /* is_bitmask */
2987 FALSE, /* is_mixed */
2988 {
2989 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
2990 {0, 0, 0, 0, 0},
2991 {0, 0, 0, 0, 0},
2992 {0, 0, 0, 0, 0}
2993 },
2994 {
2995 UTIL_FORMAT_SWIZZLE_X, /* r */
2996 UTIL_FORMAT_SWIZZLE_Y, /* g */
2997 UTIL_FORMAT_SWIZZLE_Z, /* b */
2998 UTIL_FORMAT_SWIZZLE_W /* a */
2999 },
3000 UTIL_FORMAT_COLORSPACE_RGB,
3001 };
3002
3003 const struct util_format_description
3004 util_format_dxt1_srgb_description = {
3005 PIPE_FORMAT_DXT1_SRGB,
3006 "PIPE_FORMAT_DXT1_SRGB",
3007 "dxt1_srgb",
3008 {4, 4, 64}, /* block */
3009 UTIL_FORMAT_LAYOUT_S3TC,
3010 1, /* nr_channels */
3011 FALSE, /* is_array */
3012 FALSE, /* is_bitmask */
3013 FALSE, /* is_mixed */
3014 {
3015 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
3016 {0, 0, 0, 0, 0},
3017 {0, 0, 0, 0, 0},
3018 {0, 0, 0, 0, 0}
3019 },
3020 {
3021 UTIL_FORMAT_SWIZZLE_X, /* sr */
3022 UTIL_FORMAT_SWIZZLE_Y, /* sg */
3023 UTIL_FORMAT_SWIZZLE_Z, /* sb */
3024 UTIL_FORMAT_SWIZZLE_1 /* a */
3025 },
3026 UTIL_FORMAT_COLORSPACE_SRGB,
3027 };
3028
3029 const struct util_format_description
3030 util_format_dxt1_srgba_description = {
3031 PIPE_FORMAT_DXT1_SRGBA,
3032 "PIPE_FORMAT_DXT1_SRGBA",
3033 "dxt1_srgba",
3034 {4, 4, 64}, /* block */
3035 UTIL_FORMAT_LAYOUT_S3TC,
3036 1, /* nr_channels */
3037 FALSE, /* is_array */
3038 FALSE, /* is_bitmask */
3039 FALSE, /* is_mixed */
3040 {
3041 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
3042 {0, 0, 0, 0, 0},
3043 {0, 0, 0, 0, 0},
3044 {0, 0, 0, 0, 0}
3045 },
3046 {
3047 UTIL_FORMAT_SWIZZLE_X, /* sr */
3048 UTIL_FORMAT_SWIZZLE_Y, /* sg */
3049 UTIL_FORMAT_SWIZZLE_Z, /* sb */
3050 UTIL_FORMAT_SWIZZLE_W /* a */
3051 },
3052 UTIL_FORMAT_COLORSPACE_SRGB,
3053 };
3054
3055 const struct util_format_description
3056 util_format_dxt3_srgba_description = {
3057 PIPE_FORMAT_DXT3_SRGBA,
3058 "PIPE_FORMAT_DXT3_SRGBA",
3059 "dxt3_srgba",
3060 {4, 4, 128}, /* block */
3061 UTIL_FORMAT_LAYOUT_S3TC,
3062 1, /* nr_channels */
3063 FALSE, /* is_array */
3064 FALSE, /* is_bitmask */
3065 FALSE, /* is_mixed */
3066 {
3067 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3068 {0, 0, 0, 0, 0},
3069 {0, 0, 0, 0, 0},
3070 {0, 0, 0, 0, 0}
3071 },
3072 {
3073 UTIL_FORMAT_SWIZZLE_X, /* sr */
3074 UTIL_FORMAT_SWIZZLE_Y, /* sg */
3075 UTIL_FORMAT_SWIZZLE_Z, /* sb */
3076 UTIL_FORMAT_SWIZZLE_W /* a */
3077 },
3078 UTIL_FORMAT_COLORSPACE_SRGB,
3079 };
3080
3081 const struct util_format_description
3082 util_format_dxt5_srgba_description = {
3083 PIPE_FORMAT_DXT5_SRGBA,
3084 "PIPE_FORMAT_DXT5_SRGBA",
3085 "dxt5_srgba",
3086 {4, 4, 128}, /* block */
3087 UTIL_FORMAT_LAYOUT_S3TC,
3088 1, /* nr_channels */
3089 FALSE, /* is_array */
3090 FALSE, /* is_bitmask */
3091 FALSE, /* is_mixed */
3092 {
3093 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3094 {0, 0, 0, 0, 0},
3095 {0, 0, 0, 0, 0},
3096 {0, 0, 0, 0, 0}
3097 },
3098 {
3099 UTIL_FORMAT_SWIZZLE_X, /* sr */
3100 UTIL_FORMAT_SWIZZLE_Y, /* sg */
3101 UTIL_FORMAT_SWIZZLE_Z, /* sb */
3102 UTIL_FORMAT_SWIZZLE_W /* a */
3103 },
3104 UTIL_FORMAT_COLORSPACE_SRGB,
3105 };
3106
3107 const struct util_format_description
3108 util_format_rgtc1_unorm_description = {
3109 PIPE_FORMAT_RGTC1_UNORM,
3110 "PIPE_FORMAT_RGTC1_UNORM",
3111 "rgtc1_unorm",
3112 {4, 4, 64}, /* block */
3113 UTIL_FORMAT_LAYOUT_RGTC,
3114 1, /* nr_channels */
3115 FALSE, /* is_array */
3116 FALSE, /* is_bitmask */
3117 FALSE, /* is_mixed */
3118 {
3119 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
3120 {0, 0, 0, 0, 0},
3121 {0, 0, 0, 0, 0},
3122 {0, 0, 0, 0, 0}
3123 },
3124 {
3125 UTIL_FORMAT_SWIZZLE_X, /* r */
3126 UTIL_FORMAT_SWIZZLE_0, /* g */
3127 UTIL_FORMAT_SWIZZLE_0, /* b */
3128 UTIL_FORMAT_SWIZZLE_1 /* a */
3129 },
3130 UTIL_FORMAT_COLORSPACE_RGB,
3131 };
3132
3133 const struct util_format_description
3134 util_format_rgtc1_snorm_description = {
3135 PIPE_FORMAT_RGTC1_SNORM,
3136 "PIPE_FORMAT_RGTC1_SNORM",
3137 "rgtc1_snorm",
3138 {4, 4, 64}, /* block */
3139 UTIL_FORMAT_LAYOUT_RGTC,
3140 1, /* nr_channels */
3141 FALSE, /* is_array */
3142 FALSE, /* is_bitmask */
3143 FALSE, /* is_mixed */
3144 {
3145 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
3146 {0, 0, 0, 0, 0},
3147 {0, 0, 0, 0, 0},
3148 {0, 0, 0, 0, 0}
3149 },
3150 {
3151 UTIL_FORMAT_SWIZZLE_X, /* r */
3152 UTIL_FORMAT_SWIZZLE_0, /* g */
3153 UTIL_FORMAT_SWIZZLE_0, /* b */
3154 UTIL_FORMAT_SWIZZLE_1 /* a */
3155 },
3156 UTIL_FORMAT_COLORSPACE_RGB,
3157 };
3158
3159 const struct util_format_description
3160 util_format_rgtc2_unorm_description = {
3161 PIPE_FORMAT_RGTC2_UNORM,
3162 "PIPE_FORMAT_RGTC2_UNORM",
3163 "rgtc2_unorm",
3164 {4, 4, 128}, /* block */
3165 UTIL_FORMAT_LAYOUT_RGTC,
3166 1, /* nr_channels */
3167 FALSE, /* is_array */
3168 FALSE, /* is_bitmask */
3169 FALSE, /* is_mixed */
3170 {
3171 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3172 {0, 0, 0, 0, 0},
3173 {0, 0, 0, 0, 0},
3174 {0, 0, 0, 0, 0}
3175 },
3176 {
3177 UTIL_FORMAT_SWIZZLE_X, /* r */
3178 UTIL_FORMAT_SWIZZLE_Y, /* g */
3179 UTIL_FORMAT_SWIZZLE_0, /* b */
3180 UTIL_FORMAT_SWIZZLE_1 /* a */
3181 },
3182 UTIL_FORMAT_COLORSPACE_RGB,
3183 };
3184
3185 const struct util_format_description
3186 util_format_rgtc2_snorm_description = {
3187 PIPE_FORMAT_RGTC2_SNORM,
3188 "PIPE_FORMAT_RGTC2_SNORM",
3189 "rgtc2_snorm",
3190 {4, 4, 128}, /* block */
3191 UTIL_FORMAT_LAYOUT_RGTC,
3192 1, /* nr_channels */
3193 FALSE, /* is_array */
3194 FALSE, /* is_bitmask */
3195 FALSE, /* is_mixed */
3196 {
3197 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3198 {0, 0, 0, 0, 0},
3199 {0, 0, 0, 0, 0},
3200 {0, 0, 0, 0, 0}
3201 },
3202 {
3203 UTIL_FORMAT_SWIZZLE_X, /* r */
3204 UTIL_FORMAT_SWIZZLE_Y, /* g */
3205 UTIL_FORMAT_SWIZZLE_0, /* b */
3206 UTIL_FORMAT_SWIZZLE_1 /* a */
3207 },
3208 UTIL_FORMAT_COLORSPACE_RGB,
3209 };
3210
3211 const struct util_format_description
3212 util_format_latc1_unorm_description = {
3213 PIPE_FORMAT_LATC1_UNORM,
3214 "PIPE_FORMAT_LATC1_UNORM",
3215 "latc1_unorm",
3216 {4, 4, 64}, /* block */
3217 UTIL_FORMAT_LAYOUT_RGTC,
3218 1, /* nr_channels */
3219 FALSE, /* is_array */
3220 FALSE, /* is_bitmask */
3221 FALSE, /* is_mixed */
3222 {
3223 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
3224 {0, 0, 0, 0, 0},
3225 {0, 0, 0, 0, 0},
3226 {0, 0, 0, 0, 0}
3227 },
3228 {
3229 UTIL_FORMAT_SWIZZLE_X, /* r */
3230 UTIL_FORMAT_SWIZZLE_X, /* g */
3231 UTIL_FORMAT_SWIZZLE_X, /* b */
3232 UTIL_FORMAT_SWIZZLE_1 /* a */
3233 },
3234 UTIL_FORMAT_COLORSPACE_RGB,
3235 };
3236
3237 const struct util_format_description
3238 util_format_latc1_snorm_description = {
3239 PIPE_FORMAT_LATC1_SNORM,
3240 "PIPE_FORMAT_LATC1_SNORM",
3241 "latc1_snorm",
3242 {4, 4, 64}, /* block */
3243 UTIL_FORMAT_LAYOUT_RGTC,
3244 1, /* nr_channels */
3245 FALSE, /* is_array */
3246 FALSE, /* is_bitmask */
3247 FALSE, /* is_mixed */
3248 {
3249 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
3250 {0, 0, 0, 0, 0},
3251 {0, 0, 0, 0, 0},
3252 {0, 0, 0, 0, 0}
3253 },
3254 {
3255 UTIL_FORMAT_SWIZZLE_X, /* r */
3256 UTIL_FORMAT_SWIZZLE_X, /* g */
3257 UTIL_FORMAT_SWIZZLE_X, /* b */
3258 UTIL_FORMAT_SWIZZLE_1 /* a */
3259 },
3260 UTIL_FORMAT_COLORSPACE_RGB,
3261 };
3262
3263 const struct util_format_description
3264 util_format_latc2_unorm_description = {
3265 PIPE_FORMAT_LATC2_UNORM,
3266 "PIPE_FORMAT_LATC2_UNORM",
3267 "latc2_unorm",
3268 {4, 4, 128}, /* block */
3269 UTIL_FORMAT_LAYOUT_RGTC,
3270 1, /* nr_channels */
3271 FALSE, /* is_array */
3272 FALSE, /* is_bitmask */
3273 FALSE, /* is_mixed */
3274 {
3275 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3276 {0, 0, 0, 0, 0},
3277 {0, 0, 0, 0, 0},
3278 {0, 0, 0, 0, 0}
3279 },
3280 {
3281 UTIL_FORMAT_SWIZZLE_X, /* r */
3282 UTIL_FORMAT_SWIZZLE_X, /* g */
3283 UTIL_FORMAT_SWIZZLE_X, /* b */
3284 UTIL_FORMAT_SWIZZLE_Y /* a */
3285 },
3286 UTIL_FORMAT_COLORSPACE_RGB,
3287 };
3288
3289 const struct util_format_description
3290 util_format_latc2_snorm_description = {
3291 PIPE_FORMAT_LATC2_SNORM,
3292 "PIPE_FORMAT_LATC2_SNORM",
3293 "latc2_snorm",
3294 {4, 4, 128}, /* block */
3295 UTIL_FORMAT_LAYOUT_RGTC,
3296 1, /* nr_channels */
3297 FALSE, /* is_array */
3298 FALSE, /* is_bitmask */
3299 FALSE, /* is_mixed */
3300 {
3301 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3302 {0, 0, 0, 0, 0},
3303 {0, 0, 0, 0, 0},
3304 {0, 0, 0, 0, 0}
3305 },
3306 {
3307 UTIL_FORMAT_SWIZZLE_X, /* r */
3308 UTIL_FORMAT_SWIZZLE_X, /* g */
3309 UTIL_FORMAT_SWIZZLE_X, /* b */
3310 UTIL_FORMAT_SWIZZLE_Y /* a */
3311 },
3312 UTIL_FORMAT_COLORSPACE_RGB,
3313 };
3314
3315 const struct util_format_description
3316 util_format_etc1_rgb8_description = {
3317 PIPE_FORMAT_ETC1_RGB8,
3318 "PIPE_FORMAT_ETC1_RGB8",
3319 "etc1_rgb8",
3320 {4, 4, 64}, /* block */
3321 UTIL_FORMAT_LAYOUT_ETC,
3322 1, /* nr_channels */
3323 FALSE, /* is_array */
3324 FALSE, /* is_bitmask */
3325 FALSE, /* is_mixed */
3326 {
3327 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
3328 {0, 0, 0, 0, 0},
3329 {0, 0, 0, 0, 0},
3330 {0, 0, 0, 0, 0}
3331 },
3332 {
3333 UTIL_FORMAT_SWIZZLE_X, /* r */
3334 UTIL_FORMAT_SWIZZLE_Y, /* g */
3335 UTIL_FORMAT_SWIZZLE_Z, /* b */
3336 UTIL_FORMAT_SWIZZLE_1 /* a */
3337 },
3338 UTIL_FORMAT_COLORSPACE_RGB,
3339 };
3340
3341 const struct util_format_description
3342 util_format_bptc_rgba_unorm_description = {
3343 PIPE_FORMAT_BPTC_RGBA_UNORM,
3344 "PIPE_FORMAT_BPTC_RGBA_UNORM",
3345 "bptc_rgba_unorm",
3346 {4, 4, 128}, /* block */
3347 UTIL_FORMAT_LAYOUT_BPTC,
3348 1, /* nr_channels */
3349 FALSE, /* is_array */
3350 FALSE, /* is_bitmask */
3351 FALSE, /* is_mixed */
3352 {
3353 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3354 {0, 0, 0, 0, 0},
3355 {0, 0, 0, 0, 0},
3356 {0, 0, 0, 0, 0}
3357 },
3358 {
3359 UTIL_FORMAT_SWIZZLE_X, /* r */
3360 UTIL_FORMAT_SWIZZLE_Y, /* g */
3361 UTIL_FORMAT_SWIZZLE_Z, /* b */
3362 UTIL_FORMAT_SWIZZLE_W /* a */
3363 },
3364 UTIL_FORMAT_COLORSPACE_RGB,
3365 };
3366
3367 const struct util_format_description
3368 util_format_bptc_srgba_description = {
3369 PIPE_FORMAT_BPTC_SRGBA,
3370 "PIPE_FORMAT_BPTC_SRGBA",
3371 "bptc_srgba",
3372 {4, 4, 128}, /* block */
3373 UTIL_FORMAT_LAYOUT_BPTC,
3374 1, /* nr_channels */
3375 FALSE, /* is_array */
3376 FALSE, /* is_bitmask */
3377 FALSE, /* is_mixed */
3378 {
3379 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3380 {0, 0, 0, 0, 0},
3381 {0, 0, 0, 0, 0},
3382 {0, 0, 0, 0, 0}
3383 },
3384 {
3385 UTIL_FORMAT_SWIZZLE_X, /* sr */
3386 UTIL_FORMAT_SWIZZLE_Y, /* sg */
3387 UTIL_FORMAT_SWIZZLE_Z, /* sb */
3388 UTIL_FORMAT_SWIZZLE_W /* a */
3389 },
3390 UTIL_FORMAT_COLORSPACE_SRGB,
3391 };
3392
3393 const struct util_format_description
3394 util_format_bptc_rgb_float_description = {
3395 PIPE_FORMAT_BPTC_RGB_FLOAT,
3396 "PIPE_FORMAT_BPTC_RGB_FLOAT",
3397 "bptc_rgb_float",
3398 {4, 4, 128}, /* block */
3399 UTIL_FORMAT_LAYOUT_BPTC,
3400 1, /* nr_channels */
3401 FALSE, /* is_array */
3402 FALSE, /* is_bitmask */
3403 FALSE, /* is_mixed */
3404 {
3405 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3406 {0, 0, 0, 0, 0},
3407 {0, 0, 0, 0, 0},
3408 {0, 0, 0, 0, 0}
3409 },
3410 {
3411 UTIL_FORMAT_SWIZZLE_X, /* r */
3412 UTIL_FORMAT_SWIZZLE_Y, /* g */
3413 UTIL_FORMAT_SWIZZLE_Z, /* b */
3414 UTIL_FORMAT_SWIZZLE_1 /* a */
3415 },
3416 UTIL_FORMAT_COLORSPACE_RGB,
3417 };
3418
3419 const struct util_format_description
3420 util_format_bptc_rgb_ufloat_description = {
3421 PIPE_FORMAT_BPTC_RGB_UFLOAT,
3422 "PIPE_FORMAT_BPTC_RGB_UFLOAT",
3423 "bptc_rgb_ufloat",
3424 {4, 4, 128}, /* block */
3425 UTIL_FORMAT_LAYOUT_BPTC,
3426 1, /* nr_channels */
3427 FALSE, /* is_array */
3428 FALSE, /* is_bitmask */
3429 FALSE, /* is_mixed */
3430 {
3431 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
3432 {0, 0, 0, 0, 0},
3433 {0, 0, 0, 0, 0},
3434 {0, 0, 0, 0, 0}
3435 },
3436 {
3437 UTIL_FORMAT_SWIZZLE_X, /* r */
3438 UTIL_FORMAT_SWIZZLE_Y, /* g */
3439 UTIL_FORMAT_SWIZZLE_Z, /* b */
3440 UTIL_FORMAT_SWIZZLE_1 /* a */
3441 },
3442 UTIL_FORMAT_COLORSPACE_RGB,
3443 };
3444
3445 const struct util_format_description
3446 util_format_r64_float_description = {
3447 PIPE_FORMAT_R64_FLOAT,
3448 "PIPE_FORMAT_R64_FLOAT",
3449 "r64_float",
3450 {1, 1, 64}, /* block */
3451 UTIL_FORMAT_LAYOUT_PLAIN,
3452 1, /* nr_channels */
3453 TRUE, /* is_array */
3454 FALSE, /* is_bitmask */
3455 FALSE, /* is_mixed */
3456 {
3457 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
3458 {0, 0, 0, 0, 0},
3459 {0, 0, 0, 0, 0},
3460 {0, 0, 0, 0, 0}
3461 },
3462 {
3463 UTIL_FORMAT_SWIZZLE_X, /* r */
3464 UTIL_FORMAT_SWIZZLE_0, /* g */
3465 UTIL_FORMAT_SWIZZLE_0, /* b */
3466 UTIL_FORMAT_SWIZZLE_1 /* a */
3467 },
3468 UTIL_FORMAT_COLORSPACE_RGB,
3469 };
3470
3471 const struct util_format_description
3472 util_format_r64g64_float_description = {
3473 PIPE_FORMAT_R64G64_FLOAT,
3474 "PIPE_FORMAT_R64G64_FLOAT",
3475 "r64g64_float",
3476 {1, 1, 128}, /* block */
3477 UTIL_FORMAT_LAYOUT_PLAIN,
3478 2, /* nr_channels */
3479 TRUE, /* is_array */
3480 FALSE, /* is_bitmask */
3481 FALSE, /* is_mixed */
3482 #ifdef PIPE_ARCH_BIG_ENDIAN
3483 {
3484 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* x = r */
3485 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* y = g */
3486 {0, 0, 0, 0, 0},
3487 {0, 0, 0, 0, 0}
3488 },
3489 #else
3490 {
3491 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
3492 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* y = g */
3493 {0, 0, 0, 0, 0},
3494 {0, 0, 0, 0, 0}
3495 },
3496 #endif
3497 #ifdef PIPE_ARCH_BIG_ENDIAN
3498 {
3499 UTIL_FORMAT_SWIZZLE_X, /* r */
3500 UTIL_FORMAT_SWIZZLE_Y, /* g */
3501 UTIL_FORMAT_SWIZZLE_0, /* b */
3502 UTIL_FORMAT_SWIZZLE_1 /* a */
3503 },
3504 #else
3505 {
3506 UTIL_FORMAT_SWIZZLE_X, /* r */
3507 UTIL_FORMAT_SWIZZLE_Y, /* g */
3508 UTIL_FORMAT_SWIZZLE_0, /* b */
3509 UTIL_FORMAT_SWIZZLE_1 /* a */
3510 },
3511 #endif
3512 UTIL_FORMAT_COLORSPACE_RGB,
3513 };
3514
3515 const struct util_format_description
3516 util_format_r64g64b64_float_description = {
3517 PIPE_FORMAT_R64G64B64_FLOAT,
3518 "PIPE_FORMAT_R64G64B64_FLOAT",
3519 "r64g64b64_float",
3520 {1, 1, 192}, /* block */
3521 UTIL_FORMAT_LAYOUT_PLAIN,
3522 3, /* nr_channels */
3523 TRUE, /* is_array */
3524 FALSE, /* is_bitmask */
3525 FALSE, /* is_mixed */
3526 #ifdef PIPE_ARCH_BIG_ENDIAN
3527 {
3528 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 128}, /* x = r */
3529 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* y = g */
3530 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* z = b */
3531 {0, 0, 0, 0, 0}
3532 },
3533 #else
3534 {
3535 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
3536 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* y = g */
3537 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 128}, /* z = b */
3538 {0, 0, 0, 0, 0}
3539 },
3540 #endif
3541 #ifdef PIPE_ARCH_BIG_ENDIAN
3542 {
3543 UTIL_FORMAT_SWIZZLE_X, /* r */
3544 UTIL_FORMAT_SWIZZLE_Y, /* g */
3545 UTIL_FORMAT_SWIZZLE_Z, /* b */
3546 UTIL_FORMAT_SWIZZLE_1 /* a */
3547 },
3548 #else
3549 {
3550 UTIL_FORMAT_SWIZZLE_X, /* r */
3551 UTIL_FORMAT_SWIZZLE_Y, /* g */
3552 UTIL_FORMAT_SWIZZLE_Z, /* b */
3553 UTIL_FORMAT_SWIZZLE_1 /* a */
3554 },
3555 #endif
3556 UTIL_FORMAT_COLORSPACE_RGB,
3557 };
3558
3559 const struct util_format_description
3560 util_format_r64g64b64a64_float_description = {
3561 PIPE_FORMAT_R64G64B64A64_FLOAT,
3562 "PIPE_FORMAT_R64G64B64A64_FLOAT",
3563 "r64g64b64a64_float",
3564 {1, 1, 256}, /* block */
3565 UTIL_FORMAT_LAYOUT_PLAIN,
3566 4, /* nr_channels */
3567 TRUE, /* is_array */
3568 FALSE, /* is_bitmask */
3569 FALSE, /* is_mixed */
3570 #ifdef PIPE_ARCH_BIG_ENDIAN
3571 {
3572 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 192}, /* x = r */
3573 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 128}, /* y = g */
3574 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* z = b */
3575 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0} /* w = a */
3576 },
3577 #else
3578 {
3579 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 0}, /* x = r */
3580 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 64}, /* y = g */
3581 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 128}, /* z = b */
3582 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64, 192} /* w = a */
3583 },
3584 #endif
3585 #ifdef PIPE_ARCH_BIG_ENDIAN
3586 {
3587 UTIL_FORMAT_SWIZZLE_X, /* r */
3588 UTIL_FORMAT_SWIZZLE_Y, /* g */
3589 UTIL_FORMAT_SWIZZLE_Z, /* b */
3590 UTIL_FORMAT_SWIZZLE_W /* a */
3591 },
3592 #else
3593 {
3594 UTIL_FORMAT_SWIZZLE_X, /* r */
3595 UTIL_FORMAT_SWIZZLE_Y, /* g */
3596 UTIL_FORMAT_SWIZZLE_Z, /* b */
3597 UTIL_FORMAT_SWIZZLE_W /* a */
3598 },
3599 #endif
3600 UTIL_FORMAT_COLORSPACE_RGB,
3601 };
3602
3603 const struct util_format_description
3604 util_format_r32_float_description = {
3605 PIPE_FORMAT_R32_FLOAT,
3606 "PIPE_FORMAT_R32_FLOAT",
3607 "r32_float",
3608 {1, 1, 32}, /* block */
3609 UTIL_FORMAT_LAYOUT_PLAIN,
3610 1, /* nr_channels */
3611 TRUE, /* is_array */
3612 FALSE, /* is_bitmask */
3613 FALSE, /* is_mixed */
3614 {
3615 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
3616 {0, 0, 0, 0, 0},
3617 {0, 0, 0, 0, 0},
3618 {0, 0, 0, 0, 0}
3619 },
3620 {
3621 UTIL_FORMAT_SWIZZLE_X, /* r */
3622 UTIL_FORMAT_SWIZZLE_0, /* g */
3623 UTIL_FORMAT_SWIZZLE_0, /* b */
3624 UTIL_FORMAT_SWIZZLE_1 /* a */
3625 },
3626 UTIL_FORMAT_COLORSPACE_RGB,
3627 };
3628
3629 const struct util_format_description
3630 util_format_r32g32_float_description = {
3631 PIPE_FORMAT_R32G32_FLOAT,
3632 "PIPE_FORMAT_R32G32_FLOAT",
3633 "r32g32_float",
3634 {1, 1, 64}, /* block */
3635 UTIL_FORMAT_LAYOUT_PLAIN,
3636 2, /* nr_channels */
3637 TRUE, /* is_array */
3638 FALSE, /* is_bitmask */
3639 FALSE, /* is_mixed */
3640 #ifdef PIPE_ARCH_BIG_ENDIAN
3641 {
3642 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* x = r */
3643 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* y = g */
3644 {0, 0, 0, 0, 0},
3645 {0, 0, 0, 0, 0}
3646 },
3647 #else
3648 {
3649 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
3650 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
3651 {0, 0, 0, 0, 0},
3652 {0, 0, 0, 0, 0}
3653 },
3654 #endif
3655 #ifdef PIPE_ARCH_BIG_ENDIAN
3656 {
3657 UTIL_FORMAT_SWIZZLE_X, /* r */
3658 UTIL_FORMAT_SWIZZLE_Y, /* g */
3659 UTIL_FORMAT_SWIZZLE_0, /* b */
3660 UTIL_FORMAT_SWIZZLE_1 /* a */
3661 },
3662 #else
3663 {
3664 UTIL_FORMAT_SWIZZLE_X, /* r */
3665 UTIL_FORMAT_SWIZZLE_Y, /* g */
3666 UTIL_FORMAT_SWIZZLE_0, /* b */
3667 UTIL_FORMAT_SWIZZLE_1 /* a */
3668 },
3669 #endif
3670 UTIL_FORMAT_COLORSPACE_RGB,
3671 };
3672
3673 const struct util_format_description
3674 util_format_r32g32b32_float_description = {
3675 PIPE_FORMAT_R32G32B32_FLOAT,
3676 "PIPE_FORMAT_R32G32B32_FLOAT",
3677 "r32g32b32_float",
3678 {1, 1, 96}, /* block */
3679 UTIL_FORMAT_LAYOUT_PLAIN,
3680 3, /* nr_channels */
3681 TRUE, /* is_array */
3682 FALSE, /* is_bitmask */
3683 FALSE, /* is_mixed */
3684 #ifdef PIPE_ARCH_BIG_ENDIAN
3685 {
3686 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* x = r */
3687 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
3688 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* z = b */
3689 {0, 0, 0, 0, 0}
3690 },
3691 #else
3692 {
3693 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
3694 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
3695 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* z = b */
3696 {0, 0, 0, 0, 0}
3697 },
3698 #endif
3699 #ifdef PIPE_ARCH_BIG_ENDIAN
3700 {
3701 UTIL_FORMAT_SWIZZLE_X, /* r */
3702 UTIL_FORMAT_SWIZZLE_Y, /* g */
3703 UTIL_FORMAT_SWIZZLE_Z, /* b */
3704 UTIL_FORMAT_SWIZZLE_1 /* a */
3705 },
3706 #else
3707 {
3708 UTIL_FORMAT_SWIZZLE_X, /* r */
3709 UTIL_FORMAT_SWIZZLE_Y, /* g */
3710 UTIL_FORMAT_SWIZZLE_Z, /* b */
3711 UTIL_FORMAT_SWIZZLE_1 /* a */
3712 },
3713 #endif
3714 UTIL_FORMAT_COLORSPACE_RGB,
3715 };
3716
3717 const struct util_format_description
3718 util_format_r32g32b32a32_float_description = {
3719 PIPE_FORMAT_R32G32B32A32_FLOAT,
3720 "PIPE_FORMAT_R32G32B32A32_FLOAT",
3721 "r32g32b32a32_float",
3722 {1, 1, 128}, /* block */
3723 UTIL_FORMAT_LAYOUT_PLAIN,
3724 4, /* nr_channels */
3725 TRUE, /* is_array */
3726 FALSE, /* is_bitmask */
3727 FALSE, /* is_mixed */
3728 #ifdef PIPE_ARCH_BIG_ENDIAN
3729 {
3730 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 96}, /* x = r */
3731 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* y = g */
3732 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* z = b */
3733 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0} /* w = a */
3734 },
3735 #else
3736 {
3737 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
3738 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
3739 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* z = b */
3740 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 96} /* w = a */
3741 },
3742 #endif
3743 #ifdef PIPE_ARCH_BIG_ENDIAN
3744 {
3745 UTIL_FORMAT_SWIZZLE_X, /* r */
3746 UTIL_FORMAT_SWIZZLE_Y, /* g */
3747 UTIL_FORMAT_SWIZZLE_Z, /* b */
3748 UTIL_FORMAT_SWIZZLE_W /* a */
3749 },
3750 #else
3751 {
3752 UTIL_FORMAT_SWIZZLE_X, /* r */
3753 UTIL_FORMAT_SWIZZLE_Y, /* g */
3754 UTIL_FORMAT_SWIZZLE_Z, /* b */
3755 UTIL_FORMAT_SWIZZLE_W /* a */
3756 },
3757 #endif
3758 UTIL_FORMAT_COLORSPACE_RGB,
3759 };
3760
3761 const struct util_format_description
3762 util_format_r32_unorm_description = {
3763 PIPE_FORMAT_R32_UNORM,
3764 "PIPE_FORMAT_R32_UNORM",
3765 "r32_unorm",
3766 {1, 1, 32}, /* block */
3767 UTIL_FORMAT_LAYOUT_PLAIN,
3768 1, /* nr_channels */
3769 TRUE, /* is_array */
3770 TRUE, /* is_bitmask */
3771 FALSE, /* is_mixed */
3772 {
3773 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
3774 {0, 0, 0, 0, 0},
3775 {0, 0, 0, 0, 0},
3776 {0, 0, 0, 0, 0}
3777 },
3778 {
3779 UTIL_FORMAT_SWIZZLE_X, /* r */
3780 UTIL_FORMAT_SWIZZLE_0, /* g */
3781 UTIL_FORMAT_SWIZZLE_0, /* b */
3782 UTIL_FORMAT_SWIZZLE_1 /* a */
3783 },
3784 UTIL_FORMAT_COLORSPACE_RGB,
3785 };
3786
3787 const struct util_format_description
3788 util_format_r32g32_unorm_description = {
3789 PIPE_FORMAT_R32G32_UNORM,
3790 "PIPE_FORMAT_R32G32_UNORM",
3791 "r32g32_unorm",
3792 {1, 1, 64}, /* block */
3793 UTIL_FORMAT_LAYOUT_PLAIN,
3794 2, /* nr_channels */
3795 TRUE, /* is_array */
3796 FALSE, /* is_bitmask */
3797 FALSE, /* is_mixed */
3798 #ifdef PIPE_ARCH_BIG_ENDIAN
3799 {
3800 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* x = r */
3801 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* y = g */
3802 {0, 0, 0, 0, 0},
3803 {0, 0, 0, 0, 0}
3804 },
3805 #else
3806 {
3807 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
3808 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* y = g */
3809 {0, 0, 0, 0, 0},
3810 {0, 0, 0, 0, 0}
3811 },
3812 #endif
3813 #ifdef PIPE_ARCH_BIG_ENDIAN
3814 {
3815 UTIL_FORMAT_SWIZZLE_X, /* r */
3816 UTIL_FORMAT_SWIZZLE_Y, /* g */
3817 UTIL_FORMAT_SWIZZLE_0, /* b */
3818 UTIL_FORMAT_SWIZZLE_1 /* a */
3819 },
3820 #else
3821 {
3822 UTIL_FORMAT_SWIZZLE_X, /* r */
3823 UTIL_FORMAT_SWIZZLE_Y, /* g */
3824 UTIL_FORMAT_SWIZZLE_0, /* b */
3825 UTIL_FORMAT_SWIZZLE_1 /* a */
3826 },
3827 #endif
3828 UTIL_FORMAT_COLORSPACE_RGB,
3829 };
3830
3831 const struct util_format_description
3832 util_format_r32g32b32_unorm_description = {
3833 PIPE_FORMAT_R32G32B32_UNORM,
3834 "PIPE_FORMAT_R32G32B32_UNORM",
3835 "r32g32b32_unorm",
3836 {1, 1, 96}, /* block */
3837 UTIL_FORMAT_LAYOUT_PLAIN,
3838 3, /* nr_channels */
3839 TRUE, /* is_array */
3840 FALSE, /* is_bitmask */
3841 FALSE, /* is_mixed */
3842 #ifdef PIPE_ARCH_BIG_ENDIAN
3843 {
3844 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 64}, /* x = r */
3845 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* y = g */
3846 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* z = b */
3847 {0, 0, 0, 0, 0}
3848 },
3849 #else
3850 {
3851 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
3852 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* y = g */
3853 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 64}, /* z = b */
3854 {0, 0, 0, 0, 0}
3855 },
3856 #endif
3857 #ifdef PIPE_ARCH_BIG_ENDIAN
3858 {
3859 UTIL_FORMAT_SWIZZLE_X, /* r */
3860 UTIL_FORMAT_SWIZZLE_Y, /* g */
3861 UTIL_FORMAT_SWIZZLE_Z, /* b */
3862 UTIL_FORMAT_SWIZZLE_1 /* a */
3863 },
3864 #else
3865 {
3866 UTIL_FORMAT_SWIZZLE_X, /* r */
3867 UTIL_FORMAT_SWIZZLE_Y, /* g */
3868 UTIL_FORMAT_SWIZZLE_Z, /* b */
3869 UTIL_FORMAT_SWIZZLE_1 /* a */
3870 },
3871 #endif
3872 UTIL_FORMAT_COLORSPACE_RGB,
3873 };
3874
3875 const struct util_format_description
3876 util_format_r32g32b32a32_unorm_description = {
3877 PIPE_FORMAT_R32G32B32A32_UNORM,
3878 "PIPE_FORMAT_R32G32B32A32_UNORM",
3879 "r32g32b32a32_unorm",
3880 {1, 1, 128}, /* block */
3881 UTIL_FORMAT_LAYOUT_PLAIN,
3882 4, /* nr_channels */
3883 TRUE, /* is_array */
3884 FALSE, /* is_bitmask */
3885 FALSE, /* is_mixed */
3886 #ifdef PIPE_ARCH_BIG_ENDIAN
3887 {
3888 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 96}, /* x = r */
3889 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 64}, /* y = g */
3890 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* z = b */
3891 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0} /* w = a */
3892 },
3893 #else
3894 {
3895 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 0}, /* x = r */
3896 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 32}, /* y = g */
3897 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 64}, /* z = b */
3898 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32, 96} /* w = a */
3899 },
3900 #endif
3901 #ifdef PIPE_ARCH_BIG_ENDIAN
3902 {
3903 UTIL_FORMAT_SWIZZLE_X, /* r */
3904 UTIL_FORMAT_SWIZZLE_Y, /* g */
3905 UTIL_FORMAT_SWIZZLE_Z, /* b */
3906 UTIL_FORMAT_SWIZZLE_W /* a */
3907 },
3908 #else
3909 {
3910 UTIL_FORMAT_SWIZZLE_X, /* r */
3911 UTIL_FORMAT_SWIZZLE_Y, /* g */
3912 UTIL_FORMAT_SWIZZLE_Z, /* b */
3913 UTIL_FORMAT_SWIZZLE_W /* a */
3914 },
3915 #endif
3916 UTIL_FORMAT_COLORSPACE_RGB,
3917 };
3918
3919 const struct util_format_description
3920 util_format_r32_uscaled_description = {
3921 PIPE_FORMAT_R32_USCALED,
3922 "PIPE_FORMAT_R32_USCALED",
3923 "r32_uscaled",
3924 {1, 1, 32}, /* block */
3925 UTIL_FORMAT_LAYOUT_PLAIN,
3926 1, /* nr_channels */
3927 TRUE, /* is_array */
3928 TRUE, /* is_bitmask */
3929 FALSE, /* is_mixed */
3930 {
3931 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
3932 {0, 0, 0, 0, 0},
3933 {0, 0, 0, 0, 0},
3934 {0, 0, 0, 0, 0}
3935 },
3936 {
3937 UTIL_FORMAT_SWIZZLE_X, /* r */
3938 UTIL_FORMAT_SWIZZLE_0, /* g */
3939 UTIL_FORMAT_SWIZZLE_0, /* b */
3940 UTIL_FORMAT_SWIZZLE_1 /* a */
3941 },
3942 UTIL_FORMAT_COLORSPACE_RGB,
3943 };
3944
3945 const struct util_format_description
3946 util_format_r32g32_uscaled_description = {
3947 PIPE_FORMAT_R32G32_USCALED,
3948 "PIPE_FORMAT_R32G32_USCALED",
3949 "r32g32_uscaled",
3950 {1, 1, 64}, /* block */
3951 UTIL_FORMAT_LAYOUT_PLAIN,
3952 2, /* nr_channels */
3953 TRUE, /* is_array */
3954 FALSE, /* is_bitmask */
3955 FALSE, /* is_mixed */
3956 #ifdef PIPE_ARCH_BIG_ENDIAN
3957 {
3958 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* x = r */
3959 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* y = g */
3960 {0, 0, 0, 0, 0},
3961 {0, 0, 0, 0, 0}
3962 },
3963 #else
3964 {
3965 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
3966 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* y = g */
3967 {0, 0, 0, 0, 0},
3968 {0, 0, 0, 0, 0}
3969 },
3970 #endif
3971 #ifdef PIPE_ARCH_BIG_ENDIAN
3972 {
3973 UTIL_FORMAT_SWIZZLE_X, /* r */
3974 UTIL_FORMAT_SWIZZLE_Y, /* g */
3975 UTIL_FORMAT_SWIZZLE_0, /* b */
3976 UTIL_FORMAT_SWIZZLE_1 /* a */
3977 },
3978 #else
3979 {
3980 UTIL_FORMAT_SWIZZLE_X, /* r */
3981 UTIL_FORMAT_SWIZZLE_Y, /* g */
3982 UTIL_FORMAT_SWIZZLE_0, /* b */
3983 UTIL_FORMAT_SWIZZLE_1 /* a */
3984 },
3985 #endif
3986 UTIL_FORMAT_COLORSPACE_RGB,
3987 };
3988
3989 const struct util_format_description
3990 util_format_r32g32b32_uscaled_description = {
3991 PIPE_FORMAT_R32G32B32_USCALED,
3992 "PIPE_FORMAT_R32G32B32_USCALED",
3993 "r32g32b32_uscaled",
3994 {1, 1, 96}, /* block */
3995 UTIL_FORMAT_LAYOUT_PLAIN,
3996 3, /* nr_channels */
3997 TRUE, /* is_array */
3998 FALSE, /* is_bitmask */
3999 FALSE, /* is_mixed */
4000 #ifdef PIPE_ARCH_BIG_ENDIAN
4001 {
4002 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 64}, /* x = r */
4003 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* y = g */
4004 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* z = b */
4005 {0, 0, 0, 0, 0}
4006 },
4007 #else
4008 {
4009 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
4010 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* y = g */
4011 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 64}, /* z = b */
4012 {0, 0, 0, 0, 0}
4013 },
4014 #endif
4015 #ifdef PIPE_ARCH_BIG_ENDIAN
4016 {
4017 UTIL_FORMAT_SWIZZLE_X, /* r */
4018 UTIL_FORMAT_SWIZZLE_Y, /* g */
4019 UTIL_FORMAT_SWIZZLE_Z, /* b */
4020 UTIL_FORMAT_SWIZZLE_1 /* a */
4021 },
4022 #else
4023 {
4024 UTIL_FORMAT_SWIZZLE_X, /* r */
4025 UTIL_FORMAT_SWIZZLE_Y, /* g */
4026 UTIL_FORMAT_SWIZZLE_Z, /* b */
4027 UTIL_FORMAT_SWIZZLE_1 /* a */
4028 },
4029 #endif
4030 UTIL_FORMAT_COLORSPACE_RGB,
4031 };
4032
4033 const struct util_format_description
4034 util_format_r32g32b32a32_uscaled_description = {
4035 PIPE_FORMAT_R32G32B32A32_USCALED,
4036 "PIPE_FORMAT_R32G32B32A32_USCALED",
4037 "r32g32b32a32_uscaled",
4038 {1, 1, 128}, /* block */
4039 UTIL_FORMAT_LAYOUT_PLAIN,
4040 4, /* nr_channels */
4041 TRUE, /* is_array */
4042 FALSE, /* is_bitmask */
4043 FALSE, /* is_mixed */
4044 #ifdef PIPE_ARCH_BIG_ENDIAN
4045 {
4046 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 96}, /* x = r */
4047 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 64}, /* y = g */
4048 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* z = b */
4049 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0} /* w = a */
4050 },
4051 #else
4052 {
4053 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 0}, /* x = r */
4054 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 32}, /* y = g */
4055 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 64}, /* z = b */
4056 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32, 96} /* w = a */
4057 },
4058 #endif
4059 #ifdef PIPE_ARCH_BIG_ENDIAN
4060 {
4061 UTIL_FORMAT_SWIZZLE_X, /* r */
4062 UTIL_FORMAT_SWIZZLE_Y, /* g */
4063 UTIL_FORMAT_SWIZZLE_Z, /* b */
4064 UTIL_FORMAT_SWIZZLE_W /* a */
4065 },
4066 #else
4067 {
4068 UTIL_FORMAT_SWIZZLE_X, /* r */
4069 UTIL_FORMAT_SWIZZLE_Y, /* g */
4070 UTIL_FORMAT_SWIZZLE_Z, /* b */
4071 UTIL_FORMAT_SWIZZLE_W /* a */
4072 },
4073 #endif
4074 UTIL_FORMAT_COLORSPACE_RGB,
4075 };
4076
4077 const struct util_format_description
4078 util_format_r32_snorm_description = {
4079 PIPE_FORMAT_R32_SNORM,
4080 "PIPE_FORMAT_R32_SNORM",
4081 "r32_snorm",
4082 {1, 1, 32}, /* block */
4083 UTIL_FORMAT_LAYOUT_PLAIN,
4084 1, /* nr_channels */
4085 TRUE, /* is_array */
4086 TRUE, /* is_bitmask */
4087 FALSE, /* is_mixed */
4088 {
4089 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
4090 {0, 0, 0, 0, 0},
4091 {0, 0, 0, 0, 0},
4092 {0, 0, 0, 0, 0}
4093 },
4094 {
4095 UTIL_FORMAT_SWIZZLE_X, /* r */
4096 UTIL_FORMAT_SWIZZLE_0, /* g */
4097 UTIL_FORMAT_SWIZZLE_0, /* b */
4098 UTIL_FORMAT_SWIZZLE_1 /* a */
4099 },
4100 UTIL_FORMAT_COLORSPACE_RGB,
4101 };
4102
4103 const struct util_format_description
4104 util_format_r32g32_snorm_description = {
4105 PIPE_FORMAT_R32G32_SNORM,
4106 "PIPE_FORMAT_R32G32_SNORM",
4107 "r32g32_snorm",
4108 {1, 1, 64}, /* block */
4109 UTIL_FORMAT_LAYOUT_PLAIN,
4110 2, /* nr_channels */
4111 TRUE, /* is_array */
4112 FALSE, /* is_bitmask */
4113 FALSE, /* is_mixed */
4114 #ifdef PIPE_ARCH_BIG_ENDIAN
4115 {
4116 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* x = r */
4117 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* y = g */
4118 {0, 0, 0, 0, 0},
4119 {0, 0, 0, 0, 0}
4120 },
4121 #else
4122 {
4123 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
4124 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* y = g */
4125 {0, 0, 0, 0, 0},
4126 {0, 0, 0, 0, 0}
4127 },
4128 #endif
4129 #ifdef PIPE_ARCH_BIG_ENDIAN
4130 {
4131 UTIL_FORMAT_SWIZZLE_X, /* r */
4132 UTIL_FORMAT_SWIZZLE_Y, /* g */
4133 UTIL_FORMAT_SWIZZLE_0, /* b */
4134 UTIL_FORMAT_SWIZZLE_1 /* a */
4135 },
4136 #else
4137 {
4138 UTIL_FORMAT_SWIZZLE_X, /* r */
4139 UTIL_FORMAT_SWIZZLE_Y, /* g */
4140 UTIL_FORMAT_SWIZZLE_0, /* b */
4141 UTIL_FORMAT_SWIZZLE_1 /* a */
4142 },
4143 #endif
4144 UTIL_FORMAT_COLORSPACE_RGB,
4145 };
4146
4147 const struct util_format_description
4148 util_format_r32g32b32_snorm_description = {
4149 PIPE_FORMAT_R32G32B32_SNORM,
4150 "PIPE_FORMAT_R32G32B32_SNORM",
4151 "r32g32b32_snorm",
4152 {1, 1, 96}, /* block */
4153 UTIL_FORMAT_LAYOUT_PLAIN,
4154 3, /* nr_channels */
4155 TRUE, /* is_array */
4156 FALSE, /* is_bitmask */
4157 FALSE, /* is_mixed */
4158 #ifdef PIPE_ARCH_BIG_ENDIAN
4159 {
4160 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 64}, /* x = r */
4161 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* y = g */
4162 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* z = b */
4163 {0, 0, 0, 0, 0}
4164 },
4165 #else
4166 {
4167 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
4168 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* y = g */
4169 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 64}, /* z = b */
4170 {0, 0, 0, 0, 0}
4171 },
4172 #endif
4173 #ifdef PIPE_ARCH_BIG_ENDIAN
4174 {
4175 UTIL_FORMAT_SWIZZLE_X, /* r */
4176 UTIL_FORMAT_SWIZZLE_Y, /* g */
4177 UTIL_FORMAT_SWIZZLE_Z, /* b */
4178 UTIL_FORMAT_SWIZZLE_1 /* a */
4179 },
4180 #else
4181 {
4182 UTIL_FORMAT_SWIZZLE_X, /* r */
4183 UTIL_FORMAT_SWIZZLE_Y, /* g */
4184 UTIL_FORMAT_SWIZZLE_Z, /* b */
4185 UTIL_FORMAT_SWIZZLE_1 /* a */
4186 },
4187 #endif
4188 UTIL_FORMAT_COLORSPACE_RGB,
4189 };
4190
4191 const struct util_format_description
4192 util_format_r32g32b32a32_snorm_description = {
4193 PIPE_FORMAT_R32G32B32A32_SNORM,
4194 "PIPE_FORMAT_R32G32B32A32_SNORM",
4195 "r32g32b32a32_snorm",
4196 {1, 1, 128}, /* block */
4197 UTIL_FORMAT_LAYOUT_PLAIN,
4198 4, /* nr_channels */
4199 TRUE, /* is_array */
4200 FALSE, /* is_bitmask */
4201 FALSE, /* is_mixed */
4202 #ifdef PIPE_ARCH_BIG_ENDIAN
4203 {
4204 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 96}, /* x = r */
4205 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 64}, /* y = g */
4206 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* z = b */
4207 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0} /* w = a */
4208 },
4209 #else
4210 {
4211 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 0}, /* x = r */
4212 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 32}, /* y = g */
4213 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 64}, /* z = b */
4214 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32, 96} /* w = a */
4215 },
4216 #endif
4217 #ifdef PIPE_ARCH_BIG_ENDIAN
4218 {
4219 UTIL_FORMAT_SWIZZLE_X, /* r */
4220 UTIL_FORMAT_SWIZZLE_Y, /* g */
4221 UTIL_FORMAT_SWIZZLE_Z, /* b */
4222 UTIL_FORMAT_SWIZZLE_W /* a */
4223 },
4224 #else
4225 {
4226 UTIL_FORMAT_SWIZZLE_X, /* r */
4227 UTIL_FORMAT_SWIZZLE_Y, /* g */
4228 UTIL_FORMAT_SWIZZLE_Z, /* b */
4229 UTIL_FORMAT_SWIZZLE_W /* a */
4230 },
4231 #endif
4232 UTIL_FORMAT_COLORSPACE_RGB,
4233 };
4234
4235 const struct util_format_description
4236 util_format_r32_sscaled_description = {
4237 PIPE_FORMAT_R32_SSCALED,
4238 "PIPE_FORMAT_R32_SSCALED",
4239 "r32_sscaled",
4240 {1, 1, 32}, /* block */
4241 UTIL_FORMAT_LAYOUT_PLAIN,
4242 1, /* nr_channels */
4243 TRUE, /* is_array */
4244 TRUE, /* is_bitmask */
4245 FALSE, /* is_mixed */
4246 {
4247 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
4248 {0, 0, 0, 0, 0},
4249 {0, 0, 0, 0, 0},
4250 {0, 0, 0, 0, 0}
4251 },
4252 {
4253 UTIL_FORMAT_SWIZZLE_X, /* r */
4254 UTIL_FORMAT_SWIZZLE_0, /* g */
4255 UTIL_FORMAT_SWIZZLE_0, /* b */
4256 UTIL_FORMAT_SWIZZLE_1 /* a */
4257 },
4258 UTIL_FORMAT_COLORSPACE_RGB,
4259 };
4260
4261 const struct util_format_description
4262 util_format_r32g32_sscaled_description = {
4263 PIPE_FORMAT_R32G32_SSCALED,
4264 "PIPE_FORMAT_R32G32_SSCALED",
4265 "r32g32_sscaled",
4266 {1, 1, 64}, /* block */
4267 UTIL_FORMAT_LAYOUT_PLAIN,
4268 2, /* nr_channels */
4269 TRUE, /* is_array */
4270 FALSE, /* is_bitmask */
4271 FALSE, /* is_mixed */
4272 #ifdef PIPE_ARCH_BIG_ENDIAN
4273 {
4274 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* x = r */
4275 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* y = g */
4276 {0, 0, 0, 0, 0},
4277 {0, 0, 0, 0, 0}
4278 },
4279 #else
4280 {
4281 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
4282 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* y = g */
4283 {0, 0, 0, 0, 0},
4284 {0, 0, 0, 0, 0}
4285 },
4286 #endif
4287 #ifdef PIPE_ARCH_BIG_ENDIAN
4288 {
4289 UTIL_FORMAT_SWIZZLE_X, /* r */
4290 UTIL_FORMAT_SWIZZLE_Y, /* g */
4291 UTIL_FORMAT_SWIZZLE_0, /* b */
4292 UTIL_FORMAT_SWIZZLE_1 /* a */
4293 },
4294 #else
4295 {
4296 UTIL_FORMAT_SWIZZLE_X, /* r */
4297 UTIL_FORMAT_SWIZZLE_Y, /* g */
4298 UTIL_FORMAT_SWIZZLE_0, /* b */
4299 UTIL_FORMAT_SWIZZLE_1 /* a */
4300 },
4301 #endif
4302 UTIL_FORMAT_COLORSPACE_RGB,
4303 };
4304
4305 const struct util_format_description
4306 util_format_r32g32b32_sscaled_description = {
4307 PIPE_FORMAT_R32G32B32_SSCALED,
4308 "PIPE_FORMAT_R32G32B32_SSCALED",
4309 "r32g32b32_sscaled",
4310 {1, 1, 96}, /* block */
4311 UTIL_FORMAT_LAYOUT_PLAIN,
4312 3, /* nr_channels */
4313 TRUE, /* is_array */
4314 FALSE, /* is_bitmask */
4315 FALSE, /* is_mixed */
4316 #ifdef PIPE_ARCH_BIG_ENDIAN
4317 {
4318 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 64}, /* x = r */
4319 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* y = g */
4320 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* z = b */
4321 {0, 0, 0, 0, 0}
4322 },
4323 #else
4324 {
4325 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
4326 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* y = g */
4327 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 64}, /* z = b */
4328 {0, 0, 0, 0, 0}
4329 },
4330 #endif
4331 #ifdef PIPE_ARCH_BIG_ENDIAN
4332 {
4333 UTIL_FORMAT_SWIZZLE_X, /* r */
4334 UTIL_FORMAT_SWIZZLE_Y, /* g */
4335 UTIL_FORMAT_SWIZZLE_Z, /* b */
4336 UTIL_FORMAT_SWIZZLE_1 /* a */
4337 },
4338 #else
4339 {
4340 UTIL_FORMAT_SWIZZLE_X, /* r */
4341 UTIL_FORMAT_SWIZZLE_Y, /* g */
4342 UTIL_FORMAT_SWIZZLE_Z, /* b */
4343 UTIL_FORMAT_SWIZZLE_1 /* a */
4344 },
4345 #endif
4346 UTIL_FORMAT_COLORSPACE_RGB,
4347 };
4348
4349 const struct util_format_description
4350 util_format_r32g32b32a32_sscaled_description = {
4351 PIPE_FORMAT_R32G32B32A32_SSCALED,
4352 "PIPE_FORMAT_R32G32B32A32_SSCALED",
4353 "r32g32b32a32_sscaled",
4354 {1, 1, 128}, /* block */
4355 UTIL_FORMAT_LAYOUT_PLAIN,
4356 4, /* nr_channels */
4357 TRUE, /* is_array */
4358 FALSE, /* is_bitmask */
4359 FALSE, /* is_mixed */
4360 #ifdef PIPE_ARCH_BIG_ENDIAN
4361 {
4362 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 96}, /* x = r */
4363 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 64}, /* y = g */
4364 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* z = b */
4365 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0} /* w = a */
4366 },
4367 #else
4368 {
4369 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 0}, /* x = r */
4370 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 32}, /* y = g */
4371 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 64}, /* z = b */
4372 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32, 96} /* w = a */
4373 },
4374 #endif
4375 #ifdef PIPE_ARCH_BIG_ENDIAN
4376 {
4377 UTIL_FORMAT_SWIZZLE_X, /* r */
4378 UTIL_FORMAT_SWIZZLE_Y, /* g */
4379 UTIL_FORMAT_SWIZZLE_Z, /* b */
4380 UTIL_FORMAT_SWIZZLE_W /* a */
4381 },
4382 #else
4383 {
4384 UTIL_FORMAT_SWIZZLE_X, /* r */
4385 UTIL_FORMAT_SWIZZLE_Y, /* g */
4386 UTIL_FORMAT_SWIZZLE_Z, /* b */
4387 UTIL_FORMAT_SWIZZLE_W /* a */
4388 },
4389 #endif
4390 UTIL_FORMAT_COLORSPACE_RGB,
4391 };
4392
4393 const struct util_format_description
4394 util_format_r16_float_description = {
4395 PIPE_FORMAT_R16_FLOAT,
4396 "PIPE_FORMAT_R16_FLOAT",
4397 "r16_float",
4398 {1, 1, 16}, /* block */
4399 UTIL_FORMAT_LAYOUT_PLAIN,
4400 1, /* nr_channels */
4401 TRUE, /* is_array */
4402 FALSE, /* is_bitmask */
4403 FALSE, /* is_mixed */
4404 {
4405 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
4406 {0, 0, 0, 0, 0},
4407 {0, 0, 0, 0, 0},
4408 {0, 0, 0, 0, 0}
4409 },
4410 {
4411 UTIL_FORMAT_SWIZZLE_X, /* r */
4412 UTIL_FORMAT_SWIZZLE_0, /* g */
4413 UTIL_FORMAT_SWIZZLE_0, /* b */
4414 UTIL_FORMAT_SWIZZLE_1 /* a */
4415 },
4416 UTIL_FORMAT_COLORSPACE_RGB,
4417 };
4418
4419 const struct util_format_description
4420 util_format_r16g16_float_description = {
4421 PIPE_FORMAT_R16G16_FLOAT,
4422 "PIPE_FORMAT_R16G16_FLOAT",
4423 "r16g16_float",
4424 {1, 1, 32}, /* block */
4425 UTIL_FORMAT_LAYOUT_PLAIN,
4426 2, /* nr_channels */
4427 TRUE, /* is_array */
4428 FALSE, /* is_bitmask */
4429 FALSE, /* is_mixed */
4430 #ifdef PIPE_ARCH_BIG_ENDIAN
4431 {
4432 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* x = r */
4433 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* y = g */
4434 {0, 0, 0, 0, 0},
4435 {0, 0, 0, 0, 0}
4436 },
4437 #else
4438 {
4439 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
4440 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
4441 {0, 0, 0, 0, 0},
4442 {0, 0, 0, 0, 0}
4443 },
4444 #endif
4445 #ifdef PIPE_ARCH_BIG_ENDIAN
4446 {
4447 UTIL_FORMAT_SWIZZLE_X, /* r */
4448 UTIL_FORMAT_SWIZZLE_Y, /* g */
4449 UTIL_FORMAT_SWIZZLE_0, /* b */
4450 UTIL_FORMAT_SWIZZLE_1 /* a */
4451 },
4452 #else
4453 {
4454 UTIL_FORMAT_SWIZZLE_X, /* r */
4455 UTIL_FORMAT_SWIZZLE_Y, /* g */
4456 UTIL_FORMAT_SWIZZLE_0, /* b */
4457 UTIL_FORMAT_SWIZZLE_1 /* a */
4458 },
4459 #endif
4460 UTIL_FORMAT_COLORSPACE_RGB,
4461 };
4462
4463 const struct util_format_description
4464 util_format_r16g16b16_float_description = {
4465 PIPE_FORMAT_R16G16B16_FLOAT,
4466 "PIPE_FORMAT_R16G16B16_FLOAT",
4467 "r16g16b16_float",
4468 {1, 1, 48}, /* block */
4469 UTIL_FORMAT_LAYOUT_PLAIN,
4470 3, /* nr_channels */
4471 TRUE, /* is_array */
4472 FALSE, /* is_bitmask */
4473 FALSE, /* is_mixed */
4474 #ifdef PIPE_ARCH_BIG_ENDIAN
4475 {
4476 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* x = r */
4477 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
4478 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* z = b */
4479 {0, 0, 0, 0, 0}
4480 },
4481 #else
4482 {
4483 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
4484 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
4485 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* z = b */
4486 {0, 0, 0, 0, 0}
4487 },
4488 #endif
4489 #ifdef PIPE_ARCH_BIG_ENDIAN
4490 {
4491 UTIL_FORMAT_SWIZZLE_X, /* r */
4492 UTIL_FORMAT_SWIZZLE_Y, /* g */
4493 UTIL_FORMAT_SWIZZLE_Z, /* b */
4494 UTIL_FORMAT_SWIZZLE_1 /* a */
4495 },
4496 #else
4497 {
4498 UTIL_FORMAT_SWIZZLE_X, /* r */
4499 UTIL_FORMAT_SWIZZLE_Y, /* g */
4500 UTIL_FORMAT_SWIZZLE_Z, /* b */
4501 UTIL_FORMAT_SWIZZLE_1 /* a */
4502 },
4503 #endif
4504 UTIL_FORMAT_COLORSPACE_RGB,
4505 };
4506
4507 const struct util_format_description
4508 util_format_r16g16b16a16_float_description = {
4509 PIPE_FORMAT_R16G16B16A16_FLOAT,
4510 "PIPE_FORMAT_R16G16B16A16_FLOAT",
4511 "r16g16b16a16_float",
4512 {1, 1, 64}, /* block */
4513 UTIL_FORMAT_LAYOUT_PLAIN,
4514 4, /* nr_channels */
4515 TRUE, /* is_array */
4516 FALSE, /* is_bitmask */
4517 FALSE, /* is_mixed */
4518 #ifdef PIPE_ARCH_BIG_ENDIAN
4519 {
4520 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 48}, /* x = r */
4521 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* y = g */
4522 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* z = b */
4523 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0} /* w = a */
4524 },
4525 #else
4526 {
4527 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
4528 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
4529 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* z = b */
4530 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 48} /* w = a */
4531 },
4532 #endif
4533 #ifdef PIPE_ARCH_BIG_ENDIAN
4534 {
4535 UTIL_FORMAT_SWIZZLE_X, /* r */
4536 UTIL_FORMAT_SWIZZLE_Y, /* g */
4537 UTIL_FORMAT_SWIZZLE_Z, /* b */
4538 UTIL_FORMAT_SWIZZLE_W /* a */
4539 },
4540 #else
4541 {
4542 UTIL_FORMAT_SWIZZLE_X, /* r */
4543 UTIL_FORMAT_SWIZZLE_Y, /* g */
4544 UTIL_FORMAT_SWIZZLE_Z, /* b */
4545 UTIL_FORMAT_SWIZZLE_W /* a */
4546 },
4547 #endif
4548 UTIL_FORMAT_COLORSPACE_RGB,
4549 };
4550
4551 const struct util_format_description
4552 util_format_r16_unorm_description = {
4553 PIPE_FORMAT_R16_UNORM,
4554 "PIPE_FORMAT_R16_UNORM",
4555 "r16_unorm",
4556 {1, 1, 16}, /* block */
4557 UTIL_FORMAT_LAYOUT_PLAIN,
4558 1, /* nr_channels */
4559 TRUE, /* is_array */
4560 TRUE, /* is_bitmask */
4561 FALSE, /* is_mixed */
4562 {
4563 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
4564 {0, 0, 0, 0, 0},
4565 {0, 0, 0, 0, 0},
4566 {0, 0, 0, 0, 0}
4567 },
4568 {
4569 UTIL_FORMAT_SWIZZLE_X, /* r */
4570 UTIL_FORMAT_SWIZZLE_0, /* g */
4571 UTIL_FORMAT_SWIZZLE_0, /* b */
4572 UTIL_FORMAT_SWIZZLE_1 /* a */
4573 },
4574 UTIL_FORMAT_COLORSPACE_RGB,
4575 };
4576
4577 const struct util_format_description
4578 util_format_r16g16_unorm_description = {
4579 PIPE_FORMAT_R16G16_UNORM,
4580 "PIPE_FORMAT_R16G16_UNORM",
4581 "r16g16_unorm",
4582 {1, 1, 32}, /* block */
4583 UTIL_FORMAT_LAYOUT_PLAIN,
4584 2, /* nr_channels */
4585 TRUE, /* is_array */
4586 TRUE, /* is_bitmask */
4587 FALSE, /* is_mixed */
4588 #ifdef PIPE_ARCH_BIG_ENDIAN
4589 {
4590 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* x = r */
4591 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* y = g */
4592 {0, 0, 0, 0, 0},
4593 {0, 0, 0, 0, 0}
4594 },
4595 #else
4596 {
4597 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
4598 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
4599 {0, 0, 0, 0, 0},
4600 {0, 0, 0, 0, 0}
4601 },
4602 #endif
4603 #ifdef PIPE_ARCH_BIG_ENDIAN
4604 {
4605 UTIL_FORMAT_SWIZZLE_X, /* r */
4606 UTIL_FORMAT_SWIZZLE_Y, /* g */
4607 UTIL_FORMAT_SWIZZLE_0, /* b */
4608 UTIL_FORMAT_SWIZZLE_1 /* a */
4609 },
4610 #else
4611 {
4612 UTIL_FORMAT_SWIZZLE_X, /* r */
4613 UTIL_FORMAT_SWIZZLE_Y, /* g */
4614 UTIL_FORMAT_SWIZZLE_0, /* b */
4615 UTIL_FORMAT_SWIZZLE_1 /* a */
4616 },
4617 #endif
4618 UTIL_FORMAT_COLORSPACE_RGB,
4619 };
4620
4621 const struct util_format_description
4622 util_format_r16g16b16_unorm_description = {
4623 PIPE_FORMAT_R16G16B16_UNORM,
4624 "PIPE_FORMAT_R16G16B16_UNORM",
4625 "r16g16b16_unorm",
4626 {1, 1, 48}, /* block */
4627 UTIL_FORMAT_LAYOUT_PLAIN,
4628 3, /* nr_channels */
4629 TRUE, /* is_array */
4630 FALSE, /* is_bitmask */
4631 FALSE, /* is_mixed */
4632 #ifdef PIPE_ARCH_BIG_ENDIAN
4633 {
4634 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* x = r */
4635 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
4636 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* z = b */
4637 {0, 0, 0, 0, 0}
4638 },
4639 #else
4640 {
4641 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
4642 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
4643 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* z = b */
4644 {0, 0, 0, 0, 0}
4645 },
4646 #endif
4647 #ifdef PIPE_ARCH_BIG_ENDIAN
4648 {
4649 UTIL_FORMAT_SWIZZLE_X, /* r */
4650 UTIL_FORMAT_SWIZZLE_Y, /* g */
4651 UTIL_FORMAT_SWIZZLE_Z, /* b */
4652 UTIL_FORMAT_SWIZZLE_1 /* a */
4653 },
4654 #else
4655 {
4656 UTIL_FORMAT_SWIZZLE_X, /* r */
4657 UTIL_FORMAT_SWIZZLE_Y, /* g */
4658 UTIL_FORMAT_SWIZZLE_Z, /* b */
4659 UTIL_FORMAT_SWIZZLE_1 /* a */
4660 },
4661 #endif
4662 UTIL_FORMAT_COLORSPACE_RGB,
4663 };
4664
4665 const struct util_format_description
4666 util_format_r16g16b16a16_unorm_description = {
4667 PIPE_FORMAT_R16G16B16A16_UNORM,
4668 "PIPE_FORMAT_R16G16B16A16_UNORM",
4669 "r16g16b16a16_unorm",
4670 {1, 1, 64}, /* block */
4671 UTIL_FORMAT_LAYOUT_PLAIN,
4672 4, /* nr_channels */
4673 TRUE, /* is_array */
4674 FALSE, /* is_bitmask */
4675 FALSE, /* is_mixed */
4676 #ifdef PIPE_ARCH_BIG_ENDIAN
4677 {
4678 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 48}, /* x = r */
4679 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* y = g */
4680 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* z = b */
4681 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0} /* w = a */
4682 },
4683 #else
4684 {
4685 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
4686 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
4687 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* z = b */
4688 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 48} /* w = a */
4689 },
4690 #endif
4691 #ifdef PIPE_ARCH_BIG_ENDIAN
4692 {
4693 UTIL_FORMAT_SWIZZLE_X, /* r */
4694 UTIL_FORMAT_SWIZZLE_Y, /* g */
4695 UTIL_FORMAT_SWIZZLE_Z, /* b */
4696 UTIL_FORMAT_SWIZZLE_W /* a */
4697 },
4698 #else
4699 {
4700 UTIL_FORMAT_SWIZZLE_X, /* r */
4701 UTIL_FORMAT_SWIZZLE_Y, /* g */
4702 UTIL_FORMAT_SWIZZLE_Z, /* b */
4703 UTIL_FORMAT_SWIZZLE_W /* a */
4704 },
4705 #endif
4706 UTIL_FORMAT_COLORSPACE_RGB,
4707 };
4708
4709 const struct util_format_description
4710 util_format_r16_uscaled_description = {
4711 PIPE_FORMAT_R16_USCALED,
4712 "PIPE_FORMAT_R16_USCALED",
4713 "r16_uscaled",
4714 {1, 1, 16}, /* block */
4715 UTIL_FORMAT_LAYOUT_PLAIN,
4716 1, /* nr_channels */
4717 TRUE, /* is_array */
4718 TRUE, /* is_bitmask */
4719 FALSE, /* is_mixed */
4720 {
4721 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
4722 {0, 0, 0, 0, 0},
4723 {0, 0, 0, 0, 0},
4724 {0, 0, 0, 0, 0}
4725 },
4726 {
4727 UTIL_FORMAT_SWIZZLE_X, /* r */
4728 UTIL_FORMAT_SWIZZLE_0, /* g */
4729 UTIL_FORMAT_SWIZZLE_0, /* b */
4730 UTIL_FORMAT_SWIZZLE_1 /* a */
4731 },
4732 UTIL_FORMAT_COLORSPACE_RGB,
4733 };
4734
4735 const struct util_format_description
4736 util_format_r16g16_uscaled_description = {
4737 PIPE_FORMAT_R16G16_USCALED,
4738 "PIPE_FORMAT_R16G16_USCALED",
4739 "r16g16_uscaled",
4740 {1, 1, 32}, /* block */
4741 UTIL_FORMAT_LAYOUT_PLAIN,
4742 2, /* nr_channels */
4743 TRUE, /* is_array */
4744 TRUE, /* is_bitmask */
4745 FALSE, /* is_mixed */
4746 #ifdef PIPE_ARCH_BIG_ENDIAN
4747 {
4748 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* x = r */
4749 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* y = g */
4750 {0, 0, 0, 0, 0},
4751 {0, 0, 0, 0, 0}
4752 },
4753 #else
4754 {
4755 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
4756 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* y = g */
4757 {0, 0, 0, 0, 0},
4758 {0, 0, 0, 0, 0}
4759 },
4760 #endif
4761 #ifdef PIPE_ARCH_BIG_ENDIAN
4762 {
4763 UTIL_FORMAT_SWIZZLE_X, /* r */
4764 UTIL_FORMAT_SWIZZLE_Y, /* g */
4765 UTIL_FORMAT_SWIZZLE_0, /* b */
4766 UTIL_FORMAT_SWIZZLE_1 /* a */
4767 },
4768 #else
4769 {
4770 UTIL_FORMAT_SWIZZLE_X, /* r */
4771 UTIL_FORMAT_SWIZZLE_Y, /* g */
4772 UTIL_FORMAT_SWIZZLE_0, /* b */
4773 UTIL_FORMAT_SWIZZLE_1 /* a */
4774 },
4775 #endif
4776 UTIL_FORMAT_COLORSPACE_RGB,
4777 };
4778
4779 const struct util_format_description
4780 util_format_r16g16b16_uscaled_description = {
4781 PIPE_FORMAT_R16G16B16_USCALED,
4782 "PIPE_FORMAT_R16G16B16_USCALED",
4783 "r16g16b16_uscaled",
4784 {1, 1, 48}, /* block */
4785 UTIL_FORMAT_LAYOUT_PLAIN,
4786 3, /* nr_channels */
4787 TRUE, /* is_array */
4788 FALSE, /* is_bitmask */
4789 FALSE, /* is_mixed */
4790 #ifdef PIPE_ARCH_BIG_ENDIAN
4791 {
4792 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 32}, /* x = r */
4793 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* y = g */
4794 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* z = b */
4795 {0, 0, 0, 0, 0}
4796 },
4797 #else
4798 {
4799 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
4800 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* y = g */
4801 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 32}, /* z = b */
4802 {0, 0, 0, 0, 0}
4803 },
4804 #endif
4805 #ifdef PIPE_ARCH_BIG_ENDIAN
4806 {
4807 UTIL_FORMAT_SWIZZLE_X, /* r */
4808 UTIL_FORMAT_SWIZZLE_Y, /* g */
4809 UTIL_FORMAT_SWIZZLE_Z, /* b */
4810 UTIL_FORMAT_SWIZZLE_1 /* a */
4811 },
4812 #else
4813 {
4814 UTIL_FORMAT_SWIZZLE_X, /* r */
4815 UTIL_FORMAT_SWIZZLE_Y, /* g */
4816 UTIL_FORMAT_SWIZZLE_Z, /* b */
4817 UTIL_FORMAT_SWIZZLE_1 /* a */
4818 },
4819 #endif
4820 UTIL_FORMAT_COLORSPACE_RGB,
4821 };
4822
4823 const struct util_format_description
4824 util_format_r16g16b16a16_uscaled_description = {
4825 PIPE_FORMAT_R16G16B16A16_USCALED,
4826 "PIPE_FORMAT_R16G16B16A16_USCALED",
4827 "r16g16b16a16_uscaled",
4828 {1, 1, 64}, /* block */
4829 UTIL_FORMAT_LAYOUT_PLAIN,
4830 4, /* nr_channels */
4831 TRUE, /* is_array */
4832 FALSE, /* is_bitmask */
4833 FALSE, /* is_mixed */
4834 #ifdef PIPE_ARCH_BIG_ENDIAN
4835 {
4836 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 48}, /* x = r */
4837 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 32}, /* y = g */
4838 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* z = b */
4839 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0} /* w = a */
4840 },
4841 #else
4842 {
4843 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 0}, /* x = r */
4844 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 16}, /* y = g */
4845 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 32}, /* z = b */
4846 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16, 48} /* w = a */
4847 },
4848 #endif
4849 #ifdef PIPE_ARCH_BIG_ENDIAN
4850 {
4851 UTIL_FORMAT_SWIZZLE_X, /* r */
4852 UTIL_FORMAT_SWIZZLE_Y, /* g */
4853 UTIL_FORMAT_SWIZZLE_Z, /* b */
4854 UTIL_FORMAT_SWIZZLE_W /* a */
4855 },
4856 #else
4857 {
4858 UTIL_FORMAT_SWIZZLE_X, /* r */
4859 UTIL_FORMAT_SWIZZLE_Y, /* g */
4860 UTIL_FORMAT_SWIZZLE_Z, /* b */
4861 UTIL_FORMAT_SWIZZLE_W /* a */
4862 },
4863 #endif
4864 UTIL_FORMAT_COLORSPACE_RGB,
4865 };
4866
4867 const struct util_format_description
4868 util_format_r16_snorm_description = {
4869 PIPE_FORMAT_R16_SNORM,
4870 "PIPE_FORMAT_R16_SNORM",
4871 "r16_snorm",
4872 {1, 1, 16}, /* block */
4873 UTIL_FORMAT_LAYOUT_PLAIN,
4874 1, /* nr_channels */
4875 TRUE, /* is_array */
4876 TRUE, /* is_bitmask */
4877 FALSE, /* is_mixed */
4878 {
4879 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
4880 {0, 0, 0, 0, 0},
4881 {0, 0, 0, 0, 0},
4882 {0, 0, 0, 0, 0}
4883 },
4884 {
4885 UTIL_FORMAT_SWIZZLE_X, /* r */
4886 UTIL_FORMAT_SWIZZLE_0, /* g */
4887 UTIL_FORMAT_SWIZZLE_0, /* b */
4888 UTIL_FORMAT_SWIZZLE_1 /* a */
4889 },
4890 UTIL_FORMAT_COLORSPACE_RGB,
4891 };
4892
4893 const struct util_format_description
4894 util_format_r16g16_snorm_description = {
4895 PIPE_FORMAT_R16G16_SNORM,
4896 "PIPE_FORMAT_R16G16_SNORM",
4897 "r16g16_snorm",
4898 {1, 1, 32}, /* block */
4899 UTIL_FORMAT_LAYOUT_PLAIN,
4900 2, /* nr_channels */
4901 TRUE, /* is_array */
4902 TRUE, /* is_bitmask */
4903 FALSE, /* is_mixed */
4904 #ifdef PIPE_ARCH_BIG_ENDIAN
4905 {
4906 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* x = r */
4907 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* y = g */
4908 {0, 0, 0, 0, 0},
4909 {0, 0, 0, 0, 0}
4910 },
4911 #else
4912 {
4913 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
4914 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
4915 {0, 0, 0, 0, 0},
4916 {0, 0, 0, 0, 0}
4917 },
4918 #endif
4919 #ifdef PIPE_ARCH_BIG_ENDIAN
4920 {
4921 UTIL_FORMAT_SWIZZLE_X, /* r */
4922 UTIL_FORMAT_SWIZZLE_Y, /* g */
4923 UTIL_FORMAT_SWIZZLE_0, /* b */
4924 UTIL_FORMAT_SWIZZLE_1 /* a */
4925 },
4926 #else
4927 {
4928 UTIL_FORMAT_SWIZZLE_X, /* r */
4929 UTIL_FORMAT_SWIZZLE_Y, /* g */
4930 UTIL_FORMAT_SWIZZLE_0, /* b */
4931 UTIL_FORMAT_SWIZZLE_1 /* a */
4932 },
4933 #endif
4934 UTIL_FORMAT_COLORSPACE_RGB,
4935 };
4936
4937 const struct util_format_description
4938 util_format_r16g16b16_snorm_description = {
4939 PIPE_FORMAT_R16G16B16_SNORM,
4940 "PIPE_FORMAT_R16G16B16_SNORM",
4941 "r16g16b16_snorm",
4942 {1, 1, 48}, /* block */
4943 UTIL_FORMAT_LAYOUT_PLAIN,
4944 3, /* nr_channels */
4945 TRUE, /* is_array */
4946 FALSE, /* is_bitmask */
4947 FALSE, /* is_mixed */
4948 #ifdef PIPE_ARCH_BIG_ENDIAN
4949 {
4950 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* x = r */
4951 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
4952 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* z = b */
4953 {0, 0, 0, 0, 0}
4954 },
4955 #else
4956 {
4957 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
4958 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
4959 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* z = b */
4960 {0, 0, 0, 0, 0}
4961 },
4962 #endif
4963 #ifdef PIPE_ARCH_BIG_ENDIAN
4964 {
4965 UTIL_FORMAT_SWIZZLE_X, /* r */
4966 UTIL_FORMAT_SWIZZLE_Y, /* g */
4967 UTIL_FORMAT_SWIZZLE_Z, /* b */
4968 UTIL_FORMAT_SWIZZLE_1 /* a */
4969 },
4970 #else
4971 {
4972 UTIL_FORMAT_SWIZZLE_X, /* r */
4973 UTIL_FORMAT_SWIZZLE_Y, /* g */
4974 UTIL_FORMAT_SWIZZLE_Z, /* b */
4975 UTIL_FORMAT_SWIZZLE_1 /* a */
4976 },
4977 #endif
4978 UTIL_FORMAT_COLORSPACE_RGB,
4979 };
4980
4981 const struct util_format_description
4982 util_format_r16g16b16a16_snorm_description = {
4983 PIPE_FORMAT_R16G16B16A16_SNORM,
4984 "PIPE_FORMAT_R16G16B16A16_SNORM",
4985 "r16g16b16a16_snorm",
4986 {1, 1, 64}, /* block */
4987 UTIL_FORMAT_LAYOUT_PLAIN,
4988 4, /* nr_channels */
4989 TRUE, /* is_array */
4990 FALSE, /* is_bitmask */
4991 FALSE, /* is_mixed */
4992 #ifdef PIPE_ARCH_BIG_ENDIAN
4993 {
4994 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 48}, /* x = r */
4995 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* y = g */
4996 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* z = b */
4997 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0} /* w = a */
4998 },
4999 #else
5000 {
5001 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
5002 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
5003 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* z = b */
5004 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 48} /* w = a */
5005 },
5006 #endif
5007 #ifdef PIPE_ARCH_BIG_ENDIAN
5008 {
5009 UTIL_FORMAT_SWIZZLE_X, /* r */
5010 UTIL_FORMAT_SWIZZLE_Y, /* g */
5011 UTIL_FORMAT_SWIZZLE_Z, /* b */
5012 UTIL_FORMAT_SWIZZLE_W /* a */
5013 },
5014 #else
5015 {
5016 UTIL_FORMAT_SWIZZLE_X, /* r */
5017 UTIL_FORMAT_SWIZZLE_Y, /* g */
5018 UTIL_FORMAT_SWIZZLE_Z, /* b */
5019 UTIL_FORMAT_SWIZZLE_W /* a */
5020 },
5021 #endif
5022 UTIL_FORMAT_COLORSPACE_RGB,
5023 };
5024
5025 const struct util_format_description
5026 util_format_r16_sscaled_description = {
5027 PIPE_FORMAT_R16_SSCALED,
5028 "PIPE_FORMAT_R16_SSCALED",
5029 "r16_sscaled",
5030 {1, 1, 16}, /* block */
5031 UTIL_FORMAT_LAYOUT_PLAIN,
5032 1, /* nr_channels */
5033 TRUE, /* is_array */
5034 TRUE, /* is_bitmask */
5035 FALSE, /* is_mixed */
5036 {
5037 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
5038 {0, 0, 0, 0, 0},
5039 {0, 0, 0, 0, 0},
5040 {0, 0, 0, 0, 0}
5041 },
5042 {
5043 UTIL_FORMAT_SWIZZLE_X, /* r */
5044 UTIL_FORMAT_SWIZZLE_0, /* g */
5045 UTIL_FORMAT_SWIZZLE_0, /* b */
5046 UTIL_FORMAT_SWIZZLE_1 /* a */
5047 },
5048 UTIL_FORMAT_COLORSPACE_RGB,
5049 };
5050
5051 const struct util_format_description
5052 util_format_r16g16_sscaled_description = {
5053 PIPE_FORMAT_R16G16_SSCALED,
5054 "PIPE_FORMAT_R16G16_SSCALED",
5055 "r16g16_sscaled",
5056 {1, 1, 32}, /* block */
5057 UTIL_FORMAT_LAYOUT_PLAIN,
5058 2, /* nr_channels */
5059 TRUE, /* is_array */
5060 TRUE, /* is_bitmask */
5061 FALSE, /* is_mixed */
5062 #ifdef PIPE_ARCH_BIG_ENDIAN
5063 {
5064 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* x = r */
5065 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* y = g */
5066 {0, 0, 0, 0, 0},
5067 {0, 0, 0, 0, 0}
5068 },
5069 #else
5070 {
5071 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
5072 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* y = g */
5073 {0, 0, 0, 0, 0},
5074 {0, 0, 0, 0, 0}
5075 },
5076 #endif
5077 #ifdef PIPE_ARCH_BIG_ENDIAN
5078 {
5079 UTIL_FORMAT_SWIZZLE_X, /* r */
5080 UTIL_FORMAT_SWIZZLE_Y, /* g */
5081 UTIL_FORMAT_SWIZZLE_0, /* b */
5082 UTIL_FORMAT_SWIZZLE_1 /* a */
5083 },
5084 #else
5085 {
5086 UTIL_FORMAT_SWIZZLE_X, /* r */
5087 UTIL_FORMAT_SWIZZLE_Y, /* g */
5088 UTIL_FORMAT_SWIZZLE_0, /* b */
5089 UTIL_FORMAT_SWIZZLE_1 /* a */
5090 },
5091 #endif
5092 UTIL_FORMAT_COLORSPACE_RGB,
5093 };
5094
5095 const struct util_format_description
5096 util_format_r16g16b16_sscaled_description = {
5097 PIPE_FORMAT_R16G16B16_SSCALED,
5098 "PIPE_FORMAT_R16G16B16_SSCALED",
5099 "r16g16b16_sscaled",
5100 {1, 1, 48}, /* block */
5101 UTIL_FORMAT_LAYOUT_PLAIN,
5102 3, /* nr_channels */
5103 TRUE, /* is_array */
5104 FALSE, /* is_bitmask */
5105 FALSE, /* is_mixed */
5106 #ifdef PIPE_ARCH_BIG_ENDIAN
5107 {
5108 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 32}, /* x = r */
5109 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* y = g */
5110 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* z = b */
5111 {0, 0, 0, 0, 0}
5112 },
5113 #else
5114 {
5115 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
5116 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* y = g */
5117 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 32}, /* z = b */
5118 {0, 0, 0, 0, 0}
5119 },
5120 #endif
5121 #ifdef PIPE_ARCH_BIG_ENDIAN
5122 {
5123 UTIL_FORMAT_SWIZZLE_X, /* r */
5124 UTIL_FORMAT_SWIZZLE_Y, /* g */
5125 UTIL_FORMAT_SWIZZLE_Z, /* b */
5126 UTIL_FORMAT_SWIZZLE_1 /* a */
5127 },
5128 #else
5129 {
5130 UTIL_FORMAT_SWIZZLE_X, /* r */
5131 UTIL_FORMAT_SWIZZLE_Y, /* g */
5132 UTIL_FORMAT_SWIZZLE_Z, /* b */
5133 UTIL_FORMAT_SWIZZLE_1 /* a */
5134 },
5135 #endif
5136 UTIL_FORMAT_COLORSPACE_RGB,
5137 };
5138
5139 const struct util_format_description
5140 util_format_r16g16b16a16_sscaled_description = {
5141 PIPE_FORMAT_R16G16B16A16_SSCALED,
5142 "PIPE_FORMAT_R16G16B16A16_SSCALED",
5143 "r16g16b16a16_sscaled",
5144 {1, 1, 64}, /* block */
5145 UTIL_FORMAT_LAYOUT_PLAIN,
5146 4, /* nr_channels */
5147 TRUE, /* is_array */
5148 FALSE, /* is_bitmask */
5149 FALSE, /* is_mixed */
5150 #ifdef PIPE_ARCH_BIG_ENDIAN
5151 {
5152 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 48}, /* x = r */
5153 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 32}, /* y = g */
5154 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* z = b */
5155 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0} /* w = a */
5156 },
5157 #else
5158 {
5159 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 0}, /* x = r */
5160 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 16}, /* y = g */
5161 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 32}, /* z = b */
5162 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16, 48} /* w = a */
5163 },
5164 #endif
5165 #ifdef PIPE_ARCH_BIG_ENDIAN
5166 {
5167 UTIL_FORMAT_SWIZZLE_X, /* r */
5168 UTIL_FORMAT_SWIZZLE_Y, /* g */
5169 UTIL_FORMAT_SWIZZLE_Z, /* b */
5170 UTIL_FORMAT_SWIZZLE_W /* a */
5171 },
5172 #else
5173 {
5174 UTIL_FORMAT_SWIZZLE_X, /* r */
5175 UTIL_FORMAT_SWIZZLE_Y, /* g */
5176 UTIL_FORMAT_SWIZZLE_Z, /* b */
5177 UTIL_FORMAT_SWIZZLE_W /* a */
5178 },
5179 #endif
5180 UTIL_FORMAT_COLORSPACE_RGB,
5181 };
5182
5183 const struct util_format_description
5184 util_format_r8_unorm_description = {
5185 PIPE_FORMAT_R8_UNORM,
5186 "PIPE_FORMAT_R8_UNORM",
5187 "r8_unorm",
5188 {1, 1, 8}, /* block */
5189 UTIL_FORMAT_LAYOUT_PLAIN,
5190 1, /* nr_channels */
5191 TRUE, /* is_array */
5192 TRUE, /* is_bitmask */
5193 FALSE, /* is_mixed */
5194 {
5195 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5196 {0, 0, 0, 0, 0},
5197 {0, 0, 0, 0, 0},
5198 {0, 0, 0, 0, 0}
5199 },
5200 {
5201 UTIL_FORMAT_SWIZZLE_X, /* r */
5202 UTIL_FORMAT_SWIZZLE_0, /* g */
5203 UTIL_FORMAT_SWIZZLE_0, /* b */
5204 UTIL_FORMAT_SWIZZLE_1 /* a */
5205 },
5206 UTIL_FORMAT_COLORSPACE_RGB,
5207 };
5208
5209 const struct util_format_description
5210 util_format_r8g8_unorm_description = {
5211 PIPE_FORMAT_R8G8_UNORM,
5212 "PIPE_FORMAT_R8G8_UNORM",
5213 "r8g8_unorm",
5214 {1, 1, 16}, /* block */
5215 UTIL_FORMAT_LAYOUT_PLAIN,
5216 2, /* nr_channels */
5217 TRUE, /* is_array */
5218 TRUE, /* is_bitmask */
5219 FALSE, /* is_mixed */
5220 #ifdef PIPE_ARCH_BIG_ENDIAN
5221 {
5222 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = r */
5223 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = g */
5224 {0, 0, 0, 0, 0},
5225 {0, 0, 0, 0, 0}
5226 },
5227 #else
5228 {
5229 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5230 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5231 {0, 0, 0, 0, 0},
5232 {0, 0, 0, 0, 0}
5233 },
5234 #endif
5235 #ifdef PIPE_ARCH_BIG_ENDIAN
5236 {
5237 UTIL_FORMAT_SWIZZLE_X, /* r */
5238 UTIL_FORMAT_SWIZZLE_Y, /* g */
5239 UTIL_FORMAT_SWIZZLE_0, /* b */
5240 UTIL_FORMAT_SWIZZLE_1 /* a */
5241 },
5242 #else
5243 {
5244 UTIL_FORMAT_SWIZZLE_X, /* r */
5245 UTIL_FORMAT_SWIZZLE_Y, /* g */
5246 UTIL_FORMAT_SWIZZLE_0, /* b */
5247 UTIL_FORMAT_SWIZZLE_1 /* a */
5248 },
5249 #endif
5250 UTIL_FORMAT_COLORSPACE_RGB,
5251 };
5252
5253 const struct util_format_description
5254 util_format_r8g8b8_unorm_description = {
5255 PIPE_FORMAT_R8G8B8_UNORM,
5256 "PIPE_FORMAT_R8G8B8_UNORM",
5257 "r8g8b8_unorm",
5258 {1, 1, 24}, /* block */
5259 UTIL_FORMAT_LAYOUT_PLAIN,
5260 3, /* nr_channels */
5261 TRUE, /* is_array */
5262 FALSE, /* is_bitmask */
5263 FALSE, /* is_mixed */
5264 #ifdef PIPE_ARCH_BIG_ENDIAN
5265 {
5266 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* x = r */
5267 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5268 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* z = b */
5269 {0, 0, 0, 0, 0}
5270 },
5271 #else
5272 {
5273 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5274 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5275 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
5276 {0, 0, 0, 0, 0}
5277 },
5278 #endif
5279 #ifdef PIPE_ARCH_BIG_ENDIAN
5280 {
5281 UTIL_FORMAT_SWIZZLE_X, /* r */
5282 UTIL_FORMAT_SWIZZLE_Y, /* g */
5283 UTIL_FORMAT_SWIZZLE_Z, /* b */
5284 UTIL_FORMAT_SWIZZLE_1 /* a */
5285 },
5286 #else
5287 {
5288 UTIL_FORMAT_SWIZZLE_X, /* r */
5289 UTIL_FORMAT_SWIZZLE_Y, /* g */
5290 UTIL_FORMAT_SWIZZLE_Z, /* b */
5291 UTIL_FORMAT_SWIZZLE_1 /* a */
5292 },
5293 #endif
5294 UTIL_FORMAT_COLORSPACE_RGB,
5295 };
5296
5297 const struct util_format_description
5298 util_format_r8g8b8a8_unorm_description = {
5299 PIPE_FORMAT_R8G8B8A8_UNORM,
5300 "PIPE_FORMAT_R8G8B8A8_UNORM",
5301 "r8g8b8a8_unorm",
5302 {1, 1, 32}, /* block */
5303 UTIL_FORMAT_LAYOUT_PLAIN,
5304 4, /* nr_channels */
5305 TRUE, /* is_array */
5306 TRUE, /* is_bitmask */
5307 FALSE, /* is_mixed */
5308 #ifdef PIPE_ARCH_BIG_ENDIAN
5309 {
5310 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = r */
5311 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
5312 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = b */
5313 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0} /* w = a */
5314 },
5315 #else
5316 {
5317 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5318 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5319 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
5320 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24} /* w = a */
5321 },
5322 #endif
5323 #ifdef PIPE_ARCH_BIG_ENDIAN
5324 {
5325 UTIL_FORMAT_SWIZZLE_X, /* r */
5326 UTIL_FORMAT_SWIZZLE_Y, /* g */
5327 UTIL_FORMAT_SWIZZLE_Z, /* b */
5328 UTIL_FORMAT_SWIZZLE_W /* a */
5329 },
5330 #else
5331 {
5332 UTIL_FORMAT_SWIZZLE_X, /* r */
5333 UTIL_FORMAT_SWIZZLE_Y, /* g */
5334 UTIL_FORMAT_SWIZZLE_Z, /* b */
5335 UTIL_FORMAT_SWIZZLE_W /* a */
5336 },
5337 #endif
5338 UTIL_FORMAT_COLORSPACE_RGB,
5339 };
5340
5341 const struct util_format_description
5342 util_format_r8_uscaled_description = {
5343 PIPE_FORMAT_R8_USCALED,
5344 "PIPE_FORMAT_R8_USCALED",
5345 "r8_uscaled",
5346 {1, 1, 8}, /* block */
5347 UTIL_FORMAT_LAYOUT_PLAIN,
5348 1, /* nr_channels */
5349 TRUE, /* is_array */
5350 TRUE, /* is_bitmask */
5351 FALSE, /* is_mixed */
5352 {
5353 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5354 {0, 0, 0, 0, 0},
5355 {0, 0, 0, 0, 0},
5356 {0, 0, 0, 0, 0}
5357 },
5358 {
5359 UTIL_FORMAT_SWIZZLE_X, /* r */
5360 UTIL_FORMAT_SWIZZLE_0, /* g */
5361 UTIL_FORMAT_SWIZZLE_0, /* b */
5362 UTIL_FORMAT_SWIZZLE_1 /* a */
5363 },
5364 UTIL_FORMAT_COLORSPACE_RGB,
5365 };
5366
5367 const struct util_format_description
5368 util_format_r8g8_uscaled_description = {
5369 PIPE_FORMAT_R8G8_USCALED,
5370 "PIPE_FORMAT_R8G8_USCALED",
5371 "r8g8_uscaled",
5372 {1, 1, 16}, /* block */
5373 UTIL_FORMAT_LAYOUT_PLAIN,
5374 2, /* nr_channels */
5375 TRUE, /* is_array */
5376 TRUE, /* is_bitmask */
5377 FALSE, /* is_mixed */
5378 #ifdef PIPE_ARCH_BIG_ENDIAN
5379 {
5380 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* x = r */
5381 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* y = g */
5382 {0, 0, 0, 0, 0},
5383 {0, 0, 0, 0, 0}
5384 },
5385 #else
5386 {
5387 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5388 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5389 {0, 0, 0, 0, 0},
5390 {0, 0, 0, 0, 0}
5391 },
5392 #endif
5393 #ifdef PIPE_ARCH_BIG_ENDIAN
5394 {
5395 UTIL_FORMAT_SWIZZLE_X, /* r */
5396 UTIL_FORMAT_SWIZZLE_Y, /* g */
5397 UTIL_FORMAT_SWIZZLE_0, /* b */
5398 UTIL_FORMAT_SWIZZLE_1 /* a */
5399 },
5400 #else
5401 {
5402 UTIL_FORMAT_SWIZZLE_X, /* r */
5403 UTIL_FORMAT_SWIZZLE_Y, /* g */
5404 UTIL_FORMAT_SWIZZLE_0, /* b */
5405 UTIL_FORMAT_SWIZZLE_1 /* a */
5406 },
5407 #endif
5408 UTIL_FORMAT_COLORSPACE_RGB,
5409 };
5410
5411 const struct util_format_description
5412 util_format_r8g8b8_uscaled_description = {
5413 PIPE_FORMAT_R8G8B8_USCALED,
5414 "PIPE_FORMAT_R8G8B8_USCALED",
5415 "r8g8b8_uscaled",
5416 {1, 1, 24}, /* block */
5417 UTIL_FORMAT_LAYOUT_PLAIN,
5418 3, /* nr_channels */
5419 TRUE, /* is_array */
5420 FALSE, /* is_bitmask */
5421 FALSE, /* is_mixed */
5422 #ifdef PIPE_ARCH_BIG_ENDIAN
5423 {
5424 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 16}, /* x = r */
5425 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5426 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* z = b */
5427 {0, 0, 0, 0, 0}
5428 },
5429 #else
5430 {
5431 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5432 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5433 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 16}, /* z = b */
5434 {0, 0, 0, 0, 0}
5435 },
5436 #endif
5437 #ifdef PIPE_ARCH_BIG_ENDIAN
5438 {
5439 UTIL_FORMAT_SWIZZLE_X, /* r */
5440 UTIL_FORMAT_SWIZZLE_Y, /* g */
5441 UTIL_FORMAT_SWIZZLE_Z, /* b */
5442 UTIL_FORMAT_SWIZZLE_1 /* a */
5443 },
5444 #else
5445 {
5446 UTIL_FORMAT_SWIZZLE_X, /* r */
5447 UTIL_FORMAT_SWIZZLE_Y, /* g */
5448 UTIL_FORMAT_SWIZZLE_Z, /* b */
5449 UTIL_FORMAT_SWIZZLE_1 /* a */
5450 },
5451 #endif
5452 UTIL_FORMAT_COLORSPACE_RGB,
5453 };
5454
5455 const struct util_format_description
5456 util_format_r8g8b8a8_uscaled_description = {
5457 PIPE_FORMAT_R8G8B8A8_USCALED,
5458 "PIPE_FORMAT_R8G8B8A8_USCALED",
5459 "r8g8b8a8_uscaled",
5460 {1, 1, 32}, /* block */
5461 UTIL_FORMAT_LAYOUT_PLAIN,
5462 4, /* nr_channels */
5463 TRUE, /* is_array */
5464 TRUE, /* is_bitmask */
5465 FALSE, /* is_mixed */
5466 #ifdef PIPE_ARCH_BIG_ENDIAN
5467 {
5468 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 24}, /* x = r */
5469 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 16}, /* y = g */
5470 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* z = b */
5471 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0} /* w = a */
5472 },
5473 #else
5474 {
5475 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5476 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5477 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 16}, /* z = b */
5478 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8, 24} /* w = a */
5479 },
5480 #endif
5481 #ifdef PIPE_ARCH_BIG_ENDIAN
5482 {
5483 UTIL_FORMAT_SWIZZLE_X, /* r */
5484 UTIL_FORMAT_SWIZZLE_Y, /* g */
5485 UTIL_FORMAT_SWIZZLE_Z, /* b */
5486 UTIL_FORMAT_SWIZZLE_W /* a */
5487 },
5488 #else
5489 {
5490 UTIL_FORMAT_SWIZZLE_X, /* r */
5491 UTIL_FORMAT_SWIZZLE_Y, /* g */
5492 UTIL_FORMAT_SWIZZLE_Z, /* b */
5493 UTIL_FORMAT_SWIZZLE_W /* a */
5494 },
5495 #endif
5496 UTIL_FORMAT_COLORSPACE_RGB,
5497 };
5498
5499 const struct util_format_description
5500 util_format_r8_snorm_description = {
5501 PIPE_FORMAT_R8_SNORM,
5502 "PIPE_FORMAT_R8_SNORM",
5503 "r8_snorm",
5504 {1, 1, 8}, /* block */
5505 UTIL_FORMAT_LAYOUT_PLAIN,
5506 1, /* nr_channels */
5507 TRUE, /* is_array */
5508 TRUE, /* is_bitmask */
5509 FALSE, /* is_mixed */
5510 {
5511 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5512 {0, 0, 0, 0, 0},
5513 {0, 0, 0, 0, 0},
5514 {0, 0, 0, 0, 0}
5515 },
5516 {
5517 UTIL_FORMAT_SWIZZLE_X, /* r */
5518 UTIL_FORMAT_SWIZZLE_0, /* g */
5519 UTIL_FORMAT_SWIZZLE_0, /* b */
5520 UTIL_FORMAT_SWIZZLE_1 /* a */
5521 },
5522 UTIL_FORMAT_COLORSPACE_RGB,
5523 };
5524
5525 const struct util_format_description
5526 util_format_r8g8_snorm_description = {
5527 PIPE_FORMAT_R8G8_SNORM,
5528 "PIPE_FORMAT_R8G8_SNORM",
5529 "r8g8_snorm",
5530 {1, 1, 16}, /* block */
5531 UTIL_FORMAT_LAYOUT_PLAIN,
5532 2, /* nr_channels */
5533 TRUE, /* is_array */
5534 TRUE, /* is_bitmask */
5535 FALSE, /* is_mixed */
5536 #ifdef PIPE_ARCH_BIG_ENDIAN
5537 {
5538 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* x = r */
5539 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* y = g */
5540 {0, 0, 0, 0, 0},
5541 {0, 0, 0, 0, 0}
5542 },
5543 #else
5544 {
5545 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5546 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5547 {0, 0, 0, 0, 0},
5548 {0, 0, 0, 0, 0}
5549 },
5550 #endif
5551 #ifdef PIPE_ARCH_BIG_ENDIAN
5552 {
5553 UTIL_FORMAT_SWIZZLE_X, /* r */
5554 UTIL_FORMAT_SWIZZLE_Y, /* g */
5555 UTIL_FORMAT_SWIZZLE_0, /* b */
5556 UTIL_FORMAT_SWIZZLE_1 /* a */
5557 },
5558 #else
5559 {
5560 UTIL_FORMAT_SWIZZLE_X, /* r */
5561 UTIL_FORMAT_SWIZZLE_Y, /* g */
5562 UTIL_FORMAT_SWIZZLE_0, /* b */
5563 UTIL_FORMAT_SWIZZLE_1 /* a */
5564 },
5565 #endif
5566 UTIL_FORMAT_COLORSPACE_RGB,
5567 };
5568
5569 const struct util_format_description
5570 util_format_r8g8b8_snorm_description = {
5571 PIPE_FORMAT_R8G8B8_SNORM,
5572 "PIPE_FORMAT_R8G8B8_SNORM",
5573 "r8g8b8_snorm",
5574 {1, 1, 24}, /* block */
5575 UTIL_FORMAT_LAYOUT_PLAIN,
5576 3, /* nr_channels */
5577 TRUE, /* is_array */
5578 FALSE, /* is_bitmask */
5579 FALSE, /* is_mixed */
5580 #ifdef PIPE_ARCH_BIG_ENDIAN
5581 {
5582 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* x = r */
5583 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5584 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* z = b */
5585 {0, 0, 0, 0, 0}
5586 },
5587 #else
5588 {
5589 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5590 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5591 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = b */
5592 {0, 0, 0, 0, 0}
5593 },
5594 #endif
5595 #ifdef PIPE_ARCH_BIG_ENDIAN
5596 {
5597 UTIL_FORMAT_SWIZZLE_X, /* r */
5598 UTIL_FORMAT_SWIZZLE_Y, /* g */
5599 UTIL_FORMAT_SWIZZLE_Z, /* b */
5600 UTIL_FORMAT_SWIZZLE_1 /* a */
5601 },
5602 #else
5603 {
5604 UTIL_FORMAT_SWIZZLE_X, /* r */
5605 UTIL_FORMAT_SWIZZLE_Y, /* g */
5606 UTIL_FORMAT_SWIZZLE_Z, /* b */
5607 UTIL_FORMAT_SWIZZLE_1 /* a */
5608 },
5609 #endif
5610 UTIL_FORMAT_COLORSPACE_RGB,
5611 };
5612
5613 const struct util_format_description
5614 util_format_r8g8b8a8_snorm_description = {
5615 PIPE_FORMAT_R8G8B8A8_SNORM,
5616 "PIPE_FORMAT_R8G8B8A8_SNORM",
5617 "r8g8b8a8_snorm",
5618 {1, 1, 32}, /* block */
5619 UTIL_FORMAT_LAYOUT_PLAIN,
5620 4, /* nr_channels */
5621 TRUE, /* is_array */
5622 TRUE, /* is_bitmask */
5623 FALSE, /* is_mixed */
5624 #ifdef PIPE_ARCH_BIG_ENDIAN
5625 {
5626 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24}, /* x = r */
5627 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* y = g */
5628 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* z = b */
5629 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0} /* w = a */
5630 },
5631 #else
5632 {
5633 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
5634 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
5635 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = b */
5636 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24} /* w = a */
5637 },
5638 #endif
5639 #ifdef PIPE_ARCH_BIG_ENDIAN
5640 {
5641 UTIL_FORMAT_SWIZZLE_X, /* r */
5642 UTIL_FORMAT_SWIZZLE_Y, /* g */
5643 UTIL_FORMAT_SWIZZLE_Z, /* b */
5644 UTIL_FORMAT_SWIZZLE_W /* a */
5645 },
5646 #else
5647 {
5648 UTIL_FORMAT_SWIZZLE_X, /* r */
5649 UTIL_FORMAT_SWIZZLE_Y, /* g */
5650 UTIL_FORMAT_SWIZZLE_Z, /* b */
5651 UTIL_FORMAT_SWIZZLE_W /* a */
5652 },
5653 #endif
5654 UTIL_FORMAT_COLORSPACE_RGB,
5655 };
5656
5657 const struct util_format_description
5658 util_format_r8_sscaled_description = {
5659 PIPE_FORMAT_R8_SSCALED,
5660 "PIPE_FORMAT_R8_SSCALED",
5661 "r8_sscaled",
5662 {1, 1, 8}, /* block */
5663 UTIL_FORMAT_LAYOUT_PLAIN,
5664 1, /* nr_channels */
5665 TRUE, /* is_array */
5666 TRUE, /* is_bitmask */
5667 FALSE, /* is_mixed */
5668 {
5669 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5670 {0, 0, 0, 0, 0},
5671 {0, 0, 0, 0, 0},
5672 {0, 0, 0, 0, 0}
5673 },
5674 {
5675 UTIL_FORMAT_SWIZZLE_X, /* r */
5676 UTIL_FORMAT_SWIZZLE_0, /* g */
5677 UTIL_FORMAT_SWIZZLE_0, /* b */
5678 UTIL_FORMAT_SWIZZLE_1 /* a */
5679 },
5680 UTIL_FORMAT_COLORSPACE_RGB,
5681 };
5682
5683 const struct util_format_description
5684 util_format_r8g8_sscaled_description = {
5685 PIPE_FORMAT_R8G8_SSCALED,
5686 "PIPE_FORMAT_R8G8_SSCALED",
5687 "r8g8_sscaled",
5688 {1, 1, 16}, /* block */
5689 UTIL_FORMAT_LAYOUT_PLAIN,
5690 2, /* nr_channels */
5691 TRUE, /* is_array */
5692 TRUE, /* is_bitmask */
5693 FALSE, /* is_mixed */
5694 #ifdef PIPE_ARCH_BIG_ENDIAN
5695 {
5696 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* x = r */
5697 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* y = g */
5698 {0, 0, 0, 0, 0},
5699 {0, 0, 0, 0, 0}
5700 },
5701 #else
5702 {
5703 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5704 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5705 {0, 0, 0, 0, 0},
5706 {0, 0, 0, 0, 0}
5707 },
5708 #endif
5709 #ifdef PIPE_ARCH_BIG_ENDIAN
5710 {
5711 UTIL_FORMAT_SWIZZLE_X, /* r */
5712 UTIL_FORMAT_SWIZZLE_Y, /* g */
5713 UTIL_FORMAT_SWIZZLE_0, /* b */
5714 UTIL_FORMAT_SWIZZLE_1 /* a */
5715 },
5716 #else
5717 {
5718 UTIL_FORMAT_SWIZZLE_X, /* r */
5719 UTIL_FORMAT_SWIZZLE_Y, /* g */
5720 UTIL_FORMAT_SWIZZLE_0, /* b */
5721 UTIL_FORMAT_SWIZZLE_1 /* a */
5722 },
5723 #endif
5724 UTIL_FORMAT_COLORSPACE_RGB,
5725 };
5726
5727 const struct util_format_description
5728 util_format_r8g8b8_sscaled_description = {
5729 PIPE_FORMAT_R8G8B8_SSCALED,
5730 "PIPE_FORMAT_R8G8B8_SSCALED",
5731 "r8g8b8_sscaled",
5732 {1, 1, 24}, /* block */
5733 UTIL_FORMAT_LAYOUT_PLAIN,
5734 3, /* nr_channels */
5735 TRUE, /* is_array */
5736 FALSE, /* is_bitmask */
5737 FALSE, /* is_mixed */
5738 #ifdef PIPE_ARCH_BIG_ENDIAN
5739 {
5740 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 16}, /* x = r */
5741 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5742 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* z = b */
5743 {0, 0, 0, 0, 0}
5744 },
5745 #else
5746 {
5747 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5748 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5749 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 16}, /* z = b */
5750 {0, 0, 0, 0, 0}
5751 },
5752 #endif
5753 #ifdef PIPE_ARCH_BIG_ENDIAN
5754 {
5755 UTIL_FORMAT_SWIZZLE_X, /* r */
5756 UTIL_FORMAT_SWIZZLE_Y, /* g */
5757 UTIL_FORMAT_SWIZZLE_Z, /* b */
5758 UTIL_FORMAT_SWIZZLE_1 /* a */
5759 },
5760 #else
5761 {
5762 UTIL_FORMAT_SWIZZLE_X, /* r */
5763 UTIL_FORMAT_SWIZZLE_Y, /* g */
5764 UTIL_FORMAT_SWIZZLE_Z, /* b */
5765 UTIL_FORMAT_SWIZZLE_1 /* a */
5766 },
5767 #endif
5768 UTIL_FORMAT_COLORSPACE_RGB,
5769 };
5770
5771 const struct util_format_description
5772 util_format_r8g8b8a8_sscaled_description = {
5773 PIPE_FORMAT_R8G8B8A8_SSCALED,
5774 "PIPE_FORMAT_R8G8B8A8_SSCALED",
5775 "r8g8b8a8_sscaled",
5776 {1, 1, 32}, /* block */
5777 UTIL_FORMAT_LAYOUT_PLAIN,
5778 4, /* nr_channels */
5779 TRUE, /* is_array */
5780 TRUE, /* is_bitmask */
5781 FALSE, /* is_mixed */
5782 #ifdef PIPE_ARCH_BIG_ENDIAN
5783 {
5784 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 24}, /* x = r */
5785 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 16}, /* y = g */
5786 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* z = b */
5787 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0} /* w = a */
5788 },
5789 #else
5790 {
5791 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 0}, /* x = r */
5792 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 8}, /* y = g */
5793 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 16}, /* z = b */
5794 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8, 24} /* w = a */
5795 },
5796 #endif
5797 #ifdef PIPE_ARCH_BIG_ENDIAN
5798 {
5799 UTIL_FORMAT_SWIZZLE_X, /* r */
5800 UTIL_FORMAT_SWIZZLE_Y, /* g */
5801 UTIL_FORMAT_SWIZZLE_Z, /* b */
5802 UTIL_FORMAT_SWIZZLE_W /* a */
5803 },
5804 #else
5805 {
5806 UTIL_FORMAT_SWIZZLE_X, /* r */
5807 UTIL_FORMAT_SWIZZLE_Y, /* g */
5808 UTIL_FORMAT_SWIZZLE_Z, /* b */
5809 UTIL_FORMAT_SWIZZLE_W /* a */
5810 },
5811 #endif
5812 UTIL_FORMAT_COLORSPACE_RGB,
5813 };
5814
5815 const struct util_format_description
5816 util_format_r32_fixed_description = {
5817 PIPE_FORMAT_R32_FIXED,
5818 "PIPE_FORMAT_R32_FIXED",
5819 "r32_fixed",
5820 {1, 1, 32}, /* block */
5821 UTIL_FORMAT_LAYOUT_PLAIN,
5822 1, /* nr_channels */
5823 TRUE, /* is_array */
5824 FALSE, /* is_bitmask */
5825 FALSE, /* is_mixed */
5826 {
5827 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
5828 {0, 0, 0, 0, 0},
5829 {0, 0, 0, 0, 0},
5830 {0, 0, 0, 0, 0}
5831 },
5832 {
5833 UTIL_FORMAT_SWIZZLE_X, /* r */
5834 UTIL_FORMAT_SWIZZLE_0, /* g */
5835 UTIL_FORMAT_SWIZZLE_0, /* b */
5836 UTIL_FORMAT_SWIZZLE_1 /* a */
5837 },
5838 UTIL_FORMAT_COLORSPACE_RGB,
5839 };
5840
5841 const struct util_format_description
5842 util_format_r32g32_fixed_description = {
5843 PIPE_FORMAT_R32G32_FIXED,
5844 "PIPE_FORMAT_R32G32_FIXED",
5845 "r32g32_fixed",
5846 {1, 1, 64}, /* block */
5847 UTIL_FORMAT_LAYOUT_PLAIN,
5848 2, /* nr_channels */
5849 TRUE, /* is_array */
5850 FALSE, /* is_bitmask */
5851 FALSE, /* is_mixed */
5852 #ifdef PIPE_ARCH_BIG_ENDIAN
5853 {
5854 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* x = r */
5855 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* y = g */
5856 {0, 0, 0, 0, 0},
5857 {0, 0, 0, 0, 0}
5858 },
5859 #else
5860 {
5861 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
5862 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* y = g */
5863 {0, 0, 0, 0, 0},
5864 {0, 0, 0, 0, 0}
5865 },
5866 #endif
5867 #ifdef PIPE_ARCH_BIG_ENDIAN
5868 {
5869 UTIL_FORMAT_SWIZZLE_X, /* r */
5870 UTIL_FORMAT_SWIZZLE_Y, /* g */
5871 UTIL_FORMAT_SWIZZLE_0, /* b */
5872 UTIL_FORMAT_SWIZZLE_1 /* a */
5873 },
5874 #else
5875 {
5876 UTIL_FORMAT_SWIZZLE_X, /* r */
5877 UTIL_FORMAT_SWIZZLE_Y, /* g */
5878 UTIL_FORMAT_SWIZZLE_0, /* b */
5879 UTIL_FORMAT_SWIZZLE_1 /* a */
5880 },
5881 #endif
5882 UTIL_FORMAT_COLORSPACE_RGB,
5883 };
5884
5885 const struct util_format_description
5886 util_format_r32g32b32_fixed_description = {
5887 PIPE_FORMAT_R32G32B32_FIXED,
5888 "PIPE_FORMAT_R32G32B32_FIXED",
5889 "r32g32b32_fixed",
5890 {1, 1, 96}, /* block */
5891 UTIL_FORMAT_LAYOUT_PLAIN,
5892 3, /* nr_channels */
5893 TRUE, /* is_array */
5894 FALSE, /* is_bitmask */
5895 FALSE, /* is_mixed */
5896 #ifdef PIPE_ARCH_BIG_ENDIAN
5897 {
5898 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 64}, /* x = r */
5899 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* y = g */
5900 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* z = b */
5901 {0, 0, 0, 0, 0}
5902 },
5903 #else
5904 {
5905 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
5906 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* y = g */
5907 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 64}, /* z = b */
5908 {0, 0, 0, 0, 0}
5909 },
5910 #endif
5911 #ifdef PIPE_ARCH_BIG_ENDIAN
5912 {
5913 UTIL_FORMAT_SWIZZLE_X, /* r */
5914 UTIL_FORMAT_SWIZZLE_Y, /* g */
5915 UTIL_FORMAT_SWIZZLE_Z, /* b */
5916 UTIL_FORMAT_SWIZZLE_1 /* a */
5917 },
5918 #else
5919 {
5920 UTIL_FORMAT_SWIZZLE_X, /* r */
5921 UTIL_FORMAT_SWIZZLE_Y, /* g */
5922 UTIL_FORMAT_SWIZZLE_Z, /* b */
5923 UTIL_FORMAT_SWIZZLE_1 /* a */
5924 },
5925 #endif
5926 UTIL_FORMAT_COLORSPACE_RGB,
5927 };
5928
5929 const struct util_format_description
5930 util_format_r32g32b32a32_fixed_description = {
5931 PIPE_FORMAT_R32G32B32A32_FIXED,
5932 "PIPE_FORMAT_R32G32B32A32_FIXED",
5933 "r32g32b32a32_fixed",
5934 {1, 1, 128}, /* block */
5935 UTIL_FORMAT_LAYOUT_PLAIN,
5936 4, /* nr_channels */
5937 TRUE, /* is_array */
5938 FALSE, /* is_bitmask */
5939 FALSE, /* is_mixed */
5940 #ifdef PIPE_ARCH_BIG_ENDIAN
5941 {
5942 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 96}, /* x = r */
5943 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 64}, /* y = g */
5944 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* z = b */
5945 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0} /* w = a */
5946 },
5947 #else
5948 {
5949 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 0}, /* x = r */
5950 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 32}, /* y = g */
5951 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 64}, /* z = b */
5952 {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32, 96} /* w = a */
5953 },
5954 #endif
5955 #ifdef PIPE_ARCH_BIG_ENDIAN
5956 {
5957 UTIL_FORMAT_SWIZZLE_X, /* r */
5958 UTIL_FORMAT_SWIZZLE_Y, /* g */
5959 UTIL_FORMAT_SWIZZLE_Z, /* b */
5960 UTIL_FORMAT_SWIZZLE_W /* a */
5961 },
5962 #else
5963 {
5964 UTIL_FORMAT_SWIZZLE_X, /* r */
5965 UTIL_FORMAT_SWIZZLE_Y, /* g */
5966 UTIL_FORMAT_SWIZZLE_Z, /* b */
5967 UTIL_FORMAT_SWIZZLE_W /* a */
5968 },
5969 #endif
5970 UTIL_FORMAT_COLORSPACE_RGB,
5971 };
5972
5973 const struct util_format_description
5974 util_format_r10g10b10x2_uscaled_description = {
5975 PIPE_FORMAT_R10G10B10X2_USCALED,
5976 "PIPE_FORMAT_R10G10B10X2_USCALED",
5977 "r10g10b10x2_uscaled",
5978 {1, 1, 32}, /* block */
5979 UTIL_FORMAT_LAYOUT_PLAIN,
5980 4, /* nr_channels */
5981 FALSE, /* is_array */
5982 TRUE, /* is_bitmask */
5983 FALSE, /* is_mixed */
5984 #ifdef PIPE_ARCH_BIG_ENDIAN
5985 {
5986 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30}, /* x = x */
5987 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* y = b */
5988 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* z = g */
5989 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0} /* w = r */
5990 },
5991 #else
5992 {
5993 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0}, /* x = r */
5994 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* y = g */
5995 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* z = b */
5996 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30} /* w = x */
5997 },
5998 #endif
5999 #ifdef PIPE_ARCH_BIG_ENDIAN
6000 {
6001 UTIL_FORMAT_SWIZZLE_W, /* r */
6002 UTIL_FORMAT_SWIZZLE_Z, /* g */
6003 UTIL_FORMAT_SWIZZLE_Y, /* b */
6004 UTIL_FORMAT_SWIZZLE_1 /* a */
6005 },
6006 #else
6007 {
6008 UTIL_FORMAT_SWIZZLE_X, /* r */
6009 UTIL_FORMAT_SWIZZLE_Y, /* g */
6010 UTIL_FORMAT_SWIZZLE_Z, /* b */
6011 UTIL_FORMAT_SWIZZLE_1 /* a */
6012 },
6013 #endif
6014 UTIL_FORMAT_COLORSPACE_RGB,
6015 };
6016
6017 const struct util_format_description
6018 util_format_r10g10b10x2_snorm_description = {
6019 PIPE_FORMAT_R10G10B10X2_SNORM,
6020 "PIPE_FORMAT_R10G10B10X2_SNORM",
6021 "r10g10b10x2_snorm",
6022 {1, 1, 32}, /* block */
6023 UTIL_FORMAT_LAYOUT_PLAIN,
6024 4, /* nr_channels */
6025 FALSE, /* is_array */
6026 TRUE, /* is_bitmask */
6027 FALSE, /* is_mixed */
6028 #ifdef PIPE_ARCH_BIG_ENDIAN
6029 {
6030 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30}, /* x = x */
6031 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* y = b */
6032 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* z = g */
6033 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0} /* w = r */
6034 },
6035 #else
6036 {
6037 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = r */
6038 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
6039 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = b */
6040 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30} /* w = x */
6041 },
6042 #endif
6043 #ifdef PIPE_ARCH_BIG_ENDIAN
6044 {
6045 UTIL_FORMAT_SWIZZLE_W, /* r */
6046 UTIL_FORMAT_SWIZZLE_Z, /* g */
6047 UTIL_FORMAT_SWIZZLE_Y, /* b */
6048 UTIL_FORMAT_SWIZZLE_1 /* a */
6049 },
6050 #else
6051 {
6052 UTIL_FORMAT_SWIZZLE_X, /* r */
6053 UTIL_FORMAT_SWIZZLE_Y, /* g */
6054 UTIL_FORMAT_SWIZZLE_Z, /* b */
6055 UTIL_FORMAT_SWIZZLE_1 /* a */
6056 },
6057 #endif
6058 UTIL_FORMAT_COLORSPACE_RGB,
6059 };
6060
6061 const struct util_format_description
6062 util_format_yv12_description = {
6063 PIPE_FORMAT_YV12,
6064 "PIPE_FORMAT_YV12",
6065 "yv12",
6066 {1, 1, 32}, /* block */
6067 UTIL_FORMAT_LAYOUT_OTHER,
6068 4, /* nr_channels */
6069 FALSE, /* is_array */
6070 FALSE, /* is_bitmask */
6071 FALSE, /* is_mixed */
6072 #ifdef PIPE_ARCH_BIG_ENDIAN
6073 {
6074 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
6075 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* y = y */
6076 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* z = z */
6077 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = w */
6078 },
6079 #else
6080 {
6081 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
6082 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
6083 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
6084 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
6085 },
6086 #endif
6087 #ifdef PIPE_ARCH_BIG_ENDIAN
6088 {
6089 UTIL_FORMAT_SWIZZLE_X, /* y */
6090 UTIL_FORMAT_SWIZZLE_Y, /* u */
6091 UTIL_FORMAT_SWIZZLE_Z, /* v */
6092 UTIL_FORMAT_SWIZZLE_W /* ignored */
6093 },
6094 #else
6095 {
6096 UTIL_FORMAT_SWIZZLE_X, /* y */
6097 UTIL_FORMAT_SWIZZLE_Y, /* u */
6098 UTIL_FORMAT_SWIZZLE_Z, /* v */
6099 UTIL_FORMAT_SWIZZLE_W /* ignored */
6100 },
6101 #endif
6102 UTIL_FORMAT_COLORSPACE_YUV,
6103 };
6104
6105 const struct util_format_description
6106 util_format_yv16_description = {
6107 PIPE_FORMAT_YV16,
6108 "PIPE_FORMAT_YV16",
6109 "yv16",
6110 {1, 1, 32}, /* block */
6111 UTIL_FORMAT_LAYOUT_OTHER,
6112 4, /* nr_channels */
6113 FALSE, /* is_array */
6114 FALSE, /* is_bitmask */
6115 FALSE, /* is_mixed */
6116 #ifdef PIPE_ARCH_BIG_ENDIAN
6117 {
6118 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
6119 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* y = y */
6120 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* z = z */
6121 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = w */
6122 },
6123 #else
6124 {
6125 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
6126 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
6127 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
6128 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
6129 },
6130 #endif
6131 #ifdef PIPE_ARCH_BIG_ENDIAN
6132 {
6133 UTIL_FORMAT_SWIZZLE_X, /* y */
6134 UTIL_FORMAT_SWIZZLE_Y, /* u */
6135 UTIL_FORMAT_SWIZZLE_Z, /* v */
6136 UTIL_FORMAT_SWIZZLE_W /* ignored */
6137 },
6138 #else
6139 {
6140 UTIL_FORMAT_SWIZZLE_X, /* y */
6141 UTIL_FORMAT_SWIZZLE_Y, /* u */
6142 UTIL_FORMAT_SWIZZLE_Z, /* v */
6143 UTIL_FORMAT_SWIZZLE_W /* ignored */
6144 },
6145 #endif
6146 UTIL_FORMAT_COLORSPACE_YUV,
6147 };
6148
6149 const struct util_format_description
6150 util_format_iyuv_description = {
6151 PIPE_FORMAT_IYUV,
6152 "PIPE_FORMAT_IYUV",
6153 "iyuv",
6154 {1, 1, 32}, /* block */
6155 UTIL_FORMAT_LAYOUT_OTHER,
6156 4, /* nr_channels */
6157 FALSE, /* is_array */
6158 FALSE, /* is_bitmask */
6159 FALSE, /* is_mixed */
6160 #ifdef PIPE_ARCH_BIG_ENDIAN
6161 {
6162 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
6163 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* y = y */
6164 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* z = z */
6165 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = w */
6166 },
6167 #else
6168 {
6169 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
6170 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
6171 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
6172 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
6173 },
6174 #endif
6175 #ifdef PIPE_ARCH_BIG_ENDIAN
6176 {
6177 UTIL_FORMAT_SWIZZLE_X, /* y */
6178 UTIL_FORMAT_SWIZZLE_Y, /* u */
6179 UTIL_FORMAT_SWIZZLE_Z, /* v */
6180 UTIL_FORMAT_SWIZZLE_W /* ignored */
6181 },
6182 #else
6183 {
6184 UTIL_FORMAT_SWIZZLE_X, /* y */
6185 UTIL_FORMAT_SWIZZLE_Y, /* u */
6186 UTIL_FORMAT_SWIZZLE_Z, /* v */
6187 UTIL_FORMAT_SWIZZLE_W /* ignored */
6188 },
6189 #endif
6190 UTIL_FORMAT_COLORSPACE_YUV,
6191 };
6192
6193 const struct util_format_description
6194 util_format_nv12_description = {
6195 PIPE_FORMAT_NV12,
6196 "PIPE_FORMAT_NV12",
6197 "nv12",
6198 {1, 1, 32}, /* block */
6199 UTIL_FORMAT_LAYOUT_OTHER,
6200 4, /* nr_channels */
6201 FALSE, /* is_array */
6202 FALSE, /* is_bitmask */
6203 FALSE, /* is_mixed */
6204 #ifdef PIPE_ARCH_BIG_ENDIAN
6205 {
6206 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
6207 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* y = y */
6208 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* z = z */
6209 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = w */
6210 },
6211 #else
6212 {
6213 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
6214 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
6215 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
6216 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
6217 },
6218 #endif
6219 #ifdef PIPE_ARCH_BIG_ENDIAN
6220 {
6221 UTIL_FORMAT_SWIZZLE_X, /* y */
6222 UTIL_FORMAT_SWIZZLE_Y, /* u */
6223 UTIL_FORMAT_SWIZZLE_Z, /* v */
6224 UTIL_FORMAT_SWIZZLE_W /* ignored */
6225 },
6226 #else
6227 {
6228 UTIL_FORMAT_SWIZZLE_X, /* y */
6229 UTIL_FORMAT_SWIZZLE_Y, /* u */
6230 UTIL_FORMAT_SWIZZLE_Z, /* v */
6231 UTIL_FORMAT_SWIZZLE_W /* ignored */
6232 },
6233 #endif
6234 UTIL_FORMAT_COLORSPACE_YUV,
6235 };
6236
6237 const struct util_format_description
6238 util_format_nv21_description = {
6239 PIPE_FORMAT_NV21,
6240 "PIPE_FORMAT_NV21",
6241 "nv21",
6242 {1, 1, 32}, /* block */
6243 UTIL_FORMAT_LAYOUT_OTHER,
6244 4, /* nr_channels */
6245 FALSE, /* is_array */
6246 FALSE, /* is_bitmask */
6247 FALSE, /* is_mixed */
6248 #ifdef PIPE_ARCH_BIG_ENDIAN
6249 {
6250 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
6251 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* y = y */
6252 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* z = z */
6253 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = w */
6254 },
6255 #else
6256 {
6257 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
6258 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 8}, /* y = y */
6259 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 16}, /* z = z */
6260 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = w */
6261 },
6262 #endif
6263 #ifdef PIPE_ARCH_BIG_ENDIAN
6264 {
6265 UTIL_FORMAT_SWIZZLE_X, /* y */
6266 UTIL_FORMAT_SWIZZLE_Y, /* u */
6267 UTIL_FORMAT_SWIZZLE_Z, /* v */
6268 UTIL_FORMAT_SWIZZLE_W /* ignored */
6269 },
6270 #else
6271 {
6272 UTIL_FORMAT_SWIZZLE_X, /* y */
6273 UTIL_FORMAT_SWIZZLE_Y, /* u */
6274 UTIL_FORMAT_SWIZZLE_Z, /* v */
6275 UTIL_FORMAT_SWIZZLE_W /* ignored */
6276 },
6277 #endif
6278 UTIL_FORMAT_COLORSPACE_YUV,
6279 };
6280
6281 const struct util_format_description
6282 util_format_a4r4_unorm_description = {
6283 PIPE_FORMAT_A4R4_UNORM,
6284 "PIPE_FORMAT_A4R4_UNORM",
6285 "a4r4_unorm",
6286 {1, 1, 8}, /* block */
6287 UTIL_FORMAT_LAYOUT_PLAIN,
6288 2, /* nr_channels */
6289 FALSE, /* is_array */
6290 TRUE, /* is_bitmask */
6291 FALSE, /* is_mixed */
6292 #ifdef PIPE_ARCH_BIG_ENDIAN
6293 {
6294 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* x = r */
6295 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* y = a */
6296 {0, 0, 0, 0, 0},
6297 {0, 0, 0, 0, 0}
6298 },
6299 #else
6300 {
6301 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = a */
6302 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = r */
6303 {0, 0, 0, 0, 0},
6304 {0, 0, 0, 0, 0}
6305 },
6306 #endif
6307 #ifdef PIPE_ARCH_BIG_ENDIAN
6308 {
6309 UTIL_FORMAT_SWIZZLE_X, /* r */
6310 UTIL_FORMAT_SWIZZLE_0, /* g */
6311 UTIL_FORMAT_SWIZZLE_0, /* b */
6312 UTIL_FORMAT_SWIZZLE_Y /* a */
6313 },
6314 #else
6315 {
6316 UTIL_FORMAT_SWIZZLE_Y, /* r */
6317 UTIL_FORMAT_SWIZZLE_0, /* g */
6318 UTIL_FORMAT_SWIZZLE_0, /* b */
6319 UTIL_FORMAT_SWIZZLE_X /* a */
6320 },
6321 #endif
6322 UTIL_FORMAT_COLORSPACE_RGB,
6323 };
6324
6325 const struct util_format_description
6326 util_format_r4a4_unorm_description = {
6327 PIPE_FORMAT_R4A4_UNORM,
6328 "PIPE_FORMAT_R4A4_UNORM",
6329 "r4a4_unorm",
6330 {1, 1, 8}, /* block */
6331 UTIL_FORMAT_LAYOUT_PLAIN,
6332 2, /* nr_channels */
6333 FALSE, /* is_array */
6334 TRUE, /* is_bitmask */
6335 FALSE, /* is_mixed */
6336 #ifdef PIPE_ARCH_BIG_ENDIAN
6337 {
6338 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* x = a */
6339 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* y = r */
6340 {0, 0, 0, 0, 0},
6341 {0, 0, 0, 0, 0}
6342 },
6343 #else
6344 {
6345 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 0}, /* x = r */
6346 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4, 4}, /* y = a */
6347 {0, 0, 0, 0, 0},
6348 {0, 0, 0, 0, 0}
6349 },
6350 #endif
6351 #ifdef PIPE_ARCH_BIG_ENDIAN
6352 {
6353 UTIL_FORMAT_SWIZZLE_Y, /* r */
6354 UTIL_FORMAT_SWIZZLE_0, /* g */
6355 UTIL_FORMAT_SWIZZLE_0, /* b */
6356 UTIL_FORMAT_SWIZZLE_X /* a */
6357 },
6358 #else
6359 {
6360 UTIL_FORMAT_SWIZZLE_X, /* r */
6361 UTIL_FORMAT_SWIZZLE_0, /* g */
6362 UTIL_FORMAT_SWIZZLE_0, /* b */
6363 UTIL_FORMAT_SWIZZLE_Y /* a */
6364 },
6365 #endif
6366 UTIL_FORMAT_COLORSPACE_RGB,
6367 };
6368
6369 const struct util_format_description
6370 util_format_r8a8_unorm_description = {
6371 PIPE_FORMAT_R8A8_UNORM,
6372 "PIPE_FORMAT_R8A8_UNORM",
6373 "r8a8_unorm",
6374 {1, 1, 16}, /* block */
6375 UTIL_FORMAT_LAYOUT_PLAIN,
6376 2, /* nr_channels */
6377 TRUE, /* is_array */
6378 TRUE, /* is_bitmask */
6379 FALSE, /* is_mixed */
6380 #ifdef PIPE_ARCH_BIG_ENDIAN
6381 {
6382 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = r */
6383 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = a */
6384 {0, 0, 0, 0, 0},
6385 {0, 0, 0, 0, 0}
6386 },
6387 #else
6388 {
6389 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
6390 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = a */
6391 {0, 0, 0, 0, 0},
6392 {0, 0, 0, 0, 0}
6393 },
6394 #endif
6395 #ifdef PIPE_ARCH_BIG_ENDIAN
6396 {
6397 UTIL_FORMAT_SWIZZLE_X, /* r */
6398 UTIL_FORMAT_SWIZZLE_0, /* g */
6399 UTIL_FORMAT_SWIZZLE_0, /* b */
6400 UTIL_FORMAT_SWIZZLE_Y /* a */
6401 },
6402 #else
6403 {
6404 UTIL_FORMAT_SWIZZLE_X, /* r */
6405 UTIL_FORMAT_SWIZZLE_0, /* g */
6406 UTIL_FORMAT_SWIZZLE_0, /* b */
6407 UTIL_FORMAT_SWIZZLE_Y /* a */
6408 },
6409 #endif
6410 UTIL_FORMAT_COLORSPACE_RGB,
6411 };
6412
6413 const struct util_format_description
6414 util_format_a8r8_unorm_description = {
6415 PIPE_FORMAT_A8R8_UNORM,
6416 "PIPE_FORMAT_A8R8_UNORM",
6417 "a8r8_unorm",
6418 {1, 1, 16}, /* block */
6419 UTIL_FORMAT_LAYOUT_PLAIN,
6420 2, /* nr_channels */
6421 TRUE, /* is_array */
6422 TRUE, /* is_bitmask */
6423 FALSE, /* is_mixed */
6424 #ifdef PIPE_ARCH_BIG_ENDIAN
6425 {
6426 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = a */
6427 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = r */
6428 {0, 0, 0, 0, 0},
6429 {0, 0, 0, 0, 0}
6430 },
6431 #else
6432 {
6433 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
6434 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
6435 {0, 0, 0, 0, 0},
6436 {0, 0, 0, 0, 0}
6437 },
6438 #endif
6439 #ifdef PIPE_ARCH_BIG_ENDIAN
6440 {
6441 UTIL_FORMAT_SWIZZLE_Y, /* r */
6442 UTIL_FORMAT_SWIZZLE_0, /* g */
6443 UTIL_FORMAT_SWIZZLE_0, /* b */
6444 UTIL_FORMAT_SWIZZLE_X /* a */
6445 },
6446 #else
6447 {
6448 UTIL_FORMAT_SWIZZLE_Y, /* r */
6449 UTIL_FORMAT_SWIZZLE_0, /* g */
6450 UTIL_FORMAT_SWIZZLE_0, /* b */
6451 UTIL_FORMAT_SWIZZLE_X /* a */
6452 },
6453 #endif
6454 UTIL_FORMAT_COLORSPACE_RGB,
6455 };
6456
6457 const struct util_format_description
6458 util_format_r10g10b10a2_uscaled_description = {
6459 PIPE_FORMAT_R10G10B10A2_USCALED,
6460 "PIPE_FORMAT_R10G10B10A2_USCALED",
6461 "r10g10b10a2_uscaled",
6462 {1, 1, 32}, /* block */
6463 UTIL_FORMAT_LAYOUT_PLAIN,
6464 4, /* nr_channels */
6465 FALSE, /* is_array */
6466 TRUE, /* is_bitmask */
6467 FALSE, /* is_mixed */
6468 #ifdef PIPE_ARCH_BIG_ENDIAN
6469 {
6470 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2, 30}, /* x = a */
6471 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* y = b */
6472 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* z = g */
6473 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0} /* w = r */
6474 },
6475 #else
6476 {
6477 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0}, /* x = r */
6478 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* y = g */
6479 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* z = b */
6480 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2, 30} /* w = a */
6481 },
6482 #endif
6483 #ifdef PIPE_ARCH_BIG_ENDIAN
6484 {
6485 UTIL_FORMAT_SWIZZLE_W, /* r */
6486 UTIL_FORMAT_SWIZZLE_Z, /* g */
6487 UTIL_FORMAT_SWIZZLE_Y, /* b */
6488 UTIL_FORMAT_SWIZZLE_X /* a */
6489 },
6490 #else
6491 {
6492 UTIL_FORMAT_SWIZZLE_X, /* r */
6493 UTIL_FORMAT_SWIZZLE_Y, /* g */
6494 UTIL_FORMAT_SWIZZLE_Z, /* b */
6495 UTIL_FORMAT_SWIZZLE_W /* a */
6496 },
6497 #endif
6498 UTIL_FORMAT_COLORSPACE_RGB,
6499 };
6500
6501 const struct util_format_description
6502 util_format_r10g10b10a2_sscaled_description = {
6503 PIPE_FORMAT_R10G10B10A2_SSCALED,
6504 "PIPE_FORMAT_R10G10B10A2_SSCALED",
6505 "r10g10b10a2_sscaled",
6506 {1, 1, 32}, /* block */
6507 UTIL_FORMAT_LAYOUT_PLAIN,
6508 4, /* nr_channels */
6509 FALSE, /* is_array */
6510 TRUE, /* is_bitmask */
6511 FALSE, /* is_mixed */
6512 #ifdef PIPE_ARCH_BIG_ENDIAN
6513 {
6514 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2, 30}, /* x = a */
6515 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 20}, /* y = b */
6516 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 10}, /* z = g */
6517 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 0} /* w = r */
6518 },
6519 #else
6520 {
6521 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 0}, /* x = r */
6522 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 10}, /* y = g */
6523 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 20}, /* z = b */
6524 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2, 30} /* w = a */
6525 },
6526 #endif
6527 #ifdef PIPE_ARCH_BIG_ENDIAN
6528 {
6529 UTIL_FORMAT_SWIZZLE_W, /* r */
6530 UTIL_FORMAT_SWIZZLE_Z, /* g */
6531 UTIL_FORMAT_SWIZZLE_Y, /* b */
6532 UTIL_FORMAT_SWIZZLE_X /* a */
6533 },
6534 #else
6535 {
6536 UTIL_FORMAT_SWIZZLE_X, /* r */
6537 UTIL_FORMAT_SWIZZLE_Y, /* g */
6538 UTIL_FORMAT_SWIZZLE_Z, /* b */
6539 UTIL_FORMAT_SWIZZLE_W /* a */
6540 },
6541 #endif
6542 UTIL_FORMAT_COLORSPACE_RGB,
6543 };
6544
6545 const struct util_format_description
6546 util_format_r10g10b10a2_snorm_description = {
6547 PIPE_FORMAT_R10G10B10A2_SNORM,
6548 "PIPE_FORMAT_R10G10B10A2_SNORM",
6549 "r10g10b10a2_snorm",
6550 {1, 1, 32}, /* block */
6551 UTIL_FORMAT_LAYOUT_PLAIN,
6552 4, /* nr_channels */
6553 FALSE, /* is_array */
6554 TRUE, /* is_bitmask */
6555 FALSE, /* is_mixed */
6556 #ifdef PIPE_ARCH_BIG_ENDIAN
6557 {
6558 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2, 30}, /* x = a */
6559 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* y = b */
6560 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* z = g */
6561 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0} /* w = r */
6562 },
6563 #else
6564 {
6565 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = r */
6566 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
6567 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = b */
6568 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2, 30} /* w = a */
6569 },
6570 #endif
6571 #ifdef PIPE_ARCH_BIG_ENDIAN
6572 {
6573 UTIL_FORMAT_SWIZZLE_W, /* r */
6574 UTIL_FORMAT_SWIZZLE_Z, /* g */
6575 UTIL_FORMAT_SWIZZLE_Y, /* b */
6576 UTIL_FORMAT_SWIZZLE_X /* a */
6577 },
6578 #else
6579 {
6580 UTIL_FORMAT_SWIZZLE_X, /* r */
6581 UTIL_FORMAT_SWIZZLE_Y, /* g */
6582 UTIL_FORMAT_SWIZZLE_Z, /* b */
6583 UTIL_FORMAT_SWIZZLE_W /* a */
6584 },
6585 #endif
6586 UTIL_FORMAT_COLORSPACE_RGB,
6587 };
6588
6589 const struct util_format_description
6590 util_format_b10g10r10a2_uscaled_description = {
6591 PIPE_FORMAT_B10G10R10A2_USCALED,
6592 "PIPE_FORMAT_B10G10R10A2_USCALED",
6593 "b10g10r10a2_uscaled",
6594 {1, 1, 32}, /* block */
6595 UTIL_FORMAT_LAYOUT_PLAIN,
6596 4, /* nr_channels */
6597 FALSE, /* is_array */
6598 TRUE, /* is_bitmask */
6599 FALSE, /* is_mixed */
6600 #ifdef PIPE_ARCH_BIG_ENDIAN
6601 {
6602 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2, 30}, /* x = a */
6603 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* y = r */
6604 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* z = g */
6605 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0} /* w = b */
6606 },
6607 #else
6608 {
6609 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 0}, /* x = b */
6610 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 10}, /* y = g */
6611 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10, 20}, /* z = r */
6612 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2, 30} /* w = a */
6613 },
6614 #endif
6615 #ifdef PIPE_ARCH_BIG_ENDIAN
6616 {
6617 UTIL_FORMAT_SWIZZLE_Y, /* r */
6618 UTIL_FORMAT_SWIZZLE_Z, /* g */
6619 UTIL_FORMAT_SWIZZLE_W, /* b */
6620 UTIL_FORMAT_SWIZZLE_X /* a */
6621 },
6622 #else
6623 {
6624 UTIL_FORMAT_SWIZZLE_Z, /* r */
6625 UTIL_FORMAT_SWIZZLE_Y, /* g */
6626 UTIL_FORMAT_SWIZZLE_X, /* b */
6627 UTIL_FORMAT_SWIZZLE_W /* a */
6628 },
6629 #endif
6630 UTIL_FORMAT_COLORSPACE_RGB,
6631 };
6632
6633 const struct util_format_description
6634 util_format_b10g10r10a2_sscaled_description = {
6635 PIPE_FORMAT_B10G10R10A2_SSCALED,
6636 "PIPE_FORMAT_B10G10R10A2_SSCALED",
6637 "b10g10r10a2_sscaled",
6638 {1, 1, 32}, /* block */
6639 UTIL_FORMAT_LAYOUT_PLAIN,
6640 4, /* nr_channels */
6641 FALSE, /* is_array */
6642 TRUE, /* is_bitmask */
6643 FALSE, /* is_mixed */
6644 #ifdef PIPE_ARCH_BIG_ENDIAN
6645 {
6646 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2, 30}, /* x = a */
6647 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 20}, /* y = r */
6648 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 10}, /* z = g */
6649 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 0} /* w = b */
6650 },
6651 #else
6652 {
6653 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 0}, /* x = b */
6654 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 10}, /* y = g */
6655 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10, 20}, /* z = r */
6656 {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2, 30} /* w = a */
6657 },
6658 #endif
6659 #ifdef PIPE_ARCH_BIG_ENDIAN
6660 {
6661 UTIL_FORMAT_SWIZZLE_Y, /* r */
6662 UTIL_FORMAT_SWIZZLE_Z, /* g */
6663 UTIL_FORMAT_SWIZZLE_W, /* b */
6664 UTIL_FORMAT_SWIZZLE_X /* a */
6665 },
6666 #else
6667 {
6668 UTIL_FORMAT_SWIZZLE_Z, /* r */
6669 UTIL_FORMAT_SWIZZLE_Y, /* g */
6670 UTIL_FORMAT_SWIZZLE_X, /* b */
6671 UTIL_FORMAT_SWIZZLE_W /* a */
6672 },
6673 #endif
6674 UTIL_FORMAT_COLORSPACE_RGB,
6675 };
6676
6677 const struct util_format_description
6678 util_format_b10g10r10a2_snorm_description = {
6679 PIPE_FORMAT_B10G10R10A2_SNORM,
6680 "PIPE_FORMAT_B10G10R10A2_SNORM",
6681 "b10g10r10a2_snorm",
6682 {1, 1, 32}, /* block */
6683 UTIL_FORMAT_LAYOUT_PLAIN,
6684 4, /* nr_channels */
6685 FALSE, /* is_array */
6686 TRUE, /* is_bitmask */
6687 FALSE, /* is_mixed */
6688 #ifdef PIPE_ARCH_BIG_ENDIAN
6689 {
6690 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2, 30}, /* x = a */
6691 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* y = r */
6692 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* z = g */
6693 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0} /* w = b */
6694 },
6695 #else
6696 {
6697 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 0}, /* x = b */
6698 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 10}, /* y = g */
6699 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10, 20}, /* z = r */
6700 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2, 30} /* w = a */
6701 },
6702 #endif
6703 #ifdef PIPE_ARCH_BIG_ENDIAN
6704 {
6705 UTIL_FORMAT_SWIZZLE_Y, /* r */
6706 UTIL_FORMAT_SWIZZLE_Z, /* g */
6707 UTIL_FORMAT_SWIZZLE_W, /* b */
6708 UTIL_FORMAT_SWIZZLE_X /* a */
6709 },
6710 #else
6711 {
6712 UTIL_FORMAT_SWIZZLE_Z, /* r */
6713 UTIL_FORMAT_SWIZZLE_Y, /* g */
6714 UTIL_FORMAT_SWIZZLE_X, /* b */
6715 UTIL_FORMAT_SWIZZLE_W /* a */
6716 },
6717 #endif
6718 UTIL_FORMAT_COLORSPACE_RGB,
6719 };
6720
6721 const struct util_format_description
6722 util_format_r8_uint_description = {
6723 PIPE_FORMAT_R8_UINT,
6724 "PIPE_FORMAT_R8_UINT",
6725 "r8_uint",
6726 {1, 1, 8}, /* block */
6727 UTIL_FORMAT_LAYOUT_PLAIN,
6728 1, /* nr_channels */
6729 TRUE, /* is_array */
6730 TRUE, /* is_bitmask */
6731 FALSE, /* is_mixed */
6732 {
6733 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
6734 {0, 0, 0, 0, 0},
6735 {0, 0, 0, 0, 0},
6736 {0, 0, 0, 0, 0}
6737 },
6738 {
6739 UTIL_FORMAT_SWIZZLE_X, /* r */
6740 UTIL_FORMAT_SWIZZLE_0, /* g */
6741 UTIL_FORMAT_SWIZZLE_0, /* b */
6742 UTIL_FORMAT_SWIZZLE_1 /* a */
6743 },
6744 UTIL_FORMAT_COLORSPACE_RGB,
6745 };
6746
6747 const struct util_format_description
6748 util_format_r8g8_uint_description = {
6749 PIPE_FORMAT_R8G8_UINT,
6750 "PIPE_FORMAT_R8G8_UINT",
6751 "r8g8_uint",
6752 {1, 1, 16}, /* block */
6753 UTIL_FORMAT_LAYOUT_PLAIN,
6754 2, /* nr_channels */
6755 TRUE, /* is_array */
6756 TRUE, /* is_bitmask */
6757 FALSE, /* is_mixed */
6758 #ifdef PIPE_ARCH_BIG_ENDIAN
6759 {
6760 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* x = r */
6761 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* y = g */
6762 {0, 0, 0, 0, 0},
6763 {0, 0, 0, 0, 0}
6764 },
6765 #else
6766 {
6767 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
6768 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
6769 {0, 0, 0, 0, 0},
6770 {0, 0, 0, 0, 0}
6771 },
6772 #endif
6773 #ifdef PIPE_ARCH_BIG_ENDIAN
6774 {
6775 UTIL_FORMAT_SWIZZLE_X, /* r */
6776 UTIL_FORMAT_SWIZZLE_Y, /* g */
6777 UTIL_FORMAT_SWIZZLE_0, /* b */
6778 UTIL_FORMAT_SWIZZLE_1 /* a */
6779 },
6780 #else
6781 {
6782 UTIL_FORMAT_SWIZZLE_X, /* r */
6783 UTIL_FORMAT_SWIZZLE_Y, /* g */
6784 UTIL_FORMAT_SWIZZLE_0, /* b */
6785 UTIL_FORMAT_SWIZZLE_1 /* a */
6786 },
6787 #endif
6788 UTIL_FORMAT_COLORSPACE_RGB,
6789 };
6790
6791 const struct util_format_description
6792 util_format_r8g8b8_uint_description = {
6793 PIPE_FORMAT_R8G8B8_UINT,
6794 "PIPE_FORMAT_R8G8B8_UINT",
6795 "r8g8b8_uint",
6796 {1, 1, 24}, /* block */
6797 UTIL_FORMAT_LAYOUT_PLAIN,
6798 3, /* nr_channels */
6799 TRUE, /* is_array */
6800 FALSE, /* is_bitmask */
6801 FALSE, /* is_mixed */
6802 #ifdef PIPE_ARCH_BIG_ENDIAN
6803 {
6804 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* x = r */
6805 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
6806 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* z = b */
6807 {0, 0, 0, 0, 0}
6808 },
6809 #else
6810 {
6811 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
6812 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
6813 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* z = b */
6814 {0, 0, 0, 0, 0}
6815 },
6816 #endif
6817 #ifdef PIPE_ARCH_BIG_ENDIAN
6818 {
6819 UTIL_FORMAT_SWIZZLE_X, /* r */
6820 UTIL_FORMAT_SWIZZLE_Y, /* g */
6821 UTIL_FORMAT_SWIZZLE_Z, /* b */
6822 UTIL_FORMAT_SWIZZLE_1 /* a */
6823 },
6824 #else
6825 {
6826 UTIL_FORMAT_SWIZZLE_X, /* r */
6827 UTIL_FORMAT_SWIZZLE_Y, /* g */
6828 UTIL_FORMAT_SWIZZLE_Z, /* b */
6829 UTIL_FORMAT_SWIZZLE_1 /* a */
6830 },
6831 #endif
6832 UTIL_FORMAT_COLORSPACE_RGB,
6833 };
6834
6835 const struct util_format_description
6836 util_format_r8g8b8a8_uint_description = {
6837 PIPE_FORMAT_R8G8B8A8_UINT,
6838 "PIPE_FORMAT_R8G8B8A8_UINT",
6839 "r8g8b8a8_uint",
6840 {1, 1, 32}, /* block */
6841 UTIL_FORMAT_LAYOUT_PLAIN,
6842 4, /* nr_channels */
6843 TRUE, /* is_array */
6844 TRUE, /* is_bitmask */
6845 FALSE, /* is_mixed */
6846 #ifdef PIPE_ARCH_BIG_ENDIAN
6847 {
6848 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* x = r */
6849 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* y = g */
6850 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* z = b */
6851 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0} /* w = a */
6852 },
6853 #else
6854 {
6855 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
6856 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
6857 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* z = b */
6858 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24} /* w = a */
6859 },
6860 #endif
6861 #ifdef PIPE_ARCH_BIG_ENDIAN
6862 {
6863 UTIL_FORMAT_SWIZZLE_X, /* r */
6864 UTIL_FORMAT_SWIZZLE_Y, /* g */
6865 UTIL_FORMAT_SWIZZLE_Z, /* b */
6866 UTIL_FORMAT_SWIZZLE_W /* a */
6867 },
6868 #else
6869 {
6870 UTIL_FORMAT_SWIZZLE_X, /* r */
6871 UTIL_FORMAT_SWIZZLE_Y, /* g */
6872 UTIL_FORMAT_SWIZZLE_Z, /* b */
6873 UTIL_FORMAT_SWIZZLE_W /* a */
6874 },
6875 #endif
6876 UTIL_FORMAT_COLORSPACE_RGB,
6877 };
6878
6879 const struct util_format_description
6880 util_format_r8_sint_description = {
6881 PIPE_FORMAT_R8_SINT,
6882 "PIPE_FORMAT_R8_SINT",
6883 "r8_sint",
6884 {1, 1, 8}, /* block */
6885 UTIL_FORMAT_LAYOUT_PLAIN,
6886 1, /* nr_channels */
6887 TRUE, /* is_array */
6888 TRUE, /* is_bitmask */
6889 FALSE, /* is_mixed */
6890 {
6891 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
6892 {0, 0, 0, 0, 0},
6893 {0, 0, 0, 0, 0},
6894 {0, 0, 0, 0, 0}
6895 },
6896 {
6897 UTIL_FORMAT_SWIZZLE_X, /* r */
6898 UTIL_FORMAT_SWIZZLE_0, /* g */
6899 UTIL_FORMAT_SWIZZLE_0, /* b */
6900 UTIL_FORMAT_SWIZZLE_1 /* a */
6901 },
6902 UTIL_FORMAT_COLORSPACE_RGB,
6903 };
6904
6905 const struct util_format_description
6906 util_format_r8g8_sint_description = {
6907 PIPE_FORMAT_R8G8_SINT,
6908 "PIPE_FORMAT_R8G8_SINT",
6909 "r8g8_sint",
6910 {1, 1, 16}, /* block */
6911 UTIL_FORMAT_LAYOUT_PLAIN,
6912 2, /* nr_channels */
6913 TRUE, /* is_array */
6914 TRUE, /* is_bitmask */
6915 FALSE, /* is_mixed */
6916 #ifdef PIPE_ARCH_BIG_ENDIAN
6917 {
6918 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* x = r */
6919 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* y = g */
6920 {0, 0, 0, 0, 0},
6921 {0, 0, 0, 0, 0}
6922 },
6923 #else
6924 {
6925 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
6926 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
6927 {0, 0, 0, 0, 0},
6928 {0, 0, 0, 0, 0}
6929 },
6930 #endif
6931 #ifdef PIPE_ARCH_BIG_ENDIAN
6932 {
6933 UTIL_FORMAT_SWIZZLE_X, /* r */
6934 UTIL_FORMAT_SWIZZLE_Y, /* g */
6935 UTIL_FORMAT_SWIZZLE_0, /* b */
6936 UTIL_FORMAT_SWIZZLE_1 /* a */
6937 },
6938 #else
6939 {
6940 UTIL_FORMAT_SWIZZLE_X, /* r */
6941 UTIL_FORMAT_SWIZZLE_Y, /* g */
6942 UTIL_FORMAT_SWIZZLE_0, /* b */
6943 UTIL_FORMAT_SWIZZLE_1 /* a */
6944 },
6945 #endif
6946 UTIL_FORMAT_COLORSPACE_RGB,
6947 };
6948
6949 const struct util_format_description
6950 util_format_r8g8b8_sint_description = {
6951 PIPE_FORMAT_R8G8B8_SINT,
6952 "PIPE_FORMAT_R8G8B8_SINT",
6953 "r8g8b8_sint",
6954 {1, 1, 24}, /* block */
6955 UTIL_FORMAT_LAYOUT_PLAIN,
6956 3, /* nr_channels */
6957 TRUE, /* is_array */
6958 FALSE, /* is_bitmask */
6959 FALSE, /* is_mixed */
6960 #ifdef PIPE_ARCH_BIG_ENDIAN
6961 {
6962 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* x = r */
6963 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
6964 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* z = b */
6965 {0, 0, 0, 0, 0}
6966 },
6967 #else
6968 {
6969 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
6970 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
6971 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* z = b */
6972 {0, 0, 0, 0, 0}
6973 },
6974 #endif
6975 #ifdef PIPE_ARCH_BIG_ENDIAN
6976 {
6977 UTIL_FORMAT_SWIZZLE_X, /* r */
6978 UTIL_FORMAT_SWIZZLE_Y, /* g */
6979 UTIL_FORMAT_SWIZZLE_Z, /* b */
6980 UTIL_FORMAT_SWIZZLE_1 /* a */
6981 },
6982 #else
6983 {
6984 UTIL_FORMAT_SWIZZLE_X, /* r */
6985 UTIL_FORMAT_SWIZZLE_Y, /* g */
6986 UTIL_FORMAT_SWIZZLE_Z, /* b */
6987 UTIL_FORMAT_SWIZZLE_1 /* a */
6988 },
6989 #endif
6990 UTIL_FORMAT_COLORSPACE_RGB,
6991 };
6992
6993 const struct util_format_description
6994 util_format_r8g8b8a8_sint_description = {
6995 PIPE_FORMAT_R8G8B8A8_SINT,
6996 "PIPE_FORMAT_R8G8B8A8_SINT",
6997 "r8g8b8a8_sint",
6998 {1, 1, 32}, /* block */
6999 UTIL_FORMAT_LAYOUT_PLAIN,
7000 4, /* nr_channels */
7001 TRUE, /* is_array */
7002 TRUE, /* is_bitmask */
7003 FALSE, /* is_mixed */
7004 #ifdef PIPE_ARCH_BIG_ENDIAN
7005 {
7006 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 24}, /* x = r */
7007 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* y = g */
7008 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* z = b */
7009 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0} /* w = a */
7010 },
7011 #else
7012 {
7013 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
7014 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
7015 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* z = b */
7016 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 24} /* w = a */
7017 },
7018 #endif
7019 #ifdef PIPE_ARCH_BIG_ENDIAN
7020 {
7021 UTIL_FORMAT_SWIZZLE_X, /* r */
7022 UTIL_FORMAT_SWIZZLE_Y, /* g */
7023 UTIL_FORMAT_SWIZZLE_Z, /* b */
7024 UTIL_FORMAT_SWIZZLE_W /* a */
7025 },
7026 #else
7027 {
7028 UTIL_FORMAT_SWIZZLE_X, /* r */
7029 UTIL_FORMAT_SWIZZLE_Y, /* g */
7030 UTIL_FORMAT_SWIZZLE_Z, /* b */
7031 UTIL_FORMAT_SWIZZLE_W /* a */
7032 },
7033 #endif
7034 UTIL_FORMAT_COLORSPACE_RGB,
7035 };
7036
7037 const struct util_format_description
7038 util_format_r16_uint_description = {
7039 PIPE_FORMAT_R16_UINT,
7040 "PIPE_FORMAT_R16_UINT",
7041 "r16_uint",
7042 {1, 1, 16}, /* block */
7043 UTIL_FORMAT_LAYOUT_PLAIN,
7044 1, /* nr_channels */
7045 TRUE, /* is_array */
7046 TRUE, /* is_bitmask */
7047 FALSE, /* is_mixed */
7048 {
7049 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7050 {0, 0, 0, 0, 0},
7051 {0, 0, 0, 0, 0},
7052 {0, 0, 0, 0, 0}
7053 },
7054 {
7055 UTIL_FORMAT_SWIZZLE_X, /* r */
7056 UTIL_FORMAT_SWIZZLE_0, /* g */
7057 UTIL_FORMAT_SWIZZLE_0, /* b */
7058 UTIL_FORMAT_SWIZZLE_1 /* a */
7059 },
7060 UTIL_FORMAT_COLORSPACE_RGB,
7061 };
7062
7063 const struct util_format_description
7064 util_format_r16g16_uint_description = {
7065 PIPE_FORMAT_R16G16_UINT,
7066 "PIPE_FORMAT_R16G16_UINT",
7067 "r16g16_uint",
7068 {1, 1, 32}, /* block */
7069 UTIL_FORMAT_LAYOUT_PLAIN,
7070 2, /* nr_channels */
7071 TRUE, /* is_array */
7072 TRUE, /* is_bitmask */
7073 FALSE, /* is_mixed */
7074 #ifdef PIPE_ARCH_BIG_ENDIAN
7075 {
7076 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* x = r */
7077 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* y = g */
7078 {0, 0, 0, 0, 0},
7079 {0, 0, 0, 0, 0}
7080 },
7081 #else
7082 {
7083 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7084 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7085 {0, 0, 0, 0, 0},
7086 {0, 0, 0, 0, 0}
7087 },
7088 #endif
7089 #ifdef PIPE_ARCH_BIG_ENDIAN
7090 {
7091 UTIL_FORMAT_SWIZZLE_X, /* r */
7092 UTIL_FORMAT_SWIZZLE_Y, /* g */
7093 UTIL_FORMAT_SWIZZLE_0, /* b */
7094 UTIL_FORMAT_SWIZZLE_1 /* a */
7095 },
7096 #else
7097 {
7098 UTIL_FORMAT_SWIZZLE_X, /* r */
7099 UTIL_FORMAT_SWIZZLE_Y, /* g */
7100 UTIL_FORMAT_SWIZZLE_0, /* b */
7101 UTIL_FORMAT_SWIZZLE_1 /* a */
7102 },
7103 #endif
7104 UTIL_FORMAT_COLORSPACE_RGB,
7105 };
7106
7107 const struct util_format_description
7108 util_format_r16g16b16_uint_description = {
7109 PIPE_FORMAT_R16G16B16_UINT,
7110 "PIPE_FORMAT_R16G16B16_UINT",
7111 "r16g16b16_uint",
7112 {1, 1, 48}, /* block */
7113 UTIL_FORMAT_LAYOUT_PLAIN,
7114 3, /* nr_channels */
7115 TRUE, /* is_array */
7116 FALSE, /* is_bitmask */
7117 FALSE, /* is_mixed */
7118 #ifdef PIPE_ARCH_BIG_ENDIAN
7119 {
7120 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* x = r */
7121 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7122 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* z = b */
7123 {0, 0, 0, 0, 0}
7124 },
7125 #else
7126 {
7127 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7128 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7129 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* z = b */
7130 {0, 0, 0, 0, 0}
7131 },
7132 #endif
7133 #ifdef PIPE_ARCH_BIG_ENDIAN
7134 {
7135 UTIL_FORMAT_SWIZZLE_X, /* r */
7136 UTIL_FORMAT_SWIZZLE_Y, /* g */
7137 UTIL_FORMAT_SWIZZLE_Z, /* b */
7138 UTIL_FORMAT_SWIZZLE_1 /* a */
7139 },
7140 #else
7141 {
7142 UTIL_FORMAT_SWIZZLE_X, /* r */
7143 UTIL_FORMAT_SWIZZLE_Y, /* g */
7144 UTIL_FORMAT_SWIZZLE_Z, /* b */
7145 UTIL_FORMAT_SWIZZLE_1 /* a */
7146 },
7147 #endif
7148 UTIL_FORMAT_COLORSPACE_RGB,
7149 };
7150
7151 const struct util_format_description
7152 util_format_r16g16b16a16_uint_description = {
7153 PIPE_FORMAT_R16G16B16A16_UINT,
7154 "PIPE_FORMAT_R16G16B16A16_UINT",
7155 "r16g16b16a16_uint",
7156 {1, 1, 64}, /* block */
7157 UTIL_FORMAT_LAYOUT_PLAIN,
7158 4, /* nr_channels */
7159 TRUE, /* is_array */
7160 FALSE, /* is_bitmask */
7161 FALSE, /* is_mixed */
7162 #ifdef PIPE_ARCH_BIG_ENDIAN
7163 {
7164 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 48}, /* x = r */
7165 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* y = g */
7166 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* z = b */
7167 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0} /* w = a */
7168 },
7169 #else
7170 {
7171 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7172 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7173 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* z = b */
7174 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 48} /* w = a */
7175 },
7176 #endif
7177 #ifdef PIPE_ARCH_BIG_ENDIAN
7178 {
7179 UTIL_FORMAT_SWIZZLE_X, /* r */
7180 UTIL_FORMAT_SWIZZLE_Y, /* g */
7181 UTIL_FORMAT_SWIZZLE_Z, /* b */
7182 UTIL_FORMAT_SWIZZLE_W /* a */
7183 },
7184 #else
7185 {
7186 UTIL_FORMAT_SWIZZLE_X, /* r */
7187 UTIL_FORMAT_SWIZZLE_Y, /* g */
7188 UTIL_FORMAT_SWIZZLE_Z, /* b */
7189 UTIL_FORMAT_SWIZZLE_W /* a */
7190 },
7191 #endif
7192 UTIL_FORMAT_COLORSPACE_RGB,
7193 };
7194
7195 const struct util_format_description
7196 util_format_r16_sint_description = {
7197 PIPE_FORMAT_R16_SINT,
7198 "PIPE_FORMAT_R16_SINT",
7199 "r16_sint",
7200 {1, 1, 16}, /* block */
7201 UTIL_FORMAT_LAYOUT_PLAIN,
7202 1, /* nr_channels */
7203 TRUE, /* is_array */
7204 TRUE, /* is_bitmask */
7205 FALSE, /* is_mixed */
7206 {
7207 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7208 {0, 0, 0, 0, 0},
7209 {0, 0, 0, 0, 0},
7210 {0, 0, 0, 0, 0}
7211 },
7212 {
7213 UTIL_FORMAT_SWIZZLE_X, /* r */
7214 UTIL_FORMAT_SWIZZLE_0, /* g */
7215 UTIL_FORMAT_SWIZZLE_0, /* b */
7216 UTIL_FORMAT_SWIZZLE_1 /* a */
7217 },
7218 UTIL_FORMAT_COLORSPACE_RGB,
7219 };
7220
7221 const struct util_format_description
7222 util_format_r16g16_sint_description = {
7223 PIPE_FORMAT_R16G16_SINT,
7224 "PIPE_FORMAT_R16G16_SINT",
7225 "r16g16_sint",
7226 {1, 1, 32}, /* block */
7227 UTIL_FORMAT_LAYOUT_PLAIN,
7228 2, /* nr_channels */
7229 TRUE, /* is_array */
7230 TRUE, /* is_bitmask */
7231 FALSE, /* is_mixed */
7232 #ifdef PIPE_ARCH_BIG_ENDIAN
7233 {
7234 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* x = r */
7235 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* y = g */
7236 {0, 0, 0, 0, 0},
7237 {0, 0, 0, 0, 0}
7238 },
7239 #else
7240 {
7241 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7242 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7243 {0, 0, 0, 0, 0},
7244 {0, 0, 0, 0, 0}
7245 },
7246 #endif
7247 #ifdef PIPE_ARCH_BIG_ENDIAN
7248 {
7249 UTIL_FORMAT_SWIZZLE_X, /* r */
7250 UTIL_FORMAT_SWIZZLE_Y, /* g */
7251 UTIL_FORMAT_SWIZZLE_0, /* b */
7252 UTIL_FORMAT_SWIZZLE_1 /* a */
7253 },
7254 #else
7255 {
7256 UTIL_FORMAT_SWIZZLE_X, /* r */
7257 UTIL_FORMAT_SWIZZLE_Y, /* g */
7258 UTIL_FORMAT_SWIZZLE_0, /* b */
7259 UTIL_FORMAT_SWIZZLE_1 /* a */
7260 },
7261 #endif
7262 UTIL_FORMAT_COLORSPACE_RGB,
7263 };
7264
7265 const struct util_format_description
7266 util_format_r16g16b16_sint_description = {
7267 PIPE_FORMAT_R16G16B16_SINT,
7268 "PIPE_FORMAT_R16G16B16_SINT",
7269 "r16g16b16_sint",
7270 {1, 1, 48}, /* block */
7271 UTIL_FORMAT_LAYOUT_PLAIN,
7272 3, /* nr_channels */
7273 TRUE, /* is_array */
7274 FALSE, /* is_bitmask */
7275 FALSE, /* is_mixed */
7276 #ifdef PIPE_ARCH_BIG_ENDIAN
7277 {
7278 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* x = r */
7279 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7280 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* z = b */
7281 {0, 0, 0, 0, 0}
7282 },
7283 #else
7284 {
7285 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7286 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7287 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* z = b */
7288 {0, 0, 0, 0, 0}
7289 },
7290 #endif
7291 #ifdef PIPE_ARCH_BIG_ENDIAN
7292 {
7293 UTIL_FORMAT_SWIZZLE_X, /* r */
7294 UTIL_FORMAT_SWIZZLE_Y, /* g */
7295 UTIL_FORMAT_SWIZZLE_Z, /* b */
7296 UTIL_FORMAT_SWIZZLE_1 /* a */
7297 },
7298 #else
7299 {
7300 UTIL_FORMAT_SWIZZLE_X, /* r */
7301 UTIL_FORMAT_SWIZZLE_Y, /* g */
7302 UTIL_FORMAT_SWIZZLE_Z, /* b */
7303 UTIL_FORMAT_SWIZZLE_1 /* a */
7304 },
7305 #endif
7306 UTIL_FORMAT_COLORSPACE_RGB,
7307 };
7308
7309 const struct util_format_description
7310 util_format_r16g16b16a16_sint_description = {
7311 PIPE_FORMAT_R16G16B16A16_SINT,
7312 "PIPE_FORMAT_R16G16B16A16_SINT",
7313 "r16g16b16a16_sint",
7314 {1, 1, 64}, /* block */
7315 UTIL_FORMAT_LAYOUT_PLAIN,
7316 4, /* nr_channels */
7317 TRUE, /* is_array */
7318 FALSE, /* is_bitmask */
7319 FALSE, /* is_mixed */
7320 #ifdef PIPE_ARCH_BIG_ENDIAN
7321 {
7322 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 48}, /* x = r */
7323 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* y = g */
7324 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* z = b */
7325 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0} /* w = a */
7326 },
7327 #else
7328 {
7329 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
7330 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
7331 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* z = b */
7332 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 48} /* w = a */
7333 },
7334 #endif
7335 #ifdef PIPE_ARCH_BIG_ENDIAN
7336 {
7337 UTIL_FORMAT_SWIZZLE_X, /* r */
7338 UTIL_FORMAT_SWIZZLE_Y, /* g */
7339 UTIL_FORMAT_SWIZZLE_Z, /* b */
7340 UTIL_FORMAT_SWIZZLE_W /* a */
7341 },
7342 #else
7343 {
7344 UTIL_FORMAT_SWIZZLE_X, /* r */
7345 UTIL_FORMAT_SWIZZLE_Y, /* g */
7346 UTIL_FORMAT_SWIZZLE_Z, /* b */
7347 UTIL_FORMAT_SWIZZLE_W /* a */
7348 },
7349 #endif
7350 UTIL_FORMAT_COLORSPACE_RGB,
7351 };
7352
7353 const struct util_format_description
7354 util_format_r32_uint_description = {
7355 PIPE_FORMAT_R32_UINT,
7356 "PIPE_FORMAT_R32_UINT",
7357 "r32_uint",
7358 {1, 1, 32}, /* block */
7359 UTIL_FORMAT_LAYOUT_PLAIN,
7360 1, /* nr_channels */
7361 TRUE, /* is_array */
7362 TRUE, /* is_bitmask */
7363 FALSE, /* is_mixed */
7364 {
7365 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7366 {0, 0, 0, 0, 0},
7367 {0, 0, 0, 0, 0},
7368 {0, 0, 0, 0, 0}
7369 },
7370 {
7371 UTIL_FORMAT_SWIZZLE_X, /* r */
7372 UTIL_FORMAT_SWIZZLE_0, /* g */
7373 UTIL_FORMAT_SWIZZLE_0, /* b */
7374 UTIL_FORMAT_SWIZZLE_1 /* a */
7375 },
7376 UTIL_FORMAT_COLORSPACE_RGB,
7377 };
7378
7379 const struct util_format_description
7380 util_format_r32g32_uint_description = {
7381 PIPE_FORMAT_R32G32_UINT,
7382 "PIPE_FORMAT_R32G32_UINT",
7383 "r32g32_uint",
7384 {1, 1, 64}, /* block */
7385 UTIL_FORMAT_LAYOUT_PLAIN,
7386 2, /* nr_channels */
7387 TRUE, /* is_array */
7388 FALSE, /* is_bitmask */
7389 FALSE, /* is_mixed */
7390 #ifdef PIPE_ARCH_BIG_ENDIAN
7391 {
7392 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* x = r */
7393 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* y = g */
7394 {0, 0, 0, 0, 0},
7395 {0, 0, 0, 0, 0}
7396 },
7397 #else
7398 {
7399 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7400 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7401 {0, 0, 0, 0, 0},
7402 {0, 0, 0, 0, 0}
7403 },
7404 #endif
7405 #ifdef PIPE_ARCH_BIG_ENDIAN
7406 {
7407 UTIL_FORMAT_SWIZZLE_X, /* r */
7408 UTIL_FORMAT_SWIZZLE_Y, /* g */
7409 UTIL_FORMAT_SWIZZLE_0, /* b */
7410 UTIL_FORMAT_SWIZZLE_1 /* a */
7411 },
7412 #else
7413 {
7414 UTIL_FORMAT_SWIZZLE_X, /* r */
7415 UTIL_FORMAT_SWIZZLE_Y, /* g */
7416 UTIL_FORMAT_SWIZZLE_0, /* b */
7417 UTIL_FORMAT_SWIZZLE_1 /* a */
7418 },
7419 #endif
7420 UTIL_FORMAT_COLORSPACE_RGB,
7421 };
7422
7423 const struct util_format_description
7424 util_format_r32g32b32_uint_description = {
7425 PIPE_FORMAT_R32G32B32_UINT,
7426 "PIPE_FORMAT_R32G32B32_UINT",
7427 "r32g32b32_uint",
7428 {1, 1, 96}, /* block */
7429 UTIL_FORMAT_LAYOUT_PLAIN,
7430 3, /* nr_channels */
7431 TRUE, /* is_array */
7432 FALSE, /* is_bitmask */
7433 FALSE, /* is_mixed */
7434 #ifdef PIPE_ARCH_BIG_ENDIAN
7435 {
7436 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* x = r */
7437 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7438 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* z = b */
7439 {0, 0, 0, 0, 0}
7440 },
7441 #else
7442 {
7443 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7444 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7445 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* z = b */
7446 {0, 0, 0, 0, 0}
7447 },
7448 #endif
7449 #ifdef PIPE_ARCH_BIG_ENDIAN
7450 {
7451 UTIL_FORMAT_SWIZZLE_X, /* r */
7452 UTIL_FORMAT_SWIZZLE_Y, /* g */
7453 UTIL_FORMAT_SWIZZLE_Z, /* b */
7454 UTIL_FORMAT_SWIZZLE_1 /* a */
7455 },
7456 #else
7457 {
7458 UTIL_FORMAT_SWIZZLE_X, /* r */
7459 UTIL_FORMAT_SWIZZLE_Y, /* g */
7460 UTIL_FORMAT_SWIZZLE_Z, /* b */
7461 UTIL_FORMAT_SWIZZLE_1 /* a */
7462 },
7463 #endif
7464 UTIL_FORMAT_COLORSPACE_RGB,
7465 };
7466
7467 const struct util_format_description
7468 util_format_r32g32b32a32_uint_description = {
7469 PIPE_FORMAT_R32G32B32A32_UINT,
7470 "PIPE_FORMAT_R32G32B32A32_UINT",
7471 "r32g32b32a32_uint",
7472 {1, 1, 128}, /* block */
7473 UTIL_FORMAT_LAYOUT_PLAIN,
7474 4, /* nr_channels */
7475 TRUE, /* is_array */
7476 FALSE, /* is_bitmask */
7477 FALSE, /* is_mixed */
7478 #ifdef PIPE_ARCH_BIG_ENDIAN
7479 {
7480 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 96}, /* x = r */
7481 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* y = g */
7482 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* z = b */
7483 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0} /* w = a */
7484 },
7485 #else
7486 {
7487 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7488 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7489 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* z = b */
7490 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 96} /* w = a */
7491 },
7492 #endif
7493 #ifdef PIPE_ARCH_BIG_ENDIAN
7494 {
7495 UTIL_FORMAT_SWIZZLE_X, /* r */
7496 UTIL_FORMAT_SWIZZLE_Y, /* g */
7497 UTIL_FORMAT_SWIZZLE_Z, /* b */
7498 UTIL_FORMAT_SWIZZLE_W /* a */
7499 },
7500 #else
7501 {
7502 UTIL_FORMAT_SWIZZLE_X, /* r */
7503 UTIL_FORMAT_SWIZZLE_Y, /* g */
7504 UTIL_FORMAT_SWIZZLE_Z, /* b */
7505 UTIL_FORMAT_SWIZZLE_W /* a */
7506 },
7507 #endif
7508 UTIL_FORMAT_COLORSPACE_RGB,
7509 };
7510
7511 const struct util_format_description
7512 util_format_r32_sint_description = {
7513 PIPE_FORMAT_R32_SINT,
7514 "PIPE_FORMAT_R32_SINT",
7515 "r32_sint",
7516 {1, 1, 32}, /* block */
7517 UTIL_FORMAT_LAYOUT_PLAIN,
7518 1, /* nr_channels */
7519 TRUE, /* is_array */
7520 TRUE, /* is_bitmask */
7521 FALSE, /* is_mixed */
7522 {
7523 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7524 {0, 0, 0, 0, 0},
7525 {0, 0, 0, 0, 0},
7526 {0, 0, 0, 0, 0}
7527 },
7528 {
7529 UTIL_FORMAT_SWIZZLE_X, /* r */
7530 UTIL_FORMAT_SWIZZLE_0, /* g */
7531 UTIL_FORMAT_SWIZZLE_0, /* b */
7532 UTIL_FORMAT_SWIZZLE_1 /* a */
7533 },
7534 UTIL_FORMAT_COLORSPACE_RGB,
7535 };
7536
7537 const struct util_format_description
7538 util_format_r32g32_sint_description = {
7539 PIPE_FORMAT_R32G32_SINT,
7540 "PIPE_FORMAT_R32G32_SINT",
7541 "r32g32_sint",
7542 {1, 1, 64}, /* block */
7543 UTIL_FORMAT_LAYOUT_PLAIN,
7544 2, /* nr_channels */
7545 TRUE, /* is_array */
7546 FALSE, /* is_bitmask */
7547 FALSE, /* is_mixed */
7548 #ifdef PIPE_ARCH_BIG_ENDIAN
7549 {
7550 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* x = r */
7551 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* y = g */
7552 {0, 0, 0, 0, 0},
7553 {0, 0, 0, 0, 0}
7554 },
7555 #else
7556 {
7557 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7558 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7559 {0, 0, 0, 0, 0},
7560 {0, 0, 0, 0, 0}
7561 },
7562 #endif
7563 #ifdef PIPE_ARCH_BIG_ENDIAN
7564 {
7565 UTIL_FORMAT_SWIZZLE_X, /* r */
7566 UTIL_FORMAT_SWIZZLE_Y, /* g */
7567 UTIL_FORMAT_SWIZZLE_0, /* b */
7568 UTIL_FORMAT_SWIZZLE_1 /* a */
7569 },
7570 #else
7571 {
7572 UTIL_FORMAT_SWIZZLE_X, /* r */
7573 UTIL_FORMAT_SWIZZLE_Y, /* g */
7574 UTIL_FORMAT_SWIZZLE_0, /* b */
7575 UTIL_FORMAT_SWIZZLE_1 /* a */
7576 },
7577 #endif
7578 UTIL_FORMAT_COLORSPACE_RGB,
7579 };
7580
7581 const struct util_format_description
7582 util_format_r32g32b32_sint_description = {
7583 PIPE_FORMAT_R32G32B32_SINT,
7584 "PIPE_FORMAT_R32G32B32_SINT",
7585 "r32g32b32_sint",
7586 {1, 1, 96}, /* block */
7587 UTIL_FORMAT_LAYOUT_PLAIN,
7588 3, /* nr_channels */
7589 TRUE, /* is_array */
7590 FALSE, /* is_bitmask */
7591 FALSE, /* is_mixed */
7592 #ifdef PIPE_ARCH_BIG_ENDIAN
7593 {
7594 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* x = r */
7595 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7596 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* z = b */
7597 {0, 0, 0, 0, 0}
7598 },
7599 #else
7600 {
7601 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7602 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7603 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* z = b */
7604 {0, 0, 0, 0, 0}
7605 },
7606 #endif
7607 #ifdef PIPE_ARCH_BIG_ENDIAN
7608 {
7609 UTIL_FORMAT_SWIZZLE_X, /* r */
7610 UTIL_FORMAT_SWIZZLE_Y, /* g */
7611 UTIL_FORMAT_SWIZZLE_Z, /* b */
7612 UTIL_FORMAT_SWIZZLE_1 /* a */
7613 },
7614 #else
7615 {
7616 UTIL_FORMAT_SWIZZLE_X, /* r */
7617 UTIL_FORMAT_SWIZZLE_Y, /* g */
7618 UTIL_FORMAT_SWIZZLE_Z, /* b */
7619 UTIL_FORMAT_SWIZZLE_1 /* a */
7620 },
7621 #endif
7622 UTIL_FORMAT_COLORSPACE_RGB,
7623 };
7624
7625 const struct util_format_description
7626 util_format_r32g32b32a32_sint_description = {
7627 PIPE_FORMAT_R32G32B32A32_SINT,
7628 "PIPE_FORMAT_R32G32B32A32_SINT",
7629 "r32g32b32a32_sint",
7630 {1, 1, 128}, /* block */
7631 UTIL_FORMAT_LAYOUT_PLAIN,
7632 4, /* nr_channels */
7633 TRUE, /* is_array */
7634 FALSE, /* is_bitmask */
7635 FALSE, /* is_mixed */
7636 #ifdef PIPE_ARCH_BIG_ENDIAN
7637 {
7638 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 96}, /* x = r */
7639 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* y = g */
7640 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* z = b */
7641 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0} /* w = a */
7642 },
7643 #else
7644 {
7645 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
7646 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
7647 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* z = b */
7648 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 96} /* w = a */
7649 },
7650 #endif
7651 #ifdef PIPE_ARCH_BIG_ENDIAN
7652 {
7653 UTIL_FORMAT_SWIZZLE_X, /* r */
7654 UTIL_FORMAT_SWIZZLE_Y, /* g */
7655 UTIL_FORMAT_SWIZZLE_Z, /* b */
7656 UTIL_FORMAT_SWIZZLE_W /* a */
7657 },
7658 #else
7659 {
7660 UTIL_FORMAT_SWIZZLE_X, /* r */
7661 UTIL_FORMAT_SWIZZLE_Y, /* g */
7662 UTIL_FORMAT_SWIZZLE_Z, /* b */
7663 UTIL_FORMAT_SWIZZLE_W /* a */
7664 },
7665 #endif
7666 UTIL_FORMAT_COLORSPACE_RGB,
7667 };
7668
7669 const struct util_format_description
7670 util_format_a8_uint_description = {
7671 PIPE_FORMAT_A8_UINT,
7672 "PIPE_FORMAT_A8_UINT",
7673 "a8_uint",
7674 {1, 1, 8}, /* block */
7675 UTIL_FORMAT_LAYOUT_PLAIN,
7676 1, /* nr_channels */
7677 TRUE, /* is_array */
7678 TRUE, /* is_bitmask */
7679 FALSE, /* is_mixed */
7680 {
7681 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = a */
7682 {0, 0, 0, 0, 0},
7683 {0, 0, 0, 0, 0},
7684 {0, 0, 0, 0, 0}
7685 },
7686 {
7687 UTIL_FORMAT_SWIZZLE_0, /* r */
7688 UTIL_FORMAT_SWIZZLE_0, /* g */
7689 UTIL_FORMAT_SWIZZLE_0, /* b */
7690 UTIL_FORMAT_SWIZZLE_X /* a */
7691 },
7692 UTIL_FORMAT_COLORSPACE_RGB,
7693 };
7694
7695 const struct util_format_description
7696 util_format_i8_uint_description = {
7697 PIPE_FORMAT_I8_UINT,
7698 "PIPE_FORMAT_I8_UINT",
7699 "i8_uint",
7700 {1, 1, 8}, /* block */
7701 UTIL_FORMAT_LAYOUT_PLAIN,
7702 1, /* nr_channels */
7703 TRUE, /* is_array */
7704 TRUE, /* is_bitmask */
7705 FALSE, /* is_mixed */
7706 {
7707 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = rgba */
7708 {0, 0, 0, 0, 0},
7709 {0, 0, 0, 0, 0},
7710 {0, 0, 0, 0, 0}
7711 },
7712 {
7713 UTIL_FORMAT_SWIZZLE_X, /* r */
7714 UTIL_FORMAT_SWIZZLE_X, /* g */
7715 UTIL_FORMAT_SWIZZLE_X, /* b */
7716 UTIL_FORMAT_SWIZZLE_X /* a */
7717 },
7718 UTIL_FORMAT_COLORSPACE_RGB,
7719 };
7720
7721 const struct util_format_description
7722 util_format_l8_uint_description = {
7723 PIPE_FORMAT_L8_UINT,
7724 "PIPE_FORMAT_L8_UINT",
7725 "l8_uint",
7726 {1, 1, 8}, /* block */
7727 UTIL_FORMAT_LAYOUT_PLAIN,
7728 1, /* nr_channels */
7729 TRUE, /* is_array */
7730 TRUE, /* is_bitmask */
7731 FALSE, /* is_mixed */
7732 {
7733 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
7734 {0, 0, 0, 0, 0},
7735 {0, 0, 0, 0, 0},
7736 {0, 0, 0, 0, 0}
7737 },
7738 {
7739 UTIL_FORMAT_SWIZZLE_X, /* r */
7740 UTIL_FORMAT_SWIZZLE_X, /* g */
7741 UTIL_FORMAT_SWIZZLE_X, /* b */
7742 UTIL_FORMAT_SWIZZLE_1 /* a */
7743 },
7744 UTIL_FORMAT_COLORSPACE_RGB,
7745 };
7746
7747 const struct util_format_description
7748 util_format_l8a8_uint_description = {
7749 PIPE_FORMAT_L8A8_UINT,
7750 "PIPE_FORMAT_L8A8_UINT",
7751 "l8a8_uint",
7752 {1, 1, 16}, /* block */
7753 UTIL_FORMAT_LAYOUT_PLAIN,
7754 2, /* nr_channels */
7755 TRUE, /* is_array */
7756 TRUE, /* is_bitmask */
7757 FALSE, /* is_mixed */
7758 #ifdef PIPE_ARCH_BIG_ENDIAN
7759 {
7760 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* x = rgb */
7761 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* y = a */
7762 {0, 0, 0, 0, 0},
7763 {0, 0, 0, 0, 0}
7764 },
7765 #else
7766 {
7767 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
7768 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = a */
7769 {0, 0, 0, 0, 0},
7770 {0, 0, 0, 0, 0}
7771 },
7772 #endif
7773 #ifdef PIPE_ARCH_BIG_ENDIAN
7774 {
7775 UTIL_FORMAT_SWIZZLE_X, /* r */
7776 UTIL_FORMAT_SWIZZLE_X, /* g */
7777 UTIL_FORMAT_SWIZZLE_X, /* b */
7778 UTIL_FORMAT_SWIZZLE_Y /* a */
7779 },
7780 #else
7781 {
7782 UTIL_FORMAT_SWIZZLE_X, /* r */
7783 UTIL_FORMAT_SWIZZLE_X, /* g */
7784 UTIL_FORMAT_SWIZZLE_X, /* b */
7785 UTIL_FORMAT_SWIZZLE_Y /* a */
7786 },
7787 #endif
7788 UTIL_FORMAT_COLORSPACE_RGB,
7789 };
7790
7791 const struct util_format_description
7792 util_format_a8_sint_description = {
7793 PIPE_FORMAT_A8_SINT,
7794 "PIPE_FORMAT_A8_SINT",
7795 "a8_sint",
7796 {1, 1, 8}, /* block */
7797 UTIL_FORMAT_LAYOUT_PLAIN,
7798 1, /* nr_channels */
7799 TRUE, /* is_array */
7800 TRUE, /* is_bitmask */
7801 FALSE, /* is_mixed */
7802 {
7803 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = a */
7804 {0, 0, 0, 0, 0},
7805 {0, 0, 0, 0, 0},
7806 {0, 0, 0, 0, 0}
7807 },
7808 {
7809 UTIL_FORMAT_SWIZZLE_0, /* r */
7810 UTIL_FORMAT_SWIZZLE_0, /* g */
7811 UTIL_FORMAT_SWIZZLE_0, /* b */
7812 UTIL_FORMAT_SWIZZLE_X /* a */
7813 },
7814 UTIL_FORMAT_COLORSPACE_RGB,
7815 };
7816
7817 const struct util_format_description
7818 util_format_i8_sint_description = {
7819 PIPE_FORMAT_I8_SINT,
7820 "PIPE_FORMAT_I8_SINT",
7821 "i8_sint",
7822 {1, 1, 8}, /* block */
7823 UTIL_FORMAT_LAYOUT_PLAIN,
7824 1, /* nr_channels */
7825 TRUE, /* is_array */
7826 TRUE, /* is_bitmask */
7827 FALSE, /* is_mixed */
7828 {
7829 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = rgba */
7830 {0, 0, 0, 0, 0},
7831 {0, 0, 0, 0, 0},
7832 {0, 0, 0, 0, 0}
7833 },
7834 {
7835 UTIL_FORMAT_SWIZZLE_X, /* r */
7836 UTIL_FORMAT_SWIZZLE_X, /* g */
7837 UTIL_FORMAT_SWIZZLE_X, /* b */
7838 UTIL_FORMAT_SWIZZLE_X /* a */
7839 },
7840 UTIL_FORMAT_COLORSPACE_RGB,
7841 };
7842
7843 const struct util_format_description
7844 util_format_l8_sint_description = {
7845 PIPE_FORMAT_L8_SINT,
7846 "PIPE_FORMAT_L8_SINT",
7847 "l8_sint",
7848 {1, 1, 8}, /* block */
7849 UTIL_FORMAT_LAYOUT_PLAIN,
7850 1, /* nr_channels */
7851 TRUE, /* is_array */
7852 TRUE, /* is_bitmask */
7853 FALSE, /* is_mixed */
7854 {
7855 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
7856 {0, 0, 0, 0, 0},
7857 {0, 0, 0, 0, 0},
7858 {0, 0, 0, 0, 0}
7859 },
7860 {
7861 UTIL_FORMAT_SWIZZLE_X, /* r */
7862 UTIL_FORMAT_SWIZZLE_X, /* g */
7863 UTIL_FORMAT_SWIZZLE_X, /* b */
7864 UTIL_FORMAT_SWIZZLE_1 /* a */
7865 },
7866 UTIL_FORMAT_COLORSPACE_RGB,
7867 };
7868
7869 const struct util_format_description
7870 util_format_l8a8_sint_description = {
7871 PIPE_FORMAT_L8A8_SINT,
7872 "PIPE_FORMAT_L8A8_SINT",
7873 "l8a8_sint",
7874 {1, 1, 16}, /* block */
7875 UTIL_FORMAT_LAYOUT_PLAIN,
7876 2, /* nr_channels */
7877 TRUE, /* is_array */
7878 TRUE, /* is_bitmask */
7879 FALSE, /* is_mixed */
7880 #ifdef PIPE_ARCH_BIG_ENDIAN
7881 {
7882 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* x = rgb */
7883 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* y = a */
7884 {0, 0, 0, 0, 0},
7885 {0, 0, 0, 0, 0}
7886 },
7887 #else
7888 {
7889 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = rgb */
7890 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = a */
7891 {0, 0, 0, 0, 0},
7892 {0, 0, 0, 0, 0}
7893 },
7894 #endif
7895 #ifdef PIPE_ARCH_BIG_ENDIAN
7896 {
7897 UTIL_FORMAT_SWIZZLE_X, /* r */
7898 UTIL_FORMAT_SWIZZLE_X, /* g */
7899 UTIL_FORMAT_SWIZZLE_X, /* b */
7900 UTIL_FORMAT_SWIZZLE_Y /* a */
7901 },
7902 #else
7903 {
7904 UTIL_FORMAT_SWIZZLE_X, /* r */
7905 UTIL_FORMAT_SWIZZLE_X, /* g */
7906 UTIL_FORMAT_SWIZZLE_X, /* b */
7907 UTIL_FORMAT_SWIZZLE_Y /* a */
7908 },
7909 #endif
7910 UTIL_FORMAT_COLORSPACE_RGB,
7911 };
7912
7913 const struct util_format_description
7914 util_format_a16_uint_description = {
7915 PIPE_FORMAT_A16_UINT,
7916 "PIPE_FORMAT_A16_UINT",
7917 "a16_uint",
7918 {1, 1, 16}, /* block */
7919 UTIL_FORMAT_LAYOUT_PLAIN,
7920 1, /* nr_channels */
7921 TRUE, /* is_array */
7922 TRUE, /* is_bitmask */
7923 FALSE, /* is_mixed */
7924 {
7925 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = a */
7926 {0, 0, 0, 0, 0},
7927 {0, 0, 0, 0, 0},
7928 {0, 0, 0, 0, 0}
7929 },
7930 {
7931 UTIL_FORMAT_SWIZZLE_0, /* r */
7932 UTIL_FORMAT_SWIZZLE_0, /* g */
7933 UTIL_FORMAT_SWIZZLE_0, /* b */
7934 UTIL_FORMAT_SWIZZLE_X /* a */
7935 },
7936 UTIL_FORMAT_COLORSPACE_RGB,
7937 };
7938
7939 const struct util_format_description
7940 util_format_i16_uint_description = {
7941 PIPE_FORMAT_I16_UINT,
7942 "PIPE_FORMAT_I16_UINT",
7943 "i16_uint",
7944 {1, 1, 16}, /* block */
7945 UTIL_FORMAT_LAYOUT_PLAIN,
7946 1, /* nr_channels */
7947 TRUE, /* is_array */
7948 TRUE, /* is_bitmask */
7949 FALSE, /* is_mixed */
7950 {
7951 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = rgba */
7952 {0, 0, 0, 0, 0},
7953 {0, 0, 0, 0, 0},
7954 {0, 0, 0, 0, 0}
7955 },
7956 {
7957 UTIL_FORMAT_SWIZZLE_X, /* r */
7958 UTIL_FORMAT_SWIZZLE_X, /* g */
7959 UTIL_FORMAT_SWIZZLE_X, /* b */
7960 UTIL_FORMAT_SWIZZLE_X /* a */
7961 },
7962 UTIL_FORMAT_COLORSPACE_RGB,
7963 };
7964
7965 const struct util_format_description
7966 util_format_l16_uint_description = {
7967 PIPE_FORMAT_L16_UINT,
7968 "PIPE_FORMAT_L16_UINT",
7969 "l16_uint",
7970 {1, 1, 16}, /* block */
7971 UTIL_FORMAT_LAYOUT_PLAIN,
7972 1, /* nr_channels */
7973 TRUE, /* is_array */
7974 TRUE, /* is_bitmask */
7975 FALSE, /* is_mixed */
7976 {
7977 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
7978 {0, 0, 0, 0, 0},
7979 {0, 0, 0, 0, 0},
7980 {0, 0, 0, 0, 0}
7981 },
7982 {
7983 UTIL_FORMAT_SWIZZLE_X, /* r */
7984 UTIL_FORMAT_SWIZZLE_X, /* g */
7985 UTIL_FORMAT_SWIZZLE_X, /* b */
7986 UTIL_FORMAT_SWIZZLE_1 /* a */
7987 },
7988 UTIL_FORMAT_COLORSPACE_RGB,
7989 };
7990
7991 const struct util_format_description
7992 util_format_l16a16_uint_description = {
7993 PIPE_FORMAT_L16A16_UINT,
7994 "PIPE_FORMAT_L16A16_UINT",
7995 "l16a16_uint",
7996 {1, 1, 32}, /* block */
7997 UTIL_FORMAT_LAYOUT_PLAIN,
7998 2, /* nr_channels */
7999 TRUE, /* is_array */
8000 TRUE, /* is_bitmask */
8001 FALSE, /* is_mixed */
8002 #ifdef PIPE_ARCH_BIG_ENDIAN
8003 {
8004 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* x = rgb */
8005 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* y = a */
8006 {0, 0, 0, 0, 0},
8007 {0, 0, 0, 0, 0}
8008 },
8009 #else
8010 {
8011 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
8012 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = a */
8013 {0, 0, 0, 0, 0},
8014 {0, 0, 0, 0, 0}
8015 },
8016 #endif
8017 #ifdef PIPE_ARCH_BIG_ENDIAN
8018 {
8019 UTIL_FORMAT_SWIZZLE_X, /* r */
8020 UTIL_FORMAT_SWIZZLE_X, /* g */
8021 UTIL_FORMAT_SWIZZLE_X, /* b */
8022 UTIL_FORMAT_SWIZZLE_Y /* a */
8023 },
8024 #else
8025 {
8026 UTIL_FORMAT_SWIZZLE_X, /* r */
8027 UTIL_FORMAT_SWIZZLE_X, /* g */
8028 UTIL_FORMAT_SWIZZLE_X, /* b */
8029 UTIL_FORMAT_SWIZZLE_Y /* a */
8030 },
8031 #endif
8032 UTIL_FORMAT_COLORSPACE_RGB,
8033 };
8034
8035 const struct util_format_description
8036 util_format_a16_sint_description = {
8037 PIPE_FORMAT_A16_SINT,
8038 "PIPE_FORMAT_A16_SINT",
8039 "a16_sint",
8040 {1, 1, 16}, /* block */
8041 UTIL_FORMAT_LAYOUT_PLAIN,
8042 1, /* nr_channels */
8043 TRUE, /* is_array */
8044 TRUE, /* is_bitmask */
8045 FALSE, /* is_mixed */
8046 {
8047 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = a */
8048 {0, 0, 0, 0, 0},
8049 {0, 0, 0, 0, 0},
8050 {0, 0, 0, 0, 0}
8051 },
8052 {
8053 UTIL_FORMAT_SWIZZLE_0, /* r */
8054 UTIL_FORMAT_SWIZZLE_0, /* g */
8055 UTIL_FORMAT_SWIZZLE_0, /* b */
8056 UTIL_FORMAT_SWIZZLE_X /* a */
8057 },
8058 UTIL_FORMAT_COLORSPACE_RGB,
8059 };
8060
8061 const struct util_format_description
8062 util_format_i16_sint_description = {
8063 PIPE_FORMAT_I16_SINT,
8064 "PIPE_FORMAT_I16_SINT",
8065 "i16_sint",
8066 {1, 1, 16}, /* block */
8067 UTIL_FORMAT_LAYOUT_PLAIN,
8068 1, /* nr_channels */
8069 TRUE, /* is_array */
8070 TRUE, /* is_bitmask */
8071 FALSE, /* is_mixed */
8072 {
8073 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = rgba */
8074 {0, 0, 0, 0, 0},
8075 {0, 0, 0, 0, 0},
8076 {0, 0, 0, 0, 0}
8077 },
8078 {
8079 UTIL_FORMAT_SWIZZLE_X, /* r */
8080 UTIL_FORMAT_SWIZZLE_X, /* g */
8081 UTIL_FORMAT_SWIZZLE_X, /* b */
8082 UTIL_FORMAT_SWIZZLE_X /* a */
8083 },
8084 UTIL_FORMAT_COLORSPACE_RGB,
8085 };
8086
8087 const struct util_format_description
8088 util_format_l16_sint_description = {
8089 PIPE_FORMAT_L16_SINT,
8090 "PIPE_FORMAT_L16_SINT",
8091 "l16_sint",
8092 {1, 1, 16}, /* block */
8093 UTIL_FORMAT_LAYOUT_PLAIN,
8094 1, /* nr_channels */
8095 TRUE, /* is_array */
8096 TRUE, /* is_bitmask */
8097 FALSE, /* is_mixed */
8098 {
8099 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
8100 {0, 0, 0, 0, 0},
8101 {0, 0, 0, 0, 0},
8102 {0, 0, 0, 0, 0}
8103 },
8104 {
8105 UTIL_FORMAT_SWIZZLE_X, /* r */
8106 UTIL_FORMAT_SWIZZLE_X, /* g */
8107 UTIL_FORMAT_SWIZZLE_X, /* b */
8108 UTIL_FORMAT_SWIZZLE_1 /* a */
8109 },
8110 UTIL_FORMAT_COLORSPACE_RGB,
8111 };
8112
8113 const struct util_format_description
8114 util_format_l16a16_sint_description = {
8115 PIPE_FORMAT_L16A16_SINT,
8116 "PIPE_FORMAT_L16A16_SINT",
8117 "l16a16_sint",
8118 {1, 1, 32}, /* block */
8119 UTIL_FORMAT_LAYOUT_PLAIN,
8120 2, /* nr_channels */
8121 TRUE, /* is_array */
8122 TRUE, /* is_bitmask */
8123 FALSE, /* is_mixed */
8124 #ifdef PIPE_ARCH_BIG_ENDIAN
8125 {
8126 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* x = rgb */
8127 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* y = a */
8128 {0, 0, 0, 0, 0},
8129 {0, 0, 0, 0, 0}
8130 },
8131 #else
8132 {
8133 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = rgb */
8134 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = a */
8135 {0, 0, 0, 0, 0},
8136 {0, 0, 0, 0, 0}
8137 },
8138 #endif
8139 #ifdef PIPE_ARCH_BIG_ENDIAN
8140 {
8141 UTIL_FORMAT_SWIZZLE_X, /* r */
8142 UTIL_FORMAT_SWIZZLE_X, /* g */
8143 UTIL_FORMAT_SWIZZLE_X, /* b */
8144 UTIL_FORMAT_SWIZZLE_Y /* a */
8145 },
8146 #else
8147 {
8148 UTIL_FORMAT_SWIZZLE_X, /* r */
8149 UTIL_FORMAT_SWIZZLE_X, /* g */
8150 UTIL_FORMAT_SWIZZLE_X, /* b */
8151 UTIL_FORMAT_SWIZZLE_Y /* a */
8152 },
8153 #endif
8154 UTIL_FORMAT_COLORSPACE_RGB,
8155 };
8156
8157 const struct util_format_description
8158 util_format_a32_uint_description = {
8159 PIPE_FORMAT_A32_UINT,
8160 "PIPE_FORMAT_A32_UINT",
8161 "a32_uint",
8162 {1, 1, 32}, /* block */
8163 UTIL_FORMAT_LAYOUT_PLAIN,
8164 1, /* nr_channels */
8165 TRUE, /* is_array */
8166 TRUE, /* is_bitmask */
8167 FALSE, /* is_mixed */
8168 {
8169 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = a */
8170 {0, 0, 0, 0, 0},
8171 {0, 0, 0, 0, 0},
8172 {0, 0, 0, 0, 0}
8173 },
8174 {
8175 UTIL_FORMAT_SWIZZLE_0, /* r */
8176 UTIL_FORMAT_SWIZZLE_0, /* g */
8177 UTIL_FORMAT_SWIZZLE_0, /* b */
8178 UTIL_FORMAT_SWIZZLE_X /* a */
8179 },
8180 UTIL_FORMAT_COLORSPACE_RGB,
8181 };
8182
8183 const struct util_format_description
8184 util_format_i32_uint_description = {
8185 PIPE_FORMAT_I32_UINT,
8186 "PIPE_FORMAT_I32_UINT",
8187 "i32_uint",
8188 {1, 1, 32}, /* block */
8189 UTIL_FORMAT_LAYOUT_PLAIN,
8190 1, /* nr_channels */
8191 TRUE, /* is_array */
8192 TRUE, /* is_bitmask */
8193 FALSE, /* is_mixed */
8194 {
8195 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = rgba */
8196 {0, 0, 0, 0, 0},
8197 {0, 0, 0, 0, 0},
8198 {0, 0, 0, 0, 0}
8199 },
8200 {
8201 UTIL_FORMAT_SWIZZLE_X, /* r */
8202 UTIL_FORMAT_SWIZZLE_X, /* g */
8203 UTIL_FORMAT_SWIZZLE_X, /* b */
8204 UTIL_FORMAT_SWIZZLE_X /* a */
8205 },
8206 UTIL_FORMAT_COLORSPACE_RGB,
8207 };
8208
8209 const struct util_format_description
8210 util_format_l32_uint_description = {
8211 PIPE_FORMAT_L32_UINT,
8212 "PIPE_FORMAT_L32_UINT",
8213 "l32_uint",
8214 {1, 1, 32}, /* block */
8215 UTIL_FORMAT_LAYOUT_PLAIN,
8216 1, /* nr_channels */
8217 TRUE, /* is_array */
8218 TRUE, /* is_bitmask */
8219 FALSE, /* is_mixed */
8220 {
8221 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
8222 {0, 0, 0, 0, 0},
8223 {0, 0, 0, 0, 0},
8224 {0, 0, 0, 0, 0}
8225 },
8226 {
8227 UTIL_FORMAT_SWIZZLE_X, /* r */
8228 UTIL_FORMAT_SWIZZLE_X, /* g */
8229 UTIL_FORMAT_SWIZZLE_X, /* b */
8230 UTIL_FORMAT_SWIZZLE_1 /* a */
8231 },
8232 UTIL_FORMAT_COLORSPACE_RGB,
8233 };
8234
8235 const struct util_format_description
8236 util_format_l32a32_uint_description = {
8237 PIPE_FORMAT_L32A32_UINT,
8238 "PIPE_FORMAT_L32A32_UINT",
8239 "l32a32_uint",
8240 {1, 1, 64}, /* block */
8241 UTIL_FORMAT_LAYOUT_PLAIN,
8242 2, /* nr_channels */
8243 TRUE, /* is_array */
8244 FALSE, /* is_bitmask */
8245 FALSE, /* is_mixed */
8246 #ifdef PIPE_ARCH_BIG_ENDIAN
8247 {
8248 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* x = rgb */
8249 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* y = a */
8250 {0, 0, 0, 0, 0},
8251 {0, 0, 0, 0, 0}
8252 },
8253 #else
8254 {
8255 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
8256 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = a */
8257 {0, 0, 0, 0, 0},
8258 {0, 0, 0, 0, 0}
8259 },
8260 #endif
8261 #ifdef PIPE_ARCH_BIG_ENDIAN
8262 {
8263 UTIL_FORMAT_SWIZZLE_X, /* r */
8264 UTIL_FORMAT_SWIZZLE_X, /* g */
8265 UTIL_FORMAT_SWIZZLE_X, /* b */
8266 UTIL_FORMAT_SWIZZLE_Y /* a */
8267 },
8268 #else
8269 {
8270 UTIL_FORMAT_SWIZZLE_X, /* r */
8271 UTIL_FORMAT_SWIZZLE_X, /* g */
8272 UTIL_FORMAT_SWIZZLE_X, /* b */
8273 UTIL_FORMAT_SWIZZLE_Y /* a */
8274 },
8275 #endif
8276 UTIL_FORMAT_COLORSPACE_RGB,
8277 };
8278
8279 const struct util_format_description
8280 util_format_a32_sint_description = {
8281 PIPE_FORMAT_A32_SINT,
8282 "PIPE_FORMAT_A32_SINT",
8283 "a32_sint",
8284 {1, 1, 32}, /* block */
8285 UTIL_FORMAT_LAYOUT_PLAIN,
8286 1, /* nr_channels */
8287 TRUE, /* is_array */
8288 TRUE, /* is_bitmask */
8289 FALSE, /* is_mixed */
8290 {
8291 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = a */
8292 {0, 0, 0, 0, 0},
8293 {0, 0, 0, 0, 0},
8294 {0, 0, 0, 0, 0}
8295 },
8296 {
8297 UTIL_FORMAT_SWIZZLE_0, /* r */
8298 UTIL_FORMAT_SWIZZLE_0, /* g */
8299 UTIL_FORMAT_SWIZZLE_0, /* b */
8300 UTIL_FORMAT_SWIZZLE_X /* a */
8301 },
8302 UTIL_FORMAT_COLORSPACE_RGB,
8303 };
8304
8305 const struct util_format_description
8306 util_format_i32_sint_description = {
8307 PIPE_FORMAT_I32_SINT,
8308 "PIPE_FORMAT_I32_SINT",
8309 "i32_sint",
8310 {1, 1, 32}, /* block */
8311 UTIL_FORMAT_LAYOUT_PLAIN,
8312 1, /* nr_channels */
8313 TRUE, /* is_array */
8314 TRUE, /* is_bitmask */
8315 FALSE, /* is_mixed */
8316 {
8317 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = rgba */
8318 {0, 0, 0, 0, 0},
8319 {0, 0, 0, 0, 0},
8320 {0, 0, 0, 0, 0}
8321 },
8322 {
8323 UTIL_FORMAT_SWIZZLE_X, /* r */
8324 UTIL_FORMAT_SWIZZLE_X, /* g */
8325 UTIL_FORMAT_SWIZZLE_X, /* b */
8326 UTIL_FORMAT_SWIZZLE_X /* a */
8327 },
8328 UTIL_FORMAT_COLORSPACE_RGB,
8329 };
8330
8331 const struct util_format_description
8332 util_format_l32_sint_description = {
8333 PIPE_FORMAT_L32_SINT,
8334 "PIPE_FORMAT_L32_SINT",
8335 "l32_sint",
8336 {1, 1, 32}, /* block */
8337 UTIL_FORMAT_LAYOUT_PLAIN,
8338 1, /* nr_channels */
8339 TRUE, /* is_array */
8340 TRUE, /* is_bitmask */
8341 FALSE, /* is_mixed */
8342 {
8343 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
8344 {0, 0, 0, 0, 0},
8345 {0, 0, 0, 0, 0},
8346 {0, 0, 0, 0, 0}
8347 },
8348 {
8349 UTIL_FORMAT_SWIZZLE_X, /* r */
8350 UTIL_FORMAT_SWIZZLE_X, /* g */
8351 UTIL_FORMAT_SWIZZLE_X, /* b */
8352 UTIL_FORMAT_SWIZZLE_1 /* a */
8353 },
8354 UTIL_FORMAT_COLORSPACE_RGB,
8355 };
8356
8357 const struct util_format_description
8358 util_format_l32a32_sint_description = {
8359 PIPE_FORMAT_L32A32_SINT,
8360 "PIPE_FORMAT_L32A32_SINT",
8361 "l32a32_sint",
8362 {1, 1, 64}, /* block */
8363 UTIL_FORMAT_LAYOUT_PLAIN,
8364 2, /* nr_channels */
8365 TRUE, /* is_array */
8366 FALSE, /* is_bitmask */
8367 FALSE, /* is_mixed */
8368 #ifdef PIPE_ARCH_BIG_ENDIAN
8369 {
8370 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* x = rgb */
8371 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* y = a */
8372 {0, 0, 0, 0, 0},
8373 {0, 0, 0, 0, 0}
8374 },
8375 #else
8376 {
8377 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = rgb */
8378 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = a */
8379 {0, 0, 0, 0, 0},
8380 {0, 0, 0, 0, 0}
8381 },
8382 #endif
8383 #ifdef PIPE_ARCH_BIG_ENDIAN
8384 {
8385 UTIL_FORMAT_SWIZZLE_X, /* r */
8386 UTIL_FORMAT_SWIZZLE_X, /* g */
8387 UTIL_FORMAT_SWIZZLE_X, /* b */
8388 UTIL_FORMAT_SWIZZLE_Y /* a */
8389 },
8390 #else
8391 {
8392 UTIL_FORMAT_SWIZZLE_X, /* r */
8393 UTIL_FORMAT_SWIZZLE_X, /* g */
8394 UTIL_FORMAT_SWIZZLE_X, /* b */
8395 UTIL_FORMAT_SWIZZLE_Y /* a */
8396 },
8397 #endif
8398 UTIL_FORMAT_COLORSPACE_RGB,
8399 };
8400
8401 const struct util_format_description
8402 util_format_b10g10r10a2_uint_description = {
8403 PIPE_FORMAT_B10G10R10A2_UINT,
8404 "PIPE_FORMAT_B10G10R10A2_UINT",
8405 "b10g10r10a2_uint",
8406 {1, 1, 32}, /* block */
8407 UTIL_FORMAT_LAYOUT_PLAIN,
8408 4, /* nr_channels */
8409 FALSE, /* is_array */
8410 TRUE, /* is_bitmask */
8411 FALSE, /* is_mixed */
8412 #ifdef PIPE_ARCH_BIG_ENDIAN
8413 {
8414 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 2, 30}, /* x = a */
8415 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 20}, /* y = r */
8416 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 10}, /* z = g */
8417 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 0} /* w = b */
8418 },
8419 #else
8420 {
8421 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 0}, /* x = b */
8422 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 10}, /* y = g */
8423 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 20}, /* z = r */
8424 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 2, 30} /* w = a */
8425 },
8426 #endif
8427 #ifdef PIPE_ARCH_BIG_ENDIAN
8428 {
8429 UTIL_FORMAT_SWIZZLE_Y, /* r */
8430 UTIL_FORMAT_SWIZZLE_Z, /* g */
8431 UTIL_FORMAT_SWIZZLE_W, /* b */
8432 UTIL_FORMAT_SWIZZLE_X /* a */
8433 },
8434 #else
8435 {
8436 UTIL_FORMAT_SWIZZLE_Z, /* r */
8437 UTIL_FORMAT_SWIZZLE_Y, /* g */
8438 UTIL_FORMAT_SWIZZLE_X, /* b */
8439 UTIL_FORMAT_SWIZZLE_W /* a */
8440 },
8441 #endif
8442 UTIL_FORMAT_COLORSPACE_RGB,
8443 };
8444
8445 const struct util_format_description
8446 util_format_r8g8b8x8_snorm_description = {
8447 PIPE_FORMAT_R8G8B8X8_SNORM,
8448 "PIPE_FORMAT_R8G8B8X8_SNORM",
8449 "r8g8b8x8_snorm",
8450 {1, 1, 32}, /* block */
8451 UTIL_FORMAT_LAYOUT_PLAIN,
8452 4, /* nr_channels */
8453 TRUE, /* is_array */
8454 TRUE, /* is_bitmask */
8455 FALSE, /* is_mixed */
8456 #ifdef PIPE_ARCH_BIG_ENDIAN
8457 {
8458 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24}, /* x = r */
8459 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* y = g */
8460 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* z = b */
8461 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
8462 },
8463 #else
8464 {
8465 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
8466 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = g */
8467 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = b */
8468 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
8469 },
8470 #endif
8471 #ifdef PIPE_ARCH_BIG_ENDIAN
8472 {
8473 UTIL_FORMAT_SWIZZLE_X, /* r */
8474 UTIL_FORMAT_SWIZZLE_Y, /* g */
8475 UTIL_FORMAT_SWIZZLE_Z, /* b */
8476 UTIL_FORMAT_SWIZZLE_1 /* a */
8477 },
8478 #else
8479 {
8480 UTIL_FORMAT_SWIZZLE_X, /* r */
8481 UTIL_FORMAT_SWIZZLE_Y, /* g */
8482 UTIL_FORMAT_SWIZZLE_Z, /* b */
8483 UTIL_FORMAT_SWIZZLE_1 /* a */
8484 },
8485 #endif
8486 UTIL_FORMAT_COLORSPACE_RGB,
8487 };
8488
8489 const struct util_format_description
8490 util_format_r8g8b8x8_srgb_description = {
8491 PIPE_FORMAT_R8G8B8X8_SRGB,
8492 "PIPE_FORMAT_R8G8B8X8_SRGB",
8493 "r8g8b8x8_srgb",
8494 {1, 1, 32}, /* block */
8495 UTIL_FORMAT_LAYOUT_PLAIN,
8496 4, /* nr_channels */
8497 TRUE, /* is_array */
8498 TRUE, /* is_bitmask */
8499 FALSE, /* is_mixed */
8500 #ifdef PIPE_ARCH_BIG_ENDIAN
8501 {
8502 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 24}, /* x = r */
8503 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* y = g */
8504 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* z = b */
8505 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
8506 },
8507 #else
8508 {
8509 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = r */
8510 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = g */
8511 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 16}, /* z = b */
8512 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
8513 },
8514 #endif
8515 #ifdef PIPE_ARCH_BIG_ENDIAN
8516 {
8517 UTIL_FORMAT_SWIZZLE_X, /* sr */
8518 UTIL_FORMAT_SWIZZLE_Y, /* sg */
8519 UTIL_FORMAT_SWIZZLE_Z, /* sb */
8520 UTIL_FORMAT_SWIZZLE_1 /* a */
8521 },
8522 #else
8523 {
8524 UTIL_FORMAT_SWIZZLE_X, /* sr */
8525 UTIL_FORMAT_SWIZZLE_Y, /* sg */
8526 UTIL_FORMAT_SWIZZLE_Z, /* sb */
8527 UTIL_FORMAT_SWIZZLE_1 /* a */
8528 },
8529 #endif
8530 UTIL_FORMAT_COLORSPACE_SRGB,
8531 };
8532
8533 const struct util_format_description
8534 util_format_r8g8b8x8_uint_description = {
8535 PIPE_FORMAT_R8G8B8X8_UINT,
8536 "PIPE_FORMAT_R8G8B8X8_UINT",
8537 "r8g8b8x8_uint",
8538 {1, 1, 32}, /* block */
8539 UTIL_FORMAT_LAYOUT_PLAIN,
8540 4, /* nr_channels */
8541 TRUE, /* is_array */
8542 TRUE, /* is_bitmask */
8543 FALSE, /* is_mixed */
8544 #ifdef PIPE_ARCH_BIG_ENDIAN
8545 {
8546 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 24}, /* x = r */
8547 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* y = g */
8548 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* z = b */
8549 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
8550 },
8551 #else
8552 {
8553 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
8554 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = g */
8555 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 16}, /* z = b */
8556 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
8557 },
8558 #endif
8559 #ifdef PIPE_ARCH_BIG_ENDIAN
8560 {
8561 UTIL_FORMAT_SWIZZLE_X, /* r */
8562 UTIL_FORMAT_SWIZZLE_Y, /* g */
8563 UTIL_FORMAT_SWIZZLE_Z, /* b */
8564 UTIL_FORMAT_SWIZZLE_1 /* a */
8565 },
8566 #else
8567 {
8568 UTIL_FORMAT_SWIZZLE_X, /* r */
8569 UTIL_FORMAT_SWIZZLE_Y, /* g */
8570 UTIL_FORMAT_SWIZZLE_Z, /* b */
8571 UTIL_FORMAT_SWIZZLE_1 /* a */
8572 },
8573 #endif
8574 UTIL_FORMAT_COLORSPACE_RGB,
8575 };
8576
8577 const struct util_format_description
8578 util_format_r8g8b8x8_sint_description = {
8579 PIPE_FORMAT_R8G8B8X8_SINT,
8580 "PIPE_FORMAT_R8G8B8X8_SINT",
8581 "r8g8b8x8_sint",
8582 {1, 1, 32}, /* block */
8583 UTIL_FORMAT_LAYOUT_PLAIN,
8584 4, /* nr_channels */
8585 TRUE, /* is_array */
8586 TRUE, /* is_bitmask */
8587 FALSE, /* is_mixed */
8588 #ifdef PIPE_ARCH_BIG_ENDIAN
8589 {
8590 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 24}, /* x = r */
8591 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* y = g */
8592 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* z = b */
8593 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0} /* w = x */
8594 },
8595 #else
8596 {
8597 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
8598 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = g */
8599 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 16}, /* z = b */
8600 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24} /* w = x */
8601 },
8602 #endif
8603 #ifdef PIPE_ARCH_BIG_ENDIAN
8604 {
8605 UTIL_FORMAT_SWIZZLE_X, /* r */
8606 UTIL_FORMAT_SWIZZLE_Y, /* g */
8607 UTIL_FORMAT_SWIZZLE_Z, /* b */
8608 UTIL_FORMAT_SWIZZLE_1 /* a */
8609 },
8610 #else
8611 {
8612 UTIL_FORMAT_SWIZZLE_X, /* r */
8613 UTIL_FORMAT_SWIZZLE_Y, /* g */
8614 UTIL_FORMAT_SWIZZLE_Z, /* b */
8615 UTIL_FORMAT_SWIZZLE_1 /* a */
8616 },
8617 #endif
8618 UTIL_FORMAT_COLORSPACE_RGB,
8619 };
8620
8621 const struct util_format_description
8622 util_format_b10g10r10x2_unorm_description = {
8623 PIPE_FORMAT_B10G10R10X2_UNORM,
8624 "PIPE_FORMAT_B10G10R10X2_UNORM",
8625 "b10g10r10x2_unorm",
8626 {1, 1, 32}, /* block */
8627 UTIL_FORMAT_LAYOUT_PLAIN,
8628 4, /* nr_channels */
8629 FALSE, /* is_array */
8630 TRUE, /* is_bitmask */
8631 FALSE, /* is_mixed */
8632 #ifdef PIPE_ARCH_BIG_ENDIAN
8633 {
8634 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30}, /* x = x */
8635 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* y = r */
8636 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* z = g */
8637 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0} /* w = b */
8638 },
8639 #else
8640 {
8641 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 0}, /* x = b */
8642 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 10}, /* y = g */
8643 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10, 20}, /* z = r */
8644 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2, 30} /* w = x */
8645 },
8646 #endif
8647 #ifdef PIPE_ARCH_BIG_ENDIAN
8648 {
8649 UTIL_FORMAT_SWIZZLE_Y, /* r */
8650 UTIL_FORMAT_SWIZZLE_Z, /* g */
8651 UTIL_FORMAT_SWIZZLE_W, /* b */
8652 UTIL_FORMAT_SWIZZLE_1 /* a */
8653 },
8654 #else
8655 {
8656 UTIL_FORMAT_SWIZZLE_Z, /* r */
8657 UTIL_FORMAT_SWIZZLE_Y, /* g */
8658 UTIL_FORMAT_SWIZZLE_X, /* b */
8659 UTIL_FORMAT_SWIZZLE_1 /* a */
8660 },
8661 #endif
8662 UTIL_FORMAT_COLORSPACE_RGB,
8663 };
8664
8665 const struct util_format_description
8666 util_format_r16g16b16x16_unorm_description = {
8667 PIPE_FORMAT_R16G16B16X16_UNORM,
8668 "PIPE_FORMAT_R16G16B16X16_UNORM",
8669 "r16g16b16x16_unorm",
8670 {1, 1, 64}, /* block */
8671 UTIL_FORMAT_LAYOUT_PLAIN,
8672 4, /* nr_channels */
8673 TRUE, /* is_array */
8674 FALSE, /* is_bitmask */
8675 FALSE, /* is_mixed */
8676 #ifdef PIPE_ARCH_BIG_ENDIAN
8677 {
8678 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 48}, /* x = r */
8679 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* y = g */
8680 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* z = b */
8681 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 0} /* w = x */
8682 },
8683 #else
8684 {
8685 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
8686 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = g */
8687 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 32}, /* z = b */
8688 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
8689 },
8690 #endif
8691 #ifdef PIPE_ARCH_BIG_ENDIAN
8692 {
8693 UTIL_FORMAT_SWIZZLE_X, /* r */
8694 UTIL_FORMAT_SWIZZLE_Y, /* g */
8695 UTIL_FORMAT_SWIZZLE_Z, /* b */
8696 UTIL_FORMAT_SWIZZLE_1 /* a */
8697 },
8698 #else
8699 {
8700 UTIL_FORMAT_SWIZZLE_X, /* r */
8701 UTIL_FORMAT_SWIZZLE_Y, /* g */
8702 UTIL_FORMAT_SWIZZLE_Z, /* b */
8703 UTIL_FORMAT_SWIZZLE_1 /* a */
8704 },
8705 #endif
8706 UTIL_FORMAT_COLORSPACE_RGB,
8707 };
8708
8709 const struct util_format_description
8710 util_format_r16g16b16x16_snorm_description = {
8711 PIPE_FORMAT_R16G16B16X16_SNORM,
8712 "PIPE_FORMAT_R16G16B16X16_SNORM",
8713 "r16g16b16x16_snorm",
8714 {1, 1, 64}, /* block */
8715 UTIL_FORMAT_LAYOUT_PLAIN,
8716 4, /* nr_channels */
8717 TRUE, /* is_array */
8718 FALSE, /* is_bitmask */
8719 FALSE, /* is_mixed */
8720 #ifdef PIPE_ARCH_BIG_ENDIAN
8721 {
8722 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 48}, /* x = r */
8723 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* y = g */
8724 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* z = b */
8725 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 0} /* w = x */
8726 },
8727 #else
8728 {
8729 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
8730 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = g */
8731 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 32}, /* z = b */
8732 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
8733 },
8734 #endif
8735 #ifdef PIPE_ARCH_BIG_ENDIAN
8736 {
8737 UTIL_FORMAT_SWIZZLE_X, /* r */
8738 UTIL_FORMAT_SWIZZLE_Y, /* g */
8739 UTIL_FORMAT_SWIZZLE_Z, /* b */
8740 UTIL_FORMAT_SWIZZLE_1 /* a */
8741 },
8742 #else
8743 {
8744 UTIL_FORMAT_SWIZZLE_X, /* r */
8745 UTIL_FORMAT_SWIZZLE_Y, /* g */
8746 UTIL_FORMAT_SWIZZLE_Z, /* b */
8747 UTIL_FORMAT_SWIZZLE_1 /* a */
8748 },
8749 #endif
8750 UTIL_FORMAT_COLORSPACE_RGB,
8751 };
8752
8753 const struct util_format_description
8754 util_format_r16g16b16x16_float_description = {
8755 PIPE_FORMAT_R16G16B16X16_FLOAT,
8756 "PIPE_FORMAT_R16G16B16X16_FLOAT",
8757 "r16g16b16x16_float",
8758 {1, 1, 64}, /* block */
8759 UTIL_FORMAT_LAYOUT_PLAIN,
8760 4, /* nr_channels */
8761 TRUE, /* is_array */
8762 FALSE, /* is_bitmask */
8763 FALSE, /* is_mixed */
8764 #ifdef PIPE_ARCH_BIG_ENDIAN
8765 {
8766 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 48}, /* x = r */
8767 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* y = g */
8768 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* z = b */
8769 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 0} /* w = x */
8770 },
8771 #else
8772 {
8773 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
8774 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = g */
8775 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 32}, /* z = b */
8776 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
8777 },
8778 #endif
8779 #ifdef PIPE_ARCH_BIG_ENDIAN
8780 {
8781 UTIL_FORMAT_SWIZZLE_X, /* r */
8782 UTIL_FORMAT_SWIZZLE_Y, /* g */
8783 UTIL_FORMAT_SWIZZLE_Z, /* b */
8784 UTIL_FORMAT_SWIZZLE_1 /* a */
8785 },
8786 #else
8787 {
8788 UTIL_FORMAT_SWIZZLE_X, /* r */
8789 UTIL_FORMAT_SWIZZLE_Y, /* g */
8790 UTIL_FORMAT_SWIZZLE_Z, /* b */
8791 UTIL_FORMAT_SWIZZLE_1 /* a */
8792 },
8793 #endif
8794 UTIL_FORMAT_COLORSPACE_RGB,
8795 };
8796
8797 const struct util_format_description
8798 util_format_r16g16b16x16_uint_description = {
8799 PIPE_FORMAT_R16G16B16X16_UINT,
8800 "PIPE_FORMAT_R16G16B16X16_UINT",
8801 "r16g16b16x16_uint",
8802 {1, 1, 64}, /* block */
8803 UTIL_FORMAT_LAYOUT_PLAIN,
8804 4, /* nr_channels */
8805 TRUE, /* is_array */
8806 FALSE, /* is_bitmask */
8807 FALSE, /* is_mixed */
8808 #ifdef PIPE_ARCH_BIG_ENDIAN
8809 {
8810 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 48}, /* x = r */
8811 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* y = g */
8812 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* z = b */
8813 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 0} /* w = x */
8814 },
8815 #else
8816 {
8817 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
8818 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = g */
8819 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 32}, /* z = b */
8820 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
8821 },
8822 #endif
8823 #ifdef PIPE_ARCH_BIG_ENDIAN
8824 {
8825 UTIL_FORMAT_SWIZZLE_X, /* r */
8826 UTIL_FORMAT_SWIZZLE_Y, /* g */
8827 UTIL_FORMAT_SWIZZLE_Z, /* b */
8828 UTIL_FORMAT_SWIZZLE_1 /* a */
8829 },
8830 #else
8831 {
8832 UTIL_FORMAT_SWIZZLE_X, /* r */
8833 UTIL_FORMAT_SWIZZLE_Y, /* g */
8834 UTIL_FORMAT_SWIZZLE_Z, /* b */
8835 UTIL_FORMAT_SWIZZLE_1 /* a */
8836 },
8837 #endif
8838 UTIL_FORMAT_COLORSPACE_RGB,
8839 };
8840
8841 const struct util_format_description
8842 util_format_r16g16b16x16_sint_description = {
8843 PIPE_FORMAT_R16G16B16X16_SINT,
8844 "PIPE_FORMAT_R16G16B16X16_SINT",
8845 "r16g16b16x16_sint",
8846 {1, 1, 64}, /* block */
8847 UTIL_FORMAT_LAYOUT_PLAIN,
8848 4, /* nr_channels */
8849 TRUE, /* is_array */
8850 FALSE, /* is_bitmask */
8851 FALSE, /* is_mixed */
8852 #ifdef PIPE_ARCH_BIG_ENDIAN
8853 {
8854 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 48}, /* x = r */
8855 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* y = g */
8856 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* z = b */
8857 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 0} /* w = x */
8858 },
8859 #else
8860 {
8861 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
8862 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = g */
8863 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 32}, /* z = b */
8864 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 16, 48} /* w = x */
8865 },
8866 #endif
8867 #ifdef PIPE_ARCH_BIG_ENDIAN
8868 {
8869 UTIL_FORMAT_SWIZZLE_X, /* r */
8870 UTIL_FORMAT_SWIZZLE_Y, /* g */
8871 UTIL_FORMAT_SWIZZLE_Z, /* b */
8872 UTIL_FORMAT_SWIZZLE_1 /* a */
8873 },
8874 #else
8875 {
8876 UTIL_FORMAT_SWIZZLE_X, /* r */
8877 UTIL_FORMAT_SWIZZLE_Y, /* g */
8878 UTIL_FORMAT_SWIZZLE_Z, /* b */
8879 UTIL_FORMAT_SWIZZLE_1 /* a */
8880 },
8881 #endif
8882 UTIL_FORMAT_COLORSPACE_RGB,
8883 };
8884
8885 const struct util_format_description
8886 util_format_r32g32b32x32_float_description = {
8887 PIPE_FORMAT_R32G32B32X32_FLOAT,
8888 "PIPE_FORMAT_R32G32B32X32_FLOAT",
8889 "r32g32b32x32_float",
8890 {1, 1, 128}, /* block */
8891 UTIL_FORMAT_LAYOUT_PLAIN,
8892 4, /* nr_channels */
8893 TRUE, /* is_array */
8894 FALSE, /* is_bitmask */
8895 FALSE, /* is_mixed */
8896 #ifdef PIPE_ARCH_BIG_ENDIAN
8897 {
8898 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 96}, /* x = r */
8899 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* y = g */
8900 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* z = b */
8901 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0} /* w = x */
8902 },
8903 #else
8904 {
8905 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
8906 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = g */
8907 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 64}, /* z = b */
8908 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 96} /* w = x */
8909 },
8910 #endif
8911 #ifdef PIPE_ARCH_BIG_ENDIAN
8912 {
8913 UTIL_FORMAT_SWIZZLE_X, /* r */
8914 UTIL_FORMAT_SWIZZLE_Y, /* g */
8915 UTIL_FORMAT_SWIZZLE_Z, /* b */
8916 UTIL_FORMAT_SWIZZLE_1 /* a */
8917 },
8918 #else
8919 {
8920 UTIL_FORMAT_SWIZZLE_X, /* r */
8921 UTIL_FORMAT_SWIZZLE_Y, /* g */
8922 UTIL_FORMAT_SWIZZLE_Z, /* b */
8923 UTIL_FORMAT_SWIZZLE_1 /* a */
8924 },
8925 #endif
8926 UTIL_FORMAT_COLORSPACE_RGB,
8927 };
8928
8929 const struct util_format_description
8930 util_format_r32g32b32x32_uint_description = {
8931 PIPE_FORMAT_R32G32B32X32_UINT,
8932 "PIPE_FORMAT_R32G32B32X32_UINT",
8933 "r32g32b32x32_uint",
8934 {1, 1, 128}, /* block */
8935 UTIL_FORMAT_LAYOUT_PLAIN,
8936 4, /* nr_channels */
8937 TRUE, /* is_array */
8938 FALSE, /* is_bitmask */
8939 FALSE, /* is_mixed */
8940 #ifdef PIPE_ARCH_BIG_ENDIAN
8941 {
8942 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 96}, /* x = r */
8943 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* y = g */
8944 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* z = b */
8945 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0} /* w = x */
8946 },
8947 #else
8948 {
8949 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
8950 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = g */
8951 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 64}, /* z = b */
8952 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 96} /* w = x */
8953 },
8954 #endif
8955 #ifdef PIPE_ARCH_BIG_ENDIAN
8956 {
8957 UTIL_FORMAT_SWIZZLE_X, /* r */
8958 UTIL_FORMAT_SWIZZLE_Y, /* g */
8959 UTIL_FORMAT_SWIZZLE_Z, /* b */
8960 UTIL_FORMAT_SWIZZLE_1 /* a */
8961 },
8962 #else
8963 {
8964 UTIL_FORMAT_SWIZZLE_X, /* r */
8965 UTIL_FORMAT_SWIZZLE_Y, /* g */
8966 UTIL_FORMAT_SWIZZLE_Z, /* b */
8967 UTIL_FORMAT_SWIZZLE_1 /* a */
8968 },
8969 #endif
8970 UTIL_FORMAT_COLORSPACE_RGB,
8971 };
8972
8973 const struct util_format_description
8974 util_format_r32g32b32x32_sint_description = {
8975 PIPE_FORMAT_R32G32B32X32_SINT,
8976 "PIPE_FORMAT_R32G32B32X32_SINT",
8977 "r32g32b32x32_sint",
8978 {1, 1, 128}, /* block */
8979 UTIL_FORMAT_LAYOUT_PLAIN,
8980 4, /* nr_channels */
8981 TRUE, /* is_array */
8982 FALSE, /* is_bitmask */
8983 FALSE, /* is_mixed */
8984 #ifdef PIPE_ARCH_BIG_ENDIAN
8985 {
8986 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 96}, /* x = r */
8987 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* y = g */
8988 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* z = b */
8989 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 0} /* w = x */
8990 },
8991 #else
8992 {
8993 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
8994 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = g */
8995 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 64}, /* z = b */
8996 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32, 96} /* w = x */
8997 },
8998 #endif
8999 #ifdef PIPE_ARCH_BIG_ENDIAN
9000 {
9001 UTIL_FORMAT_SWIZZLE_X, /* r */
9002 UTIL_FORMAT_SWIZZLE_Y, /* g */
9003 UTIL_FORMAT_SWIZZLE_Z, /* b */
9004 UTIL_FORMAT_SWIZZLE_1 /* a */
9005 },
9006 #else
9007 {
9008 UTIL_FORMAT_SWIZZLE_X, /* r */
9009 UTIL_FORMAT_SWIZZLE_Y, /* g */
9010 UTIL_FORMAT_SWIZZLE_Z, /* b */
9011 UTIL_FORMAT_SWIZZLE_1 /* a */
9012 },
9013 #endif
9014 UTIL_FORMAT_COLORSPACE_RGB,
9015 };
9016
9017 const struct util_format_description
9018 util_format_r8a8_snorm_description = {
9019 PIPE_FORMAT_R8A8_SNORM,
9020 "PIPE_FORMAT_R8A8_SNORM",
9021 "r8a8_snorm",
9022 {1, 1, 16}, /* block */
9023 UTIL_FORMAT_LAYOUT_PLAIN,
9024 2, /* nr_channels */
9025 TRUE, /* is_array */
9026 TRUE, /* is_bitmask */
9027 FALSE, /* is_mixed */
9028 #ifdef PIPE_ARCH_BIG_ENDIAN
9029 {
9030 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* x = r */
9031 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* y = a */
9032 {0, 0, 0, 0, 0},
9033 {0, 0, 0, 0, 0}
9034 },
9035 #else
9036 {
9037 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = r */
9038 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = a */
9039 {0, 0, 0, 0, 0},
9040 {0, 0, 0, 0, 0}
9041 },
9042 #endif
9043 #ifdef PIPE_ARCH_BIG_ENDIAN
9044 {
9045 UTIL_FORMAT_SWIZZLE_X, /* r */
9046 UTIL_FORMAT_SWIZZLE_0, /* g */
9047 UTIL_FORMAT_SWIZZLE_0, /* b */
9048 UTIL_FORMAT_SWIZZLE_Y /* a */
9049 },
9050 #else
9051 {
9052 UTIL_FORMAT_SWIZZLE_X, /* r */
9053 UTIL_FORMAT_SWIZZLE_0, /* g */
9054 UTIL_FORMAT_SWIZZLE_0, /* b */
9055 UTIL_FORMAT_SWIZZLE_Y /* a */
9056 },
9057 #endif
9058 UTIL_FORMAT_COLORSPACE_RGB,
9059 };
9060
9061 const struct util_format_description
9062 util_format_r16a16_unorm_description = {
9063 PIPE_FORMAT_R16A16_UNORM,
9064 "PIPE_FORMAT_R16A16_UNORM",
9065 "r16a16_unorm",
9066 {1, 1, 32}, /* block */
9067 UTIL_FORMAT_LAYOUT_PLAIN,
9068 2, /* nr_channels */
9069 TRUE, /* is_array */
9070 TRUE, /* is_bitmask */
9071 FALSE, /* is_mixed */
9072 #ifdef PIPE_ARCH_BIG_ENDIAN
9073 {
9074 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* x = r */
9075 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* y = a */
9076 {0, 0, 0, 0, 0},
9077 {0, 0, 0, 0, 0}
9078 },
9079 #else
9080 {
9081 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = r */
9082 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = a */
9083 {0, 0, 0, 0, 0},
9084 {0, 0, 0, 0, 0}
9085 },
9086 #endif
9087 #ifdef PIPE_ARCH_BIG_ENDIAN
9088 {
9089 UTIL_FORMAT_SWIZZLE_X, /* r */
9090 UTIL_FORMAT_SWIZZLE_0, /* g */
9091 UTIL_FORMAT_SWIZZLE_0, /* b */
9092 UTIL_FORMAT_SWIZZLE_Y /* a */
9093 },
9094 #else
9095 {
9096 UTIL_FORMAT_SWIZZLE_X, /* r */
9097 UTIL_FORMAT_SWIZZLE_0, /* g */
9098 UTIL_FORMAT_SWIZZLE_0, /* b */
9099 UTIL_FORMAT_SWIZZLE_Y /* a */
9100 },
9101 #endif
9102 UTIL_FORMAT_COLORSPACE_RGB,
9103 };
9104
9105 const struct util_format_description
9106 util_format_r16a16_snorm_description = {
9107 PIPE_FORMAT_R16A16_SNORM,
9108 "PIPE_FORMAT_R16A16_SNORM",
9109 "r16a16_snorm",
9110 {1, 1, 32}, /* block */
9111 UTIL_FORMAT_LAYOUT_PLAIN,
9112 2, /* nr_channels */
9113 TRUE, /* is_array */
9114 TRUE, /* is_bitmask */
9115 FALSE, /* is_mixed */
9116 #ifdef PIPE_ARCH_BIG_ENDIAN
9117 {
9118 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* x = r */
9119 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* y = a */
9120 {0, 0, 0, 0, 0},
9121 {0, 0, 0, 0, 0}
9122 },
9123 #else
9124 {
9125 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = r */
9126 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = a */
9127 {0, 0, 0, 0, 0},
9128 {0, 0, 0, 0, 0}
9129 },
9130 #endif
9131 #ifdef PIPE_ARCH_BIG_ENDIAN
9132 {
9133 UTIL_FORMAT_SWIZZLE_X, /* r */
9134 UTIL_FORMAT_SWIZZLE_0, /* g */
9135 UTIL_FORMAT_SWIZZLE_0, /* b */
9136 UTIL_FORMAT_SWIZZLE_Y /* a */
9137 },
9138 #else
9139 {
9140 UTIL_FORMAT_SWIZZLE_X, /* r */
9141 UTIL_FORMAT_SWIZZLE_0, /* g */
9142 UTIL_FORMAT_SWIZZLE_0, /* b */
9143 UTIL_FORMAT_SWIZZLE_Y /* a */
9144 },
9145 #endif
9146 UTIL_FORMAT_COLORSPACE_RGB,
9147 };
9148
9149 const struct util_format_description
9150 util_format_r16a16_float_description = {
9151 PIPE_FORMAT_R16A16_FLOAT,
9152 "PIPE_FORMAT_R16A16_FLOAT",
9153 "r16a16_float",
9154 {1, 1, 32}, /* block */
9155 UTIL_FORMAT_LAYOUT_PLAIN,
9156 2, /* nr_channels */
9157 TRUE, /* is_array */
9158 FALSE, /* is_bitmask */
9159 FALSE, /* is_mixed */
9160 #ifdef PIPE_ARCH_BIG_ENDIAN
9161 {
9162 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* x = r */
9163 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* y = a */
9164 {0, 0, 0, 0, 0},
9165 {0, 0, 0, 0, 0}
9166 },
9167 #else
9168 {
9169 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 0}, /* x = r */
9170 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16, 16}, /* y = a */
9171 {0, 0, 0, 0, 0},
9172 {0, 0, 0, 0, 0}
9173 },
9174 #endif
9175 #ifdef PIPE_ARCH_BIG_ENDIAN
9176 {
9177 UTIL_FORMAT_SWIZZLE_X, /* r */
9178 UTIL_FORMAT_SWIZZLE_0, /* g */
9179 UTIL_FORMAT_SWIZZLE_0, /* b */
9180 UTIL_FORMAT_SWIZZLE_Y /* a */
9181 },
9182 #else
9183 {
9184 UTIL_FORMAT_SWIZZLE_X, /* r */
9185 UTIL_FORMAT_SWIZZLE_0, /* g */
9186 UTIL_FORMAT_SWIZZLE_0, /* b */
9187 UTIL_FORMAT_SWIZZLE_Y /* a */
9188 },
9189 #endif
9190 UTIL_FORMAT_COLORSPACE_RGB,
9191 };
9192
9193 const struct util_format_description
9194 util_format_r32a32_float_description = {
9195 PIPE_FORMAT_R32A32_FLOAT,
9196 "PIPE_FORMAT_R32A32_FLOAT",
9197 "r32a32_float",
9198 {1, 1, 64}, /* block */
9199 UTIL_FORMAT_LAYOUT_PLAIN,
9200 2, /* nr_channels */
9201 TRUE, /* is_array */
9202 FALSE, /* is_bitmask */
9203 FALSE, /* is_mixed */
9204 #ifdef PIPE_ARCH_BIG_ENDIAN
9205 {
9206 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* x = r */
9207 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* y = a */
9208 {0, 0, 0, 0, 0},
9209 {0, 0, 0, 0, 0}
9210 },
9211 #else
9212 {
9213 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 0}, /* x = r */
9214 {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32, 32}, /* y = a */
9215 {0, 0, 0, 0, 0},
9216 {0, 0, 0, 0, 0}
9217 },
9218 #endif
9219 #ifdef PIPE_ARCH_BIG_ENDIAN
9220 {
9221 UTIL_FORMAT_SWIZZLE_X, /* r */
9222 UTIL_FORMAT_SWIZZLE_0, /* g */
9223 UTIL_FORMAT_SWIZZLE_0, /* b */
9224 UTIL_FORMAT_SWIZZLE_Y /* a */
9225 },
9226 #else
9227 {
9228 UTIL_FORMAT_SWIZZLE_X, /* r */
9229 UTIL_FORMAT_SWIZZLE_0, /* g */
9230 UTIL_FORMAT_SWIZZLE_0, /* b */
9231 UTIL_FORMAT_SWIZZLE_Y /* a */
9232 },
9233 #endif
9234 UTIL_FORMAT_COLORSPACE_RGB,
9235 };
9236
9237 const struct util_format_description
9238 util_format_r8a8_uint_description = {
9239 PIPE_FORMAT_R8A8_UINT,
9240 "PIPE_FORMAT_R8A8_UINT",
9241 "r8a8_uint",
9242 {1, 1, 16}, /* block */
9243 UTIL_FORMAT_LAYOUT_PLAIN,
9244 2, /* nr_channels */
9245 TRUE, /* is_array */
9246 TRUE, /* is_bitmask */
9247 FALSE, /* is_mixed */
9248 #ifdef PIPE_ARCH_BIG_ENDIAN
9249 {
9250 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* x = r */
9251 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* y = a */
9252 {0, 0, 0, 0, 0},
9253 {0, 0, 0, 0, 0}
9254 },
9255 #else
9256 {
9257 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 0}, /* x = r */
9258 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8, 8}, /* y = a */
9259 {0, 0, 0, 0, 0},
9260 {0, 0, 0, 0, 0}
9261 },
9262 #endif
9263 #ifdef PIPE_ARCH_BIG_ENDIAN
9264 {
9265 UTIL_FORMAT_SWIZZLE_X, /* r */
9266 UTIL_FORMAT_SWIZZLE_0, /* g */
9267 UTIL_FORMAT_SWIZZLE_0, /* b */
9268 UTIL_FORMAT_SWIZZLE_Y /* a */
9269 },
9270 #else
9271 {
9272 UTIL_FORMAT_SWIZZLE_X, /* r */
9273 UTIL_FORMAT_SWIZZLE_0, /* g */
9274 UTIL_FORMAT_SWIZZLE_0, /* b */
9275 UTIL_FORMAT_SWIZZLE_Y /* a */
9276 },
9277 #endif
9278 UTIL_FORMAT_COLORSPACE_RGB,
9279 };
9280
9281 const struct util_format_description
9282 util_format_r8a8_sint_description = {
9283 PIPE_FORMAT_R8A8_SINT,
9284 "PIPE_FORMAT_R8A8_SINT",
9285 "r8a8_sint",
9286 {1, 1, 16}, /* block */
9287 UTIL_FORMAT_LAYOUT_PLAIN,
9288 2, /* nr_channels */
9289 TRUE, /* is_array */
9290 TRUE, /* is_bitmask */
9291 FALSE, /* is_mixed */
9292 #ifdef PIPE_ARCH_BIG_ENDIAN
9293 {
9294 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* x = r */
9295 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* y = a */
9296 {0, 0, 0, 0, 0},
9297 {0, 0, 0, 0, 0}
9298 },
9299 #else
9300 {
9301 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 0}, /* x = r */
9302 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8, 8}, /* y = a */
9303 {0, 0, 0, 0, 0},
9304 {0, 0, 0, 0, 0}
9305 },
9306 #endif
9307 #ifdef PIPE_ARCH_BIG_ENDIAN
9308 {
9309 UTIL_FORMAT_SWIZZLE_X, /* r */
9310 UTIL_FORMAT_SWIZZLE_0, /* g */
9311 UTIL_FORMAT_SWIZZLE_0, /* b */
9312 UTIL_FORMAT_SWIZZLE_Y /* a */
9313 },
9314 #else
9315 {
9316 UTIL_FORMAT_SWIZZLE_X, /* r */
9317 UTIL_FORMAT_SWIZZLE_0, /* g */
9318 UTIL_FORMAT_SWIZZLE_0, /* b */
9319 UTIL_FORMAT_SWIZZLE_Y /* a */
9320 },
9321 #endif
9322 UTIL_FORMAT_COLORSPACE_RGB,
9323 };
9324
9325 const struct util_format_description
9326 util_format_r16a16_uint_description = {
9327 PIPE_FORMAT_R16A16_UINT,
9328 "PIPE_FORMAT_R16A16_UINT",
9329 "r16a16_uint",
9330 {1, 1, 32}, /* block */
9331 UTIL_FORMAT_LAYOUT_PLAIN,
9332 2, /* nr_channels */
9333 TRUE, /* is_array */
9334 TRUE, /* is_bitmask */
9335 FALSE, /* is_mixed */
9336 #ifdef PIPE_ARCH_BIG_ENDIAN
9337 {
9338 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* x = r */
9339 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* y = a */
9340 {0, 0, 0, 0, 0},
9341 {0, 0, 0, 0, 0}
9342 },
9343 #else
9344 {
9345 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 0}, /* x = r */
9346 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16, 16}, /* y = a */
9347 {0, 0, 0, 0, 0},
9348 {0, 0, 0, 0, 0}
9349 },
9350 #endif
9351 #ifdef PIPE_ARCH_BIG_ENDIAN
9352 {
9353 UTIL_FORMAT_SWIZZLE_X, /* r */
9354 UTIL_FORMAT_SWIZZLE_0, /* g */
9355 UTIL_FORMAT_SWIZZLE_0, /* b */
9356 UTIL_FORMAT_SWIZZLE_Y /* a */
9357 },
9358 #else
9359 {
9360 UTIL_FORMAT_SWIZZLE_X, /* r */
9361 UTIL_FORMAT_SWIZZLE_0, /* g */
9362 UTIL_FORMAT_SWIZZLE_0, /* b */
9363 UTIL_FORMAT_SWIZZLE_Y /* a */
9364 },
9365 #endif
9366 UTIL_FORMAT_COLORSPACE_RGB,
9367 };
9368
9369 const struct util_format_description
9370 util_format_r16a16_sint_description = {
9371 PIPE_FORMAT_R16A16_SINT,
9372 "PIPE_FORMAT_R16A16_SINT",
9373 "r16a16_sint",
9374 {1, 1, 32}, /* block */
9375 UTIL_FORMAT_LAYOUT_PLAIN,
9376 2, /* nr_channels */
9377 TRUE, /* is_array */
9378 TRUE, /* is_bitmask */
9379 FALSE, /* is_mixed */
9380 #ifdef PIPE_ARCH_BIG_ENDIAN
9381 {
9382 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* x = r */
9383 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* y = a */
9384 {0, 0, 0, 0, 0},
9385 {0, 0, 0, 0, 0}
9386 },
9387 #else
9388 {
9389 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 0}, /* x = r */
9390 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16, 16}, /* y = a */
9391 {0, 0, 0, 0, 0},
9392 {0, 0, 0, 0, 0}
9393 },
9394 #endif
9395 #ifdef PIPE_ARCH_BIG_ENDIAN
9396 {
9397 UTIL_FORMAT_SWIZZLE_X, /* r */
9398 UTIL_FORMAT_SWIZZLE_0, /* g */
9399 UTIL_FORMAT_SWIZZLE_0, /* b */
9400 UTIL_FORMAT_SWIZZLE_Y /* a */
9401 },
9402 #else
9403 {
9404 UTIL_FORMAT_SWIZZLE_X, /* r */
9405 UTIL_FORMAT_SWIZZLE_0, /* g */
9406 UTIL_FORMAT_SWIZZLE_0, /* b */
9407 UTIL_FORMAT_SWIZZLE_Y /* a */
9408 },
9409 #endif
9410 UTIL_FORMAT_COLORSPACE_RGB,
9411 };
9412
9413 const struct util_format_description
9414 util_format_r32a32_uint_description = {
9415 PIPE_FORMAT_R32A32_UINT,
9416 "PIPE_FORMAT_R32A32_UINT",
9417 "r32a32_uint",
9418 {1, 1, 64}, /* block */
9419 UTIL_FORMAT_LAYOUT_PLAIN,
9420 2, /* nr_channels */
9421 TRUE, /* is_array */
9422 FALSE, /* is_bitmask */
9423 FALSE, /* is_mixed */
9424 #ifdef PIPE_ARCH_BIG_ENDIAN
9425 {
9426 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* x = r */
9427 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* y = a */
9428 {0, 0, 0, 0, 0},
9429 {0, 0, 0, 0, 0}
9430 },
9431 #else
9432 {
9433 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 0}, /* x = r */
9434 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32, 32}, /* y = a */
9435 {0, 0, 0, 0, 0},
9436 {0, 0, 0, 0, 0}
9437 },
9438 #endif
9439 #ifdef PIPE_ARCH_BIG_ENDIAN
9440 {
9441 UTIL_FORMAT_SWIZZLE_X, /* r */
9442 UTIL_FORMAT_SWIZZLE_0, /* g */
9443 UTIL_FORMAT_SWIZZLE_0, /* b */
9444 UTIL_FORMAT_SWIZZLE_Y /* a */
9445 },
9446 #else
9447 {
9448 UTIL_FORMAT_SWIZZLE_X, /* r */
9449 UTIL_FORMAT_SWIZZLE_0, /* g */
9450 UTIL_FORMAT_SWIZZLE_0, /* b */
9451 UTIL_FORMAT_SWIZZLE_Y /* a */
9452 },
9453 #endif
9454 UTIL_FORMAT_COLORSPACE_RGB,
9455 };
9456
9457 const struct util_format_description
9458 util_format_r32a32_sint_description = {
9459 PIPE_FORMAT_R32A32_SINT,
9460 "PIPE_FORMAT_R32A32_SINT",
9461 "r32a32_sint",
9462 {1, 1, 64}, /* block */
9463 UTIL_FORMAT_LAYOUT_PLAIN,
9464 2, /* nr_channels */
9465 TRUE, /* is_array */
9466 FALSE, /* is_bitmask */
9467 FALSE, /* is_mixed */
9468 #ifdef PIPE_ARCH_BIG_ENDIAN
9469 {
9470 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* x = r */
9471 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* y = a */
9472 {0, 0, 0, 0, 0},
9473 {0, 0, 0, 0, 0}
9474 },
9475 #else
9476 {
9477 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 0}, /* x = r */
9478 {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32, 32}, /* y = a */
9479 {0, 0, 0, 0, 0},
9480 {0, 0, 0, 0, 0}
9481 },
9482 #endif
9483 #ifdef PIPE_ARCH_BIG_ENDIAN
9484 {
9485 UTIL_FORMAT_SWIZZLE_X, /* r */
9486 UTIL_FORMAT_SWIZZLE_0, /* g */
9487 UTIL_FORMAT_SWIZZLE_0, /* b */
9488 UTIL_FORMAT_SWIZZLE_Y /* a */
9489 },
9490 #else
9491 {
9492 UTIL_FORMAT_SWIZZLE_X, /* r */
9493 UTIL_FORMAT_SWIZZLE_0, /* g */
9494 UTIL_FORMAT_SWIZZLE_0, /* b */
9495 UTIL_FORMAT_SWIZZLE_Y /* a */
9496 },
9497 #endif
9498 UTIL_FORMAT_COLORSPACE_RGB,
9499 };
9500
9501 const struct util_format_description
9502 util_format_r10g10b10a2_uint_description = {
9503 PIPE_FORMAT_R10G10B10A2_UINT,
9504 "PIPE_FORMAT_R10G10B10A2_UINT",
9505 "r10g10b10a2_uint",
9506 {1, 1, 32}, /* block */
9507 UTIL_FORMAT_LAYOUT_PLAIN,
9508 4, /* nr_channels */
9509 FALSE, /* is_array */
9510 TRUE, /* is_bitmask */
9511 FALSE, /* is_mixed */
9512 #ifdef PIPE_ARCH_BIG_ENDIAN
9513 {
9514 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 2, 30}, /* x = a */
9515 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 20}, /* y = b */
9516 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 10}, /* z = g */
9517 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 0} /* w = r */
9518 },
9519 #else
9520 {
9521 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 0}, /* x = r */
9522 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 10}, /* y = g */
9523 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10, 20}, /* z = b */
9524 {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 2, 30} /* w = a */
9525 },
9526 #endif
9527 #ifdef PIPE_ARCH_BIG_ENDIAN
9528 {
9529 UTIL_FORMAT_SWIZZLE_W, /* r */
9530 UTIL_FORMAT_SWIZZLE_Z, /* g */
9531 UTIL_FORMAT_SWIZZLE_Y, /* b */
9532 UTIL_FORMAT_SWIZZLE_X /* a */
9533 },
9534 #else
9535 {
9536 UTIL_FORMAT_SWIZZLE_X, /* r */
9537 UTIL_FORMAT_SWIZZLE_Y, /* g */
9538 UTIL_FORMAT_SWIZZLE_Z, /* b */
9539 UTIL_FORMAT_SWIZZLE_W /* a */
9540 },
9541 #endif
9542 UTIL_FORMAT_COLORSPACE_RGB,
9543 };
9544
9545 const struct util_format_description
9546 util_format_b5g6r5_srgb_description = {
9547 PIPE_FORMAT_B5G6R5_SRGB,
9548 "PIPE_FORMAT_B5G6R5_SRGB",
9549 "b5g6r5_srgb",
9550 {1, 1, 16}, /* block */
9551 UTIL_FORMAT_LAYOUT_PLAIN,
9552 3, /* nr_channels */
9553 FALSE, /* is_array */
9554 TRUE, /* is_bitmask */
9555 FALSE, /* is_mixed */
9556 #ifdef PIPE_ARCH_BIG_ENDIAN
9557 {
9558 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 11}, /* x = r */
9559 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 5}, /* y = g */
9560 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* z = b */
9561 {0, 0, 0, 0, 0}
9562 },
9563 #else
9564 {
9565 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 0}, /* x = b */
9566 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6, 5}, /* y = g */
9567 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5, 11}, /* z = r */
9568 {0, 0, 0, 0, 0}
9569 },
9570 #endif
9571 #ifdef PIPE_ARCH_BIG_ENDIAN
9572 {
9573 UTIL_FORMAT_SWIZZLE_X, /* sr */
9574 UTIL_FORMAT_SWIZZLE_Y, /* sg */
9575 UTIL_FORMAT_SWIZZLE_Z, /* sb */
9576 UTIL_FORMAT_SWIZZLE_1 /* a */
9577 },
9578 #else
9579 {
9580 UTIL_FORMAT_SWIZZLE_Z, /* sr */
9581 UTIL_FORMAT_SWIZZLE_Y, /* sg */
9582 UTIL_FORMAT_SWIZZLE_X, /* sb */
9583 UTIL_FORMAT_SWIZZLE_1 /* a */
9584 },
9585 #endif
9586 UTIL_FORMAT_COLORSPACE_SRGB,
9587 };
9588
9589 const struct util_format_description
9590 util_format_a8l8_unorm_description = {
9591 PIPE_FORMAT_A8L8_UNORM,
9592 "PIPE_FORMAT_A8L8_UNORM",
9593 "a8l8_unorm",
9594 {1, 1, 16}, /* block */
9595 UTIL_FORMAT_LAYOUT_PLAIN,
9596 2, /* nr_channels */
9597 TRUE, /* is_array */
9598 TRUE, /* is_bitmask */
9599 FALSE, /* is_mixed */
9600 #ifdef PIPE_ARCH_BIG_ENDIAN
9601 {
9602 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = a */
9603 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = rgb */
9604 {0, 0, 0, 0, 0},
9605 {0, 0, 0, 0, 0}
9606 },
9607 #else
9608 {
9609 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
9610 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = rgb */
9611 {0, 0, 0, 0, 0},
9612 {0, 0, 0, 0, 0}
9613 },
9614 #endif
9615 #ifdef PIPE_ARCH_BIG_ENDIAN
9616 {
9617 UTIL_FORMAT_SWIZZLE_Y, /* r */
9618 UTIL_FORMAT_SWIZZLE_Y, /* g */
9619 UTIL_FORMAT_SWIZZLE_Y, /* b */
9620 UTIL_FORMAT_SWIZZLE_X /* a */
9621 },
9622 #else
9623 {
9624 UTIL_FORMAT_SWIZZLE_Y, /* r */
9625 UTIL_FORMAT_SWIZZLE_Y, /* g */
9626 UTIL_FORMAT_SWIZZLE_Y, /* b */
9627 UTIL_FORMAT_SWIZZLE_X /* a */
9628 },
9629 #endif
9630 UTIL_FORMAT_COLORSPACE_RGB,
9631 };
9632
9633 const struct util_format_description
9634 util_format_a8l8_snorm_description = {
9635 PIPE_FORMAT_A8L8_SNORM,
9636 "PIPE_FORMAT_A8L8_SNORM",
9637 "a8l8_snorm",
9638 {1, 1, 16}, /* block */
9639 UTIL_FORMAT_LAYOUT_PLAIN,
9640 2, /* nr_channels */
9641 TRUE, /* is_array */
9642 TRUE, /* is_bitmask */
9643 FALSE, /* is_mixed */
9644 #ifdef PIPE_ARCH_BIG_ENDIAN
9645 {
9646 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* x = a */
9647 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* y = rgb */
9648 {0, 0, 0, 0, 0},
9649 {0, 0, 0, 0, 0}
9650 },
9651 #else
9652 {
9653 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = a */
9654 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = rgb */
9655 {0, 0, 0, 0, 0},
9656 {0, 0, 0, 0, 0}
9657 },
9658 #endif
9659 #ifdef PIPE_ARCH_BIG_ENDIAN
9660 {
9661 UTIL_FORMAT_SWIZZLE_Y, /* r */
9662 UTIL_FORMAT_SWIZZLE_Y, /* g */
9663 UTIL_FORMAT_SWIZZLE_Y, /* b */
9664 UTIL_FORMAT_SWIZZLE_X /* a */
9665 },
9666 #else
9667 {
9668 UTIL_FORMAT_SWIZZLE_Y, /* r */
9669 UTIL_FORMAT_SWIZZLE_Y, /* g */
9670 UTIL_FORMAT_SWIZZLE_Y, /* b */
9671 UTIL_FORMAT_SWIZZLE_X /* a */
9672 },
9673 #endif
9674 UTIL_FORMAT_COLORSPACE_RGB,
9675 };
9676
9677 const struct util_format_description
9678 util_format_a8l8_srgb_description = {
9679 PIPE_FORMAT_A8L8_SRGB,
9680 "PIPE_FORMAT_A8L8_SRGB",
9681 "a8l8_srgb",
9682 {1, 1, 16}, /* block */
9683 UTIL_FORMAT_LAYOUT_PLAIN,
9684 2, /* nr_channels */
9685 TRUE, /* is_array */
9686 TRUE, /* is_bitmask */
9687 FALSE, /* is_mixed */
9688 #ifdef PIPE_ARCH_BIG_ENDIAN
9689 {
9690 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = a */
9691 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = rgb */
9692 {0, 0, 0, 0, 0},
9693 {0, 0, 0, 0, 0}
9694 },
9695 #else
9696 {
9697 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = a */
9698 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = rgb */
9699 {0, 0, 0, 0, 0},
9700 {0, 0, 0, 0, 0}
9701 },
9702 #endif
9703 #ifdef PIPE_ARCH_BIG_ENDIAN
9704 {
9705 UTIL_FORMAT_SWIZZLE_Y, /* sr */
9706 UTIL_FORMAT_SWIZZLE_Y, /* sg */
9707 UTIL_FORMAT_SWIZZLE_Y, /* sb */
9708 UTIL_FORMAT_SWIZZLE_X /* a */
9709 },
9710 #else
9711 {
9712 UTIL_FORMAT_SWIZZLE_Y, /* sr */
9713 UTIL_FORMAT_SWIZZLE_Y, /* sg */
9714 UTIL_FORMAT_SWIZZLE_Y, /* sb */
9715 UTIL_FORMAT_SWIZZLE_X /* a */
9716 },
9717 #endif
9718 UTIL_FORMAT_COLORSPACE_SRGB,
9719 };
9720
9721 const struct util_format_description
9722 util_format_a16l16_unorm_description = {
9723 PIPE_FORMAT_A16L16_UNORM,
9724 "PIPE_FORMAT_A16L16_UNORM",
9725 "a16l16_unorm",
9726 {1, 1, 32}, /* block */
9727 UTIL_FORMAT_LAYOUT_PLAIN,
9728 2, /* nr_channels */
9729 TRUE, /* is_array */
9730 TRUE, /* is_bitmask */
9731 FALSE, /* is_mixed */
9732 #ifdef PIPE_ARCH_BIG_ENDIAN
9733 {
9734 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* x = a */
9735 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* y = rgb */
9736 {0, 0, 0, 0, 0},
9737 {0, 0, 0, 0, 0}
9738 },
9739 #else
9740 {
9741 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = a */
9742 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = rgb */
9743 {0, 0, 0, 0, 0},
9744 {0, 0, 0, 0, 0}
9745 },
9746 #endif
9747 #ifdef PIPE_ARCH_BIG_ENDIAN
9748 {
9749 UTIL_FORMAT_SWIZZLE_Y, /* r */
9750 UTIL_FORMAT_SWIZZLE_Y, /* g */
9751 UTIL_FORMAT_SWIZZLE_Y, /* b */
9752 UTIL_FORMAT_SWIZZLE_X /* a */
9753 },
9754 #else
9755 {
9756 UTIL_FORMAT_SWIZZLE_Y, /* r */
9757 UTIL_FORMAT_SWIZZLE_Y, /* g */
9758 UTIL_FORMAT_SWIZZLE_Y, /* b */
9759 UTIL_FORMAT_SWIZZLE_X /* a */
9760 },
9761 #endif
9762 UTIL_FORMAT_COLORSPACE_RGB,
9763 };
9764
9765 const struct util_format_description
9766 util_format_g8r8_unorm_description = {
9767 PIPE_FORMAT_G8R8_UNORM,
9768 "PIPE_FORMAT_G8R8_UNORM",
9769 "g8r8_unorm",
9770 {1, 1, 16}, /* block */
9771 UTIL_FORMAT_LAYOUT_PLAIN,
9772 2, /* nr_channels */
9773 TRUE, /* is_array */
9774 TRUE, /* is_bitmask */
9775 FALSE, /* is_mixed */
9776 #ifdef PIPE_ARCH_BIG_ENDIAN
9777 {
9778 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* x = g */
9779 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* y = r */
9780 {0, 0, 0, 0, 0},
9781 {0, 0, 0, 0, 0}
9782 },
9783 #else
9784 {
9785 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 0}, /* x = g */
9786 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8, 8}, /* y = r */
9787 {0, 0, 0, 0, 0},
9788 {0, 0, 0, 0, 0}
9789 },
9790 #endif
9791 #ifdef PIPE_ARCH_BIG_ENDIAN
9792 {
9793 UTIL_FORMAT_SWIZZLE_Y, /* r */
9794 UTIL_FORMAT_SWIZZLE_X, /* g */
9795 UTIL_FORMAT_SWIZZLE_0, /* b */
9796 UTIL_FORMAT_SWIZZLE_1 /* a */
9797 },
9798 #else
9799 {
9800 UTIL_FORMAT_SWIZZLE_Y, /* r */
9801 UTIL_FORMAT_SWIZZLE_X, /* g */
9802 UTIL_FORMAT_SWIZZLE_0, /* b */
9803 UTIL_FORMAT_SWIZZLE_1 /* a */
9804 },
9805 #endif
9806 UTIL_FORMAT_COLORSPACE_RGB,
9807 };
9808
9809 const struct util_format_description
9810 util_format_g8r8_snorm_description = {
9811 PIPE_FORMAT_G8R8_SNORM,
9812 "PIPE_FORMAT_G8R8_SNORM",
9813 "g8r8_snorm",
9814 {1, 1, 16}, /* block */
9815 UTIL_FORMAT_LAYOUT_PLAIN,
9816 2, /* nr_channels */
9817 TRUE, /* is_array */
9818 TRUE, /* is_bitmask */
9819 FALSE, /* is_mixed */
9820 #ifdef PIPE_ARCH_BIG_ENDIAN
9821 {
9822 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* x = g */
9823 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* y = r */
9824 {0, 0, 0, 0, 0},
9825 {0, 0, 0, 0, 0}
9826 },
9827 #else
9828 {
9829 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = g */
9830 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = r */
9831 {0, 0, 0, 0, 0},
9832 {0, 0, 0, 0, 0}
9833 },
9834 #endif
9835 #ifdef PIPE_ARCH_BIG_ENDIAN
9836 {
9837 UTIL_FORMAT_SWIZZLE_Y, /* r */
9838 UTIL_FORMAT_SWIZZLE_X, /* g */
9839 UTIL_FORMAT_SWIZZLE_0, /* b */
9840 UTIL_FORMAT_SWIZZLE_1 /* a */
9841 },
9842 #else
9843 {
9844 UTIL_FORMAT_SWIZZLE_Y, /* r */
9845 UTIL_FORMAT_SWIZZLE_X, /* g */
9846 UTIL_FORMAT_SWIZZLE_0, /* b */
9847 UTIL_FORMAT_SWIZZLE_1 /* a */
9848 },
9849 #endif
9850 UTIL_FORMAT_COLORSPACE_RGB,
9851 };
9852
9853 const struct util_format_description
9854 util_format_g16r16_unorm_description = {
9855 PIPE_FORMAT_G16R16_UNORM,
9856 "PIPE_FORMAT_G16R16_UNORM",
9857 "g16r16_unorm",
9858 {1, 1, 32}, /* block */
9859 UTIL_FORMAT_LAYOUT_PLAIN,
9860 2, /* nr_channels */
9861 TRUE, /* is_array */
9862 TRUE, /* is_bitmask */
9863 FALSE, /* is_mixed */
9864 #ifdef PIPE_ARCH_BIG_ENDIAN
9865 {
9866 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* x = g */
9867 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* y = r */
9868 {0, 0, 0, 0, 0},
9869 {0, 0, 0, 0, 0}
9870 },
9871 #else
9872 {
9873 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 0}, /* x = g */
9874 {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16, 16}, /* y = r */
9875 {0, 0, 0, 0, 0},
9876 {0, 0, 0, 0, 0}
9877 },
9878 #endif
9879 #ifdef PIPE_ARCH_BIG_ENDIAN
9880 {
9881 UTIL_FORMAT_SWIZZLE_Y, /* r */
9882 UTIL_FORMAT_SWIZZLE_X, /* g */
9883 UTIL_FORMAT_SWIZZLE_0, /* b */
9884 UTIL_FORMAT_SWIZZLE_1 /* a */
9885 },
9886 #else
9887 {
9888 UTIL_FORMAT_SWIZZLE_Y, /* r */
9889 UTIL_FORMAT_SWIZZLE_X, /* g */
9890 UTIL_FORMAT_SWIZZLE_0, /* b */
9891 UTIL_FORMAT_SWIZZLE_1 /* a */
9892 },
9893 #endif
9894 UTIL_FORMAT_COLORSPACE_RGB,
9895 };
9896
9897 const struct util_format_description
9898 util_format_g16r16_snorm_description = {
9899 PIPE_FORMAT_G16R16_SNORM,
9900 "PIPE_FORMAT_G16R16_SNORM",
9901 "g16r16_snorm",
9902 {1, 1, 32}, /* block */
9903 UTIL_FORMAT_LAYOUT_PLAIN,
9904 2, /* nr_channels */
9905 TRUE, /* is_array */
9906 TRUE, /* is_bitmask */
9907 FALSE, /* is_mixed */
9908 #ifdef PIPE_ARCH_BIG_ENDIAN
9909 {
9910 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* x = g */
9911 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* y = r */
9912 {0, 0, 0, 0, 0},
9913 {0, 0, 0, 0, 0}
9914 },
9915 #else
9916 {
9917 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 0}, /* x = g */
9918 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16, 16}, /* y = r */
9919 {0, 0, 0, 0, 0},
9920 {0, 0, 0, 0, 0}
9921 },
9922 #endif
9923 #ifdef PIPE_ARCH_BIG_ENDIAN
9924 {
9925 UTIL_FORMAT_SWIZZLE_Y, /* r */
9926 UTIL_FORMAT_SWIZZLE_X, /* g */
9927 UTIL_FORMAT_SWIZZLE_0, /* b */
9928 UTIL_FORMAT_SWIZZLE_1 /* a */
9929 },
9930 #else
9931 {
9932 UTIL_FORMAT_SWIZZLE_Y, /* r */
9933 UTIL_FORMAT_SWIZZLE_X, /* g */
9934 UTIL_FORMAT_SWIZZLE_0, /* b */
9935 UTIL_FORMAT_SWIZZLE_1 /* a */
9936 },
9937 #endif
9938 UTIL_FORMAT_COLORSPACE_RGB,
9939 };
9940
9941 const struct util_format_description
9942 util_format_a8b8g8r8_snorm_description = {
9943 PIPE_FORMAT_A8B8G8R8_SNORM,
9944 "PIPE_FORMAT_A8B8G8R8_SNORM",
9945 "a8b8g8r8_snorm",
9946 {1, 1, 32}, /* block */
9947 UTIL_FORMAT_LAYOUT_PLAIN,
9948 4, /* nr_channels */
9949 TRUE, /* is_array */
9950 TRUE, /* is_bitmask */
9951 FALSE, /* is_mixed */
9952 #ifdef PIPE_ARCH_BIG_ENDIAN
9953 {
9954 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24}, /* x = a */
9955 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* y = b */
9956 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* z = g */
9957 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0} /* w = r */
9958 },
9959 #else
9960 {
9961 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0}, /* x = a */
9962 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = b */
9963 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = g */
9964 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24} /* w = r */
9965 },
9966 #endif
9967 #ifdef PIPE_ARCH_BIG_ENDIAN
9968 {
9969 UTIL_FORMAT_SWIZZLE_W, /* r */
9970 UTIL_FORMAT_SWIZZLE_Z, /* g */
9971 UTIL_FORMAT_SWIZZLE_Y, /* b */
9972 UTIL_FORMAT_SWIZZLE_X /* a */
9973 },
9974 #else
9975 {
9976 UTIL_FORMAT_SWIZZLE_W, /* r */
9977 UTIL_FORMAT_SWIZZLE_Z, /* g */
9978 UTIL_FORMAT_SWIZZLE_Y, /* b */
9979 UTIL_FORMAT_SWIZZLE_X /* a */
9980 },
9981 #endif
9982 UTIL_FORMAT_COLORSPACE_RGB,
9983 };
9984
9985 const struct util_format_description
9986 util_format_x8b8g8r8_snorm_description = {
9987 PIPE_FORMAT_X8B8G8R8_SNORM,
9988 "PIPE_FORMAT_X8B8G8R8_SNORM",
9989 "x8b8g8r8_snorm",
9990 {1, 1, 32}, /* block */
9991 UTIL_FORMAT_LAYOUT_PLAIN,
9992 4, /* nr_channels */
9993 TRUE, /* is_array */
9994 TRUE, /* is_bitmask */
9995 FALSE, /* is_mixed */
9996 #ifdef PIPE_ARCH_BIG_ENDIAN
9997 {
9998 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 24}, /* x = x */
9999 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* y = b */
10000 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* z = g */
10001 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 0} /* w = r */
10002 },
10003 #else
10004 {
10005 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8, 0}, /* x = x */
10006 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 8}, /* y = b */
10007 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 16}, /* z = g */
10008 {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8, 24} /* w = r */
10009 },
10010 #endif
10011 #ifdef PIPE_ARCH_BIG_ENDIAN
10012 {
10013 UTIL_FORMAT_SWIZZLE_W, /* r */
10014 UTIL_FORMAT_SWIZZLE_Z, /* g */
10015 UTIL_FORMAT_SWIZZLE_Y, /* b */
10016 UTIL_FORMAT_SWIZZLE_1 /* a */
10017 },
10018 #else
10019 {
10020 UTIL_FORMAT_SWIZZLE_W, /* r */
10021 UTIL_FORMAT_SWIZZLE_Z, /* g */
10022 UTIL_FORMAT_SWIZZLE_Y, /* b */
10023 UTIL_FORMAT_SWIZZLE_1 /* a */
10024 },
10025 #endif
10026 UTIL_FORMAT_COLORSPACE_RGB,
10027 };
10028
10029 const struct util_format_description
10030 util_format_etc2_rgb8_description = {
10031 PIPE_FORMAT_ETC2_RGB8,
10032 "PIPE_FORMAT_ETC2_RGB8",
10033 "etc2_rgb8",
10034 {4, 4, 64}, /* block */
10035 UTIL_FORMAT_LAYOUT_ETC,
10036 1, /* nr_channels */
10037 FALSE, /* is_array */
10038 FALSE, /* is_bitmask */
10039 FALSE, /* is_mixed */
10040 {
10041 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
10042 {0, 0, 0, 0, 0},
10043 {0, 0, 0, 0, 0},
10044 {0, 0, 0, 0, 0}
10045 },
10046 {
10047 UTIL_FORMAT_SWIZZLE_X, /* r */
10048 UTIL_FORMAT_SWIZZLE_Y, /* g */
10049 UTIL_FORMAT_SWIZZLE_Z, /* b */
10050 UTIL_FORMAT_SWIZZLE_1 /* a */
10051 },
10052 UTIL_FORMAT_COLORSPACE_RGB,
10053 };
10054
10055 const struct util_format_description
10056 util_format_etc2_srgb8_description = {
10057 PIPE_FORMAT_ETC2_SRGB8,
10058 "PIPE_FORMAT_ETC2_SRGB8",
10059 "etc2_srgb8",
10060 {4, 4, 64}, /* block */
10061 UTIL_FORMAT_LAYOUT_ETC,
10062 1, /* nr_channels */
10063 FALSE, /* is_array */
10064 FALSE, /* is_bitmask */
10065 FALSE, /* is_mixed */
10066 {
10067 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
10068 {0, 0, 0, 0, 0},
10069 {0, 0, 0, 0, 0},
10070 {0, 0, 0, 0, 0}
10071 },
10072 {
10073 UTIL_FORMAT_SWIZZLE_X, /* sr */
10074 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10075 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10076 UTIL_FORMAT_SWIZZLE_1 /* a */
10077 },
10078 UTIL_FORMAT_COLORSPACE_SRGB,
10079 };
10080
10081 const struct util_format_description
10082 util_format_etc2_rgb8a1_description = {
10083 PIPE_FORMAT_ETC2_RGB8A1,
10084 "PIPE_FORMAT_ETC2_RGB8A1",
10085 "etc2_rgb8a1",
10086 {4, 4, 64}, /* block */
10087 UTIL_FORMAT_LAYOUT_ETC,
10088 1, /* nr_channels */
10089 FALSE, /* is_array */
10090 FALSE, /* is_bitmask */
10091 FALSE, /* is_mixed */
10092 {
10093 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
10094 {0, 0, 0, 0, 0},
10095 {0, 0, 0, 0, 0},
10096 {0, 0, 0, 0, 0}
10097 },
10098 {
10099 UTIL_FORMAT_SWIZZLE_X, /* r */
10100 UTIL_FORMAT_SWIZZLE_Y, /* g */
10101 UTIL_FORMAT_SWIZZLE_Z, /* b */
10102 UTIL_FORMAT_SWIZZLE_W /* a */
10103 },
10104 UTIL_FORMAT_COLORSPACE_RGB,
10105 };
10106
10107 const struct util_format_description
10108 util_format_etc2_srgb8a1_description = {
10109 PIPE_FORMAT_ETC2_SRGB8A1,
10110 "PIPE_FORMAT_ETC2_SRGB8A1",
10111 "etc2_srgb8a1",
10112 {4, 4, 64}, /* block */
10113 UTIL_FORMAT_LAYOUT_ETC,
10114 1, /* nr_channels */
10115 FALSE, /* is_array */
10116 FALSE, /* is_bitmask */
10117 FALSE, /* is_mixed */
10118 {
10119 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
10120 {0, 0, 0, 0, 0},
10121 {0, 0, 0, 0, 0},
10122 {0, 0, 0, 0, 0}
10123 },
10124 {
10125 UTIL_FORMAT_SWIZZLE_X, /* sr */
10126 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10127 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10128 UTIL_FORMAT_SWIZZLE_W /* a */
10129 },
10130 UTIL_FORMAT_COLORSPACE_SRGB,
10131 };
10132
10133 const struct util_format_description
10134 util_format_etc2_rgba8_description = {
10135 PIPE_FORMAT_ETC2_RGBA8,
10136 "PIPE_FORMAT_ETC2_RGBA8",
10137 "etc2_rgba8",
10138 {4, 4, 128}, /* block */
10139 UTIL_FORMAT_LAYOUT_ETC,
10140 1, /* nr_channels */
10141 FALSE, /* is_array */
10142 FALSE, /* is_bitmask */
10143 FALSE, /* is_mixed */
10144 {
10145 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10146 {0, 0, 0, 0, 0},
10147 {0, 0, 0, 0, 0},
10148 {0, 0, 0, 0, 0}
10149 },
10150 {
10151 UTIL_FORMAT_SWIZZLE_X, /* r */
10152 UTIL_FORMAT_SWIZZLE_Y, /* g */
10153 UTIL_FORMAT_SWIZZLE_Z, /* b */
10154 UTIL_FORMAT_SWIZZLE_W /* a */
10155 },
10156 UTIL_FORMAT_COLORSPACE_RGB,
10157 };
10158
10159 const struct util_format_description
10160 util_format_etc2_srgba8_description = {
10161 PIPE_FORMAT_ETC2_SRGBA8,
10162 "PIPE_FORMAT_ETC2_SRGBA8",
10163 "etc2_srgba8",
10164 {4, 4, 128}, /* block */
10165 UTIL_FORMAT_LAYOUT_ETC,
10166 1, /* nr_channels */
10167 FALSE, /* is_array */
10168 FALSE, /* is_bitmask */
10169 FALSE, /* is_mixed */
10170 {
10171 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10172 {0, 0, 0, 0, 0},
10173 {0, 0, 0, 0, 0},
10174 {0, 0, 0, 0, 0}
10175 },
10176 {
10177 UTIL_FORMAT_SWIZZLE_X, /* sr */
10178 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10179 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10180 UTIL_FORMAT_SWIZZLE_W /* a */
10181 },
10182 UTIL_FORMAT_COLORSPACE_SRGB,
10183 };
10184
10185 const struct util_format_description
10186 util_format_etc2_r11_unorm_description = {
10187 PIPE_FORMAT_ETC2_R11_UNORM,
10188 "PIPE_FORMAT_ETC2_R11_UNORM",
10189 "etc2_r11_unorm",
10190 {4, 4, 64}, /* block */
10191 UTIL_FORMAT_LAYOUT_ETC,
10192 1, /* nr_channels */
10193 FALSE, /* is_array */
10194 FALSE, /* is_bitmask */
10195 FALSE, /* is_mixed */
10196 {
10197 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
10198 {0, 0, 0, 0, 0},
10199 {0, 0, 0, 0, 0},
10200 {0, 0, 0, 0, 0}
10201 },
10202 {
10203 UTIL_FORMAT_SWIZZLE_X, /* r */
10204 UTIL_FORMAT_SWIZZLE_0, /* g */
10205 UTIL_FORMAT_SWIZZLE_0, /* b */
10206 UTIL_FORMAT_SWIZZLE_1 /* a */
10207 },
10208 UTIL_FORMAT_COLORSPACE_RGB,
10209 };
10210
10211 const struct util_format_description
10212 util_format_etc2_r11_snorm_description = {
10213 PIPE_FORMAT_ETC2_R11_SNORM,
10214 "PIPE_FORMAT_ETC2_R11_SNORM",
10215 "etc2_r11_snorm",
10216 {4, 4, 64}, /* block */
10217 UTIL_FORMAT_LAYOUT_ETC,
10218 1, /* nr_channels */
10219 FALSE, /* is_array */
10220 FALSE, /* is_bitmask */
10221 FALSE, /* is_mixed */
10222 {
10223 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64, 0}, /* x = x */
10224 {0, 0, 0, 0, 0},
10225 {0, 0, 0, 0, 0},
10226 {0, 0, 0, 0, 0}
10227 },
10228 {
10229 UTIL_FORMAT_SWIZZLE_X, /* r */
10230 UTIL_FORMAT_SWIZZLE_0, /* g */
10231 UTIL_FORMAT_SWIZZLE_0, /* b */
10232 UTIL_FORMAT_SWIZZLE_1 /* a */
10233 },
10234 UTIL_FORMAT_COLORSPACE_RGB,
10235 };
10236
10237 const struct util_format_description
10238 util_format_etc2_rg11_unorm_description = {
10239 PIPE_FORMAT_ETC2_RG11_UNORM,
10240 "PIPE_FORMAT_ETC2_RG11_UNORM",
10241 "etc2_rg11_unorm",
10242 {4, 4, 128}, /* block */
10243 UTIL_FORMAT_LAYOUT_ETC,
10244 1, /* nr_channels */
10245 FALSE, /* is_array */
10246 FALSE, /* is_bitmask */
10247 FALSE, /* is_mixed */
10248 {
10249 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10250 {0, 0, 0, 0, 0},
10251 {0, 0, 0, 0, 0},
10252 {0, 0, 0, 0, 0}
10253 },
10254 {
10255 UTIL_FORMAT_SWIZZLE_X, /* r */
10256 UTIL_FORMAT_SWIZZLE_Y, /* g */
10257 UTIL_FORMAT_SWIZZLE_0, /* b */
10258 UTIL_FORMAT_SWIZZLE_1 /* a */
10259 },
10260 UTIL_FORMAT_COLORSPACE_RGB,
10261 };
10262
10263 const struct util_format_description
10264 util_format_etc2_rg11_snorm_description = {
10265 PIPE_FORMAT_ETC2_RG11_SNORM,
10266 "PIPE_FORMAT_ETC2_RG11_SNORM",
10267 "etc2_rg11_snorm",
10268 {4, 4, 128}, /* block */
10269 UTIL_FORMAT_LAYOUT_ETC,
10270 1, /* nr_channels */
10271 FALSE, /* is_array */
10272 FALSE, /* is_bitmask */
10273 FALSE, /* is_mixed */
10274 {
10275 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10276 {0, 0, 0, 0, 0},
10277 {0, 0, 0, 0, 0},
10278 {0, 0, 0, 0, 0}
10279 },
10280 {
10281 UTIL_FORMAT_SWIZZLE_X, /* r */
10282 UTIL_FORMAT_SWIZZLE_Y, /* g */
10283 UTIL_FORMAT_SWIZZLE_0, /* b */
10284 UTIL_FORMAT_SWIZZLE_1 /* a */
10285 },
10286 UTIL_FORMAT_COLORSPACE_RGB,
10287 };
10288
10289 const struct util_format_description
10290 util_format_astc_4x4_description = {
10291 PIPE_FORMAT_ASTC_4x4,
10292 "PIPE_FORMAT_ASTC_4x4",
10293 "astc_4x4",
10294 {4, 4, 128}, /* block */
10295 UTIL_FORMAT_LAYOUT_ASTC,
10296 1, /* nr_channels */
10297 FALSE, /* is_array */
10298 FALSE, /* is_bitmask */
10299 FALSE, /* is_mixed */
10300 {
10301 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10302 {0, 0, 0, 0, 0},
10303 {0, 0, 0, 0, 0},
10304 {0, 0, 0, 0, 0}
10305 },
10306 {
10307 UTIL_FORMAT_SWIZZLE_X, /* r */
10308 UTIL_FORMAT_SWIZZLE_Y, /* g */
10309 UTIL_FORMAT_SWIZZLE_Z, /* b */
10310 UTIL_FORMAT_SWIZZLE_W /* a */
10311 },
10312 UTIL_FORMAT_COLORSPACE_RGB,
10313 };
10314
10315 const struct util_format_description
10316 util_format_astc_5x4_description = {
10317 PIPE_FORMAT_ASTC_5x4,
10318 "PIPE_FORMAT_ASTC_5x4",
10319 "astc_5x4",
10320 {5, 4, 128}, /* block */
10321 UTIL_FORMAT_LAYOUT_ASTC,
10322 1, /* nr_channels */
10323 FALSE, /* is_array */
10324 FALSE, /* is_bitmask */
10325 FALSE, /* is_mixed */
10326 {
10327 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10328 {0, 0, 0, 0, 0},
10329 {0, 0, 0, 0, 0},
10330 {0, 0, 0, 0, 0}
10331 },
10332 {
10333 UTIL_FORMAT_SWIZZLE_X, /* r */
10334 UTIL_FORMAT_SWIZZLE_Y, /* g */
10335 UTIL_FORMAT_SWIZZLE_Z, /* b */
10336 UTIL_FORMAT_SWIZZLE_W /* a */
10337 },
10338 UTIL_FORMAT_COLORSPACE_RGB,
10339 };
10340
10341 const struct util_format_description
10342 util_format_astc_5x5_description = {
10343 PIPE_FORMAT_ASTC_5x5,
10344 "PIPE_FORMAT_ASTC_5x5",
10345 "astc_5x5",
10346 {5, 5, 128}, /* block */
10347 UTIL_FORMAT_LAYOUT_ASTC,
10348 1, /* nr_channels */
10349 FALSE, /* is_array */
10350 FALSE, /* is_bitmask */
10351 FALSE, /* is_mixed */
10352 {
10353 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10354 {0, 0, 0, 0, 0},
10355 {0, 0, 0, 0, 0},
10356 {0, 0, 0, 0, 0}
10357 },
10358 {
10359 UTIL_FORMAT_SWIZZLE_X, /* r */
10360 UTIL_FORMAT_SWIZZLE_Y, /* g */
10361 UTIL_FORMAT_SWIZZLE_Z, /* b */
10362 UTIL_FORMAT_SWIZZLE_W /* a */
10363 },
10364 UTIL_FORMAT_COLORSPACE_RGB,
10365 };
10366
10367 const struct util_format_description
10368 util_format_astc_6x5_description = {
10369 PIPE_FORMAT_ASTC_6x5,
10370 "PIPE_FORMAT_ASTC_6x5",
10371 "astc_6x5",
10372 {6, 5, 128}, /* block */
10373 UTIL_FORMAT_LAYOUT_ASTC,
10374 1, /* nr_channels */
10375 FALSE, /* is_array */
10376 FALSE, /* is_bitmask */
10377 FALSE, /* is_mixed */
10378 {
10379 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10380 {0, 0, 0, 0, 0},
10381 {0, 0, 0, 0, 0},
10382 {0, 0, 0, 0, 0}
10383 },
10384 {
10385 UTIL_FORMAT_SWIZZLE_X, /* r */
10386 UTIL_FORMAT_SWIZZLE_Y, /* g */
10387 UTIL_FORMAT_SWIZZLE_Z, /* b */
10388 UTIL_FORMAT_SWIZZLE_W /* a */
10389 },
10390 UTIL_FORMAT_COLORSPACE_RGB,
10391 };
10392
10393 const struct util_format_description
10394 util_format_astc_6x6_description = {
10395 PIPE_FORMAT_ASTC_6x6,
10396 "PIPE_FORMAT_ASTC_6x6",
10397 "astc_6x6",
10398 {6, 6, 128}, /* block */
10399 UTIL_FORMAT_LAYOUT_ASTC,
10400 1, /* nr_channels */
10401 FALSE, /* is_array */
10402 FALSE, /* is_bitmask */
10403 FALSE, /* is_mixed */
10404 {
10405 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10406 {0, 0, 0, 0, 0},
10407 {0, 0, 0, 0, 0},
10408 {0, 0, 0, 0, 0}
10409 },
10410 {
10411 UTIL_FORMAT_SWIZZLE_X, /* r */
10412 UTIL_FORMAT_SWIZZLE_Y, /* g */
10413 UTIL_FORMAT_SWIZZLE_Z, /* b */
10414 UTIL_FORMAT_SWIZZLE_W /* a */
10415 },
10416 UTIL_FORMAT_COLORSPACE_RGB,
10417 };
10418
10419 const struct util_format_description
10420 util_format_astc_8x5_description = {
10421 PIPE_FORMAT_ASTC_8x5,
10422 "PIPE_FORMAT_ASTC_8x5",
10423 "astc_8x5",
10424 {8, 5, 128}, /* block */
10425 UTIL_FORMAT_LAYOUT_ASTC,
10426 1, /* nr_channels */
10427 FALSE, /* is_array */
10428 FALSE, /* is_bitmask */
10429 FALSE, /* is_mixed */
10430 {
10431 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10432 {0, 0, 0, 0, 0},
10433 {0, 0, 0, 0, 0},
10434 {0, 0, 0, 0, 0}
10435 },
10436 {
10437 UTIL_FORMAT_SWIZZLE_X, /* r */
10438 UTIL_FORMAT_SWIZZLE_Y, /* g */
10439 UTIL_FORMAT_SWIZZLE_Z, /* b */
10440 UTIL_FORMAT_SWIZZLE_W /* a */
10441 },
10442 UTIL_FORMAT_COLORSPACE_RGB,
10443 };
10444
10445 const struct util_format_description
10446 util_format_astc_8x6_description = {
10447 PIPE_FORMAT_ASTC_8x6,
10448 "PIPE_FORMAT_ASTC_8x6",
10449 "astc_8x6",
10450 {8, 6, 128}, /* block */
10451 UTIL_FORMAT_LAYOUT_ASTC,
10452 1, /* nr_channels */
10453 FALSE, /* is_array */
10454 FALSE, /* is_bitmask */
10455 FALSE, /* is_mixed */
10456 {
10457 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10458 {0, 0, 0, 0, 0},
10459 {0, 0, 0, 0, 0},
10460 {0, 0, 0, 0, 0}
10461 },
10462 {
10463 UTIL_FORMAT_SWIZZLE_X, /* r */
10464 UTIL_FORMAT_SWIZZLE_Y, /* g */
10465 UTIL_FORMAT_SWIZZLE_Z, /* b */
10466 UTIL_FORMAT_SWIZZLE_W /* a */
10467 },
10468 UTIL_FORMAT_COLORSPACE_RGB,
10469 };
10470
10471 const struct util_format_description
10472 util_format_astc_8x8_description = {
10473 PIPE_FORMAT_ASTC_8x8,
10474 "PIPE_FORMAT_ASTC_8x8",
10475 "astc_8x8",
10476 {8, 8, 128}, /* block */
10477 UTIL_FORMAT_LAYOUT_ASTC,
10478 1, /* nr_channels */
10479 FALSE, /* is_array */
10480 FALSE, /* is_bitmask */
10481 FALSE, /* is_mixed */
10482 {
10483 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10484 {0, 0, 0, 0, 0},
10485 {0, 0, 0, 0, 0},
10486 {0, 0, 0, 0, 0}
10487 },
10488 {
10489 UTIL_FORMAT_SWIZZLE_X, /* r */
10490 UTIL_FORMAT_SWIZZLE_Y, /* g */
10491 UTIL_FORMAT_SWIZZLE_Z, /* b */
10492 UTIL_FORMAT_SWIZZLE_W /* a */
10493 },
10494 UTIL_FORMAT_COLORSPACE_RGB,
10495 };
10496
10497 const struct util_format_description
10498 util_format_astc_10x5_description = {
10499 PIPE_FORMAT_ASTC_10x5,
10500 "PIPE_FORMAT_ASTC_10x5",
10501 "astc_10x5",
10502 {10, 5, 128}, /* block */
10503 UTIL_FORMAT_LAYOUT_ASTC,
10504 1, /* nr_channels */
10505 FALSE, /* is_array */
10506 FALSE, /* is_bitmask */
10507 FALSE, /* is_mixed */
10508 {
10509 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10510 {0, 0, 0, 0, 0},
10511 {0, 0, 0, 0, 0},
10512 {0, 0, 0, 0, 0}
10513 },
10514 {
10515 UTIL_FORMAT_SWIZZLE_X, /* r */
10516 UTIL_FORMAT_SWIZZLE_Y, /* g */
10517 UTIL_FORMAT_SWIZZLE_Z, /* b */
10518 UTIL_FORMAT_SWIZZLE_W /* a */
10519 },
10520 UTIL_FORMAT_COLORSPACE_RGB,
10521 };
10522
10523 const struct util_format_description
10524 util_format_astc_10x6_description = {
10525 PIPE_FORMAT_ASTC_10x6,
10526 "PIPE_FORMAT_ASTC_10x6",
10527 "astc_10x6",
10528 {10, 6, 128}, /* block */
10529 UTIL_FORMAT_LAYOUT_ASTC,
10530 1, /* nr_channels */
10531 FALSE, /* is_array */
10532 FALSE, /* is_bitmask */
10533 FALSE, /* is_mixed */
10534 {
10535 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10536 {0, 0, 0, 0, 0},
10537 {0, 0, 0, 0, 0},
10538 {0, 0, 0, 0, 0}
10539 },
10540 {
10541 UTIL_FORMAT_SWIZZLE_X, /* r */
10542 UTIL_FORMAT_SWIZZLE_Y, /* g */
10543 UTIL_FORMAT_SWIZZLE_Z, /* b */
10544 UTIL_FORMAT_SWIZZLE_W /* a */
10545 },
10546 UTIL_FORMAT_COLORSPACE_RGB,
10547 };
10548
10549 const struct util_format_description
10550 util_format_astc_10x8_description = {
10551 PIPE_FORMAT_ASTC_10x8,
10552 "PIPE_FORMAT_ASTC_10x8",
10553 "astc_10x8",
10554 {10, 8, 128}, /* block */
10555 UTIL_FORMAT_LAYOUT_ASTC,
10556 1, /* nr_channels */
10557 FALSE, /* is_array */
10558 FALSE, /* is_bitmask */
10559 FALSE, /* is_mixed */
10560 {
10561 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10562 {0, 0, 0, 0, 0},
10563 {0, 0, 0, 0, 0},
10564 {0, 0, 0, 0, 0}
10565 },
10566 {
10567 UTIL_FORMAT_SWIZZLE_X, /* r */
10568 UTIL_FORMAT_SWIZZLE_Y, /* g */
10569 UTIL_FORMAT_SWIZZLE_Z, /* b */
10570 UTIL_FORMAT_SWIZZLE_W /* a */
10571 },
10572 UTIL_FORMAT_COLORSPACE_RGB,
10573 };
10574
10575 const struct util_format_description
10576 util_format_astc_10x10_description = {
10577 PIPE_FORMAT_ASTC_10x10,
10578 "PIPE_FORMAT_ASTC_10x10",
10579 "astc_10x10",
10580 {10, 10, 128}, /* block */
10581 UTIL_FORMAT_LAYOUT_ASTC,
10582 1, /* nr_channels */
10583 FALSE, /* is_array */
10584 FALSE, /* is_bitmask */
10585 FALSE, /* is_mixed */
10586 {
10587 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10588 {0, 0, 0, 0, 0},
10589 {0, 0, 0, 0, 0},
10590 {0, 0, 0, 0, 0}
10591 },
10592 {
10593 UTIL_FORMAT_SWIZZLE_X, /* r */
10594 UTIL_FORMAT_SWIZZLE_Y, /* g */
10595 UTIL_FORMAT_SWIZZLE_Z, /* b */
10596 UTIL_FORMAT_SWIZZLE_W /* a */
10597 },
10598 UTIL_FORMAT_COLORSPACE_RGB,
10599 };
10600
10601 const struct util_format_description
10602 util_format_astc_12x10_description = {
10603 PIPE_FORMAT_ASTC_12x10,
10604 "PIPE_FORMAT_ASTC_12x10",
10605 "astc_12x10",
10606 {12, 10, 128}, /* block */
10607 UTIL_FORMAT_LAYOUT_ASTC,
10608 1, /* nr_channels */
10609 FALSE, /* is_array */
10610 FALSE, /* is_bitmask */
10611 FALSE, /* is_mixed */
10612 {
10613 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10614 {0, 0, 0, 0, 0},
10615 {0, 0, 0, 0, 0},
10616 {0, 0, 0, 0, 0}
10617 },
10618 {
10619 UTIL_FORMAT_SWIZZLE_X, /* r */
10620 UTIL_FORMAT_SWIZZLE_Y, /* g */
10621 UTIL_FORMAT_SWIZZLE_Z, /* b */
10622 UTIL_FORMAT_SWIZZLE_W /* a */
10623 },
10624 UTIL_FORMAT_COLORSPACE_RGB,
10625 };
10626
10627 const struct util_format_description
10628 util_format_astc_12x12_description = {
10629 PIPE_FORMAT_ASTC_12x12,
10630 "PIPE_FORMAT_ASTC_12x12",
10631 "astc_12x12",
10632 {12, 12, 128}, /* block */
10633 UTIL_FORMAT_LAYOUT_ASTC,
10634 1, /* nr_channels */
10635 FALSE, /* is_array */
10636 FALSE, /* is_bitmask */
10637 FALSE, /* is_mixed */
10638 {
10639 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10640 {0, 0, 0, 0, 0},
10641 {0, 0, 0, 0, 0},
10642 {0, 0, 0, 0, 0}
10643 },
10644 {
10645 UTIL_FORMAT_SWIZZLE_X, /* r */
10646 UTIL_FORMAT_SWIZZLE_Y, /* g */
10647 UTIL_FORMAT_SWIZZLE_Z, /* b */
10648 UTIL_FORMAT_SWIZZLE_W /* a */
10649 },
10650 UTIL_FORMAT_COLORSPACE_RGB,
10651 };
10652
10653 const struct util_format_description
10654 util_format_astc_4x4_srgb_description = {
10655 PIPE_FORMAT_ASTC_4x4_SRGB,
10656 "PIPE_FORMAT_ASTC_4x4_SRGB",
10657 "astc_4x4_srgb",
10658 {4, 4, 128}, /* block */
10659 UTIL_FORMAT_LAYOUT_ASTC,
10660 1, /* nr_channels */
10661 FALSE, /* is_array */
10662 FALSE, /* is_bitmask */
10663 FALSE, /* is_mixed */
10664 {
10665 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10666 {0, 0, 0, 0, 0},
10667 {0, 0, 0, 0, 0},
10668 {0, 0, 0, 0, 0}
10669 },
10670 {
10671 UTIL_FORMAT_SWIZZLE_X, /* sr */
10672 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10673 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10674 UTIL_FORMAT_SWIZZLE_W /* a */
10675 },
10676 UTIL_FORMAT_COLORSPACE_SRGB,
10677 };
10678
10679 const struct util_format_description
10680 util_format_astc_5x4_srgb_description = {
10681 PIPE_FORMAT_ASTC_5x4_SRGB,
10682 "PIPE_FORMAT_ASTC_5x4_SRGB",
10683 "astc_5x4_srgb",
10684 {5, 4, 128}, /* block */
10685 UTIL_FORMAT_LAYOUT_ASTC,
10686 1, /* nr_channels */
10687 FALSE, /* is_array */
10688 FALSE, /* is_bitmask */
10689 FALSE, /* is_mixed */
10690 {
10691 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10692 {0, 0, 0, 0, 0},
10693 {0, 0, 0, 0, 0},
10694 {0, 0, 0, 0, 0}
10695 },
10696 {
10697 UTIL_FORMAT_SWIZZLE_X, /* sr */
10698 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10699 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10700 UTIL_FORMAT_SWIZZLE_W /* a */
10701 },
10702 UTIL_FORMAT_COLORSPACE_SRGB,
10703 };
10704
10705 const struct util_format_description
10706 util_format_astc_5x5_srgb_description = {
10707 PIPE_FORMAT_ASTC_5x5_SRGB,
10708 "PIPE_FORMAT_ASTC_5x5_SRGB",
10709 "astc_5x5_srgb",
10710 {5, 5, 128}, /* block */
10711 UTIL_FORMAT_LAYOUT_ASTC,
10712 1, /* nr_channels */
10713 FALSE, /* is_array */
10714 FALSE, /* is_bitmask */
10715 FALSE, /* is_mixed */
10716 {
10717 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10718 {0, 0, 0, 0, 0},
10719 {0, 0, 0, 0, 0},
10720 {0, 0, 0, 0, 0}
10721 },
10722 {
10723 UTIL_FORMAT_SWIZZLE_X, /* sr */
10724 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10725 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10726 UTIL_FORMAT_SWIZZLE_W /* a */
10727 },
10728 UTIL_FORMAT_COLORSPACE_SRGB,
10729 };
10730
10731 const struct util_format_description
10732 util_format_astc_6x5_srgb_description = {
10733 PIPE_FORMAT_ASTC_6x5_SRGB,
10734 "PIPE_FORMAT_ASTC_6x5_SRGB",
10735 "astc_6x5_srgb",
10736 {6, 5, 128}, /* block */
10737 UTIL_FORMAT_LAYOUT_ASTC,
10738 1, /* nr_channels */
10739 FALSE, /* is_array */
10740 FALSE, /* is_bitmask */
10741 FALSE, /* is_mixed */
10742 {
10743 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10744 {0, 0, 0, 0, 0},
10745 {0, 0, 0, 0, 0},
10746 {0, 0, 0, 0, 0}
10747 },
10748 {
10749 UTIL_FORMAT_SWIZZLE_X, /* sr */
10750 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10751 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10752 UTIL_FORMAT_SWIZZLE_W /* a */
10753 },
10754 UTIL_FORMAT_COLORSPACE_SRGB,
10755 };
10756
10757 const struct util_format_description
10758 util_format_astc_6x6_srgb_description = {
10759 PIPE_FORMAT_ASTC_6x6_SRGB,
10760 "PIPE_FORMAT_ASTC_6x6_SRGB",
10761 "astc_6x6_srgb",
10762 {6, 6, 128}, /* block */
10763 UTIL_FORMAT_LAYOUT_ASTC,
10764 1, /* nr_channels */
10765 FALSE, /* is_array */
10766 FALSE, /* is_bitmask */
10767 FALSE, /* is_mixed */
10768 {
10769 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10770 {0, 0, 0, 0, 0},
10771 {0, 0, 0, 0, 0},
10772 {0, 0, 0, 0, 0}
10773 },
10774 {
10775 UTIL_FORMAT_SWIZZLE_X, /* sr */
10776 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10777 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10778 UTIL_FORMAT_SWIZZLE_W /* a */
10779 },
10780 UTIL_FORMAT_COLORSPACE_SRGB,
10781 };
10782
10783 const struct util_format_description
10784 util_format_astc_8x5_srgb_description = {
10785 PIPE_FORMAT_ASTC_8x5_SRGB,
10786 "PIPE_FORMAT_ASTC_8x5_SRGB",
10787 "astc_8x5_srgb",
10788 {8, 5, 128}, /* block */
10789 UTIL_FORMAT_LAYOUT_ASTC,
10790 1, /* nr_channels */
10791 FALSE, /* is_array */
10792 FALSE, /* is_bitmask */
10793 FALSE, /* is_mixed */
10794 {
10795 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10796 {0, 0, 0, 0, 0},
10797 {0, 0, 0, 0, 0},
10798 {0, 0, 0, 0, 0}
10799 },
10800 {
10801 UTIL_FORMAT_SWIZZLE_X, /* sr */
10802 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10803 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10804 UTIL_FORMAT_SWIZZLE_W /* a */
10805 },
10806 UTIL_FORMAT_COLORSPACE_SRGB,
10807 };
10808
10809 const struct util_format_description
10810 util_format_astc_8x6_srgb_description = {
10811 PIPE_FORMAT_ASTC_8x6_SRGB,
10812 "PIPE_FORMAT_ASTC_8x6_SRGB",
10813 "astc_8x6_srgb",
10814 {8, 6, 128}, /* block */
10815 UTIL_FORMAT_LAYOUT_ASTC,
10816 1, /* nr_channels */
10817 FALSE, /* is_array */
10818 FALSE, /* is_bitmask */
10819 FALSE, /* is_mixed */
10820 {
10821 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10822 {0, 0, 0, 0, 0},
10823 {0, 0, 0, 0, 0},
10824 {0, 0, 0, 0, 0}
10825 },
10826 {
10827 UTIL_FORMAT_SWIZZLE_X, /* sr */
10828 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10829 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10830 UTIL_FORMAT_SWIZZLE_W /* a */
10831 },
10832 UTIL_FORMAT_COLORSPACE_SRGB,
10833 };
10834
10835 const struct util_format_description
10836 util_format_astc_8x8_srgb_description = {
10837 PIPE_FORMAT_ASTC_8x8_SRGB,
10838 "PIPE_FORMAT_ASTC_8x8_SRGB",
10839 "astc_8x8_srgb",
10840 {8, 8, 128}, /* block */
10841 UTIL_FORMAT_LAYOUT_ASTC,
10842 1, /* nr_channels */
10843 FALSE, /* is_array */
10844 FALSE, /* is_bitmask */
10845 FALSE, /* is_mixed */
10846 {
10847 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10848 {0, 0, 0, 0, 0},
10849 {0, 0, 0, 0, 0},
10850 {0, 0, 0, 0, 0}
10851 },
10852 {
10853 UTIL_FORMAT_SWIZZLE_X, /* sr */
10854 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10855 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10856 UTIL_FORMAT_SWIZZLE_W /* a */
10857 },
10858 UTIL_FORMAT_COLORSPACE_SRGB,
10859 };
10860
10861 const struct util_format_description
10862 util_format_astc_10x5_srgb_description = {
10863 PIPE_FORMAT_ASTC_10x5_SRGB,
10864 "PIPE_FORMAT_ASTC_10x5_SRGB",
10865 "astc_10x5_srgb",
10866 {10, 5, 128}, /* block */
10867 UTIL_FORMAT_LAYOUT_ASTC,
10868 1, /* nr_channels */
10869 FALSE, /* is_array */
10870 FALSE, /* is_bitmask */
10871 FALSE, /* is_mixed */
10872 {
10873 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10874 {0, 0, 0, 0, 0},
10875 {0, 0, 0, 0, 0},
10876 {0, 0, 0, 0, 0}
10877 },
10878 {
10879 UTIL_FORMAT_SWIZZLE_X, /* sr */
10880 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10881 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10882 UTIL_FORMAT_SWIZZLE_W /* a */
10883 },
10884 UTIL_FORMAT_COLORSPACE_SRGB,
10885 };
10886
10887 const struct util_format_description
10888 util_format_astc_10x6_srgb_description = {
10889 PIPE_FORMAT_ASTC_10x6_SRGB,
10890 "PIPE_FORMAT_ASTC_10x6_SRGB",
10891 "astc_10x6_srgb",
10892 {10, 6, 128}, /* block */
10893 UTIL_FORMAT_LAYOUT_ASTC,
10894 1, /* nr_channels */
10895 FALSE, /* is_array */
10896 FALSE, /* is_bitmask */
10897 FALSE, /* is_mixed */
10898 {
10899 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10900 {0, 0, 0, 0, 0},
10901 {0, 0, 0, 0, 0},
10902 {0, 0, 0, 0, 0}
10903 },
10904 {
10905 UTIL_FORMAT_SWIZZLE_X, /* sr */
10906 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10907 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10908 UTIL_FORMAT_SWIZZLE_W /* a */
10909 },
10910 UTIL_FORMAT_COLORSPACE_SRGB,
10911 };
10912
10913 const struct util_format_description
10914 util_format_astc_10x8_srgb_description = {
10915 PIPE_FORMAT_ASTC_10x8_SRGB,
10916 "PIPE_FORMAT_ASTC_10x8_SRGB",
10917 "astc_10x8_srgb",
10918 {10, 8, 128}, /* block */
10919 UTIL_FORMAT_LAYOUT_ASTC,
10920 1, /* nr_channels */
10921 FALSE, /* is_array */
10922 FALSE, /* is_bitmask */
10923 FALSE, /* is_mixed */
10924 {
10925 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10926 {0, 0, 0, 0, 0},
10927 {0, 0, 0, 0, 0},
10928 {0, 0, 0, 0, 0}
10929 },
10930 {
10931 UTIL_FORMAT_SWIZZLE_X, /* sr */
10932 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10933 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10934 UTIL_FORMAT_SWIZZLE_W /* a */
10935 },
10936 UTIL_FORMAT_COLORSPACE_SRGB,
10937 };
10938
10939 const struct util_format_description
10940 util_format_astc_10x10_srgb_description = {
10941 PIPE_FORMAT_ASTC_10x10_SRGB,
10942 "PIPE_FORMAT_ASTC_10x10_SRGB",
10943 "astc_10x10_srgb",
10944 {10, 10, 128}, /* block */
10945 UTIL_FORMAT_LAYOUT_ASTC,
10946 1, /* nr_channels */
10947 FALSE, /* is_array */
10948 FALSE, /* is_bitmask */
10949 FALSE, /* is_mixed */
10950 {
10951 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10952 {0, 0, 0, 0, 0},
10953 {0, 0, 0, 0, 0},
10954 {0, 0, 0, 0, 0}
10955 },
10956 {
10957 UTIL_FORMAT_SWIZZLE_X, /* sr */
10958 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10959 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10960 UTIL_FORMAT_SWIZZLE_W /* a */
10961 },
10962 UTIL_FORMAT_COLORSPACE_SRGB,
10963 };
10964
10965 const struct util_format_description
10966 util_format_astc_12x10_srgb_description = {
10967 PIPE_FORMAT_ASTC_12x10_SRGB,
10968 "PIPE_FORMAT_ASTC_12x10_SRGB",
10969 "astc_12x10_srgb",
10970 {12, 10, 128}, /* block */
10971 UTIL_FORMAT_LAYOUT_ASTC,
10972 1, /* nr_channels */
10973 FALSE, /* is_array */
10974 FALSE, /* is_bitmask */
10975 FALSE, /* is_mixed */
10976 {
10977 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
10978 {0, 0, 0, 0, 0},
10979 {0, 0, 0, 0, 0},
10980 {0, 0, 0, 0, 0}
10981 },
10982 {
10983 UTIL_FORMAT_SWIZZLE_X, /* sr */
10984 UTIL_FORMAT_SWIZZLE_Y, /* sg */
10985 UTIL_FORMAT_SWIZZLE_Z, /* sb */
10986 UTIL_FORMAT_SWIZZLE_W /* a */
10987 },
10988 UTIL_FORMAT_COLORSPACE_SRGB,
10989 };
10990
10991 const struct util_format_description
10992 util_format_astc_12x12_srgb_description = {
10993 PIPE_FORMAT_ASTC_12x12_SRGB,
10994 "PIPE_FORMAT_ASTC_12x12_SRGB",
10995 "astc_12x12_srgb",
10996 {12, 12, 128}, /* block */
10997 UTIL_FORMAT_LAYOUT_ASTC,
10998 1, /* nr_channels */
10999 FALSE, /* is_array */
11000 FALSE, /* is_bitmask */
11001 FALSE, /* is_mixed */
11002 {
11003 {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128, 0}, /* x = x */
11004 {0, 0, 0, 0, 0},
11005 {0, 0, 0, 0, 0},
11006 {0, 0, 0, 0, 0}
11007 },
11008 {
11009 UTIL_FORMAT_SWIZZLE_X, /* sr */
11010 UTIL_FORMAT_SWIZZLE_Y, /* sg */
11011 UTIL_FORMAT_SWIZZLE_Z, /* sb */
11012 UTIL_FORMAT_SWIZZLE_W /* a */
11013 },
11014 UTIL_FORMAT_COLORSPACE_SRGB,
11015 };
11016
11017 const struct util_format_description *
util_format_description(enum pipe_format format)11018 util_format_description(enum pipe_format format)
11019 {
11020 if (format >= PIPE_FORMAT_COUNT) {
11021 return NULL;
11022 }
11023
11024 switch (format) {
11025 case PIPE_FORMAT_NONE:
11026 return &util_format_none_description;
11027 case PIPE_FORMAT_B8G8R8A8_UNORM:
11028 return &util_format_b8g8r8a8_unorm_description;
11029 case PIPE_FORMAT_B8G8R8X8_UNORM:
11030 return &util_format_b8g8r8x8_unorm_description;
11031 case PIPE_FORMAT_A8R8G8B8_UNORM:
11032 return &util_format_a8r8g8b8_unorm_description;
11033 case PIPE_FORMAT_X8R8G8B8_UNORM:
11034 return &util_format_x8r8g8b8_unorm_description;
11035 case PIPE_FORMAT_A8B8G8R8_UNORM:
11036 return &util_format_a8b8g8r8_unorm_description;
11037 case PIPE_FORMAT_X8B8G8R8_UNORM:
11038 return &util_format_x8b8g8r8_unorm_description;
11039 case PIPE_FORMAT_R8G8B8X8_UNORM:
11040 return &util_format_r8g8b8x8_unorm_description;
11041 case PIPE_FORMAT_B5G5R5X1_UNORM:
11042 return &util_format_b5g5r5x1_unorm_description;
11043 case PIPE_FORMAT_B5G5R5A1_UNORM:
11044 return &util_format_b5g5r5a1_unorm_description;
11045 case PIPE_FORMAT_B4G4R4A4_UNORM:
11046 return &util_format_b4g4r4a4_unorm_description;
11047 case PIPE_FORMAT_B4G4R4X4_UNORM:
11048 return &util_format_b4g4r4x4_unorm_description;
11049 case PIPE_FORMAT_A4B4G4R4_UNORM:
11050 return &util_format_a4b4g4r4_unorm_description;
11051 case PIPE_FORMAT_B5G6R5_UNORM:
11052 return &util_format_b5g6r5_unorm_description;
11053 case PIPE_FORMAT_R10G10B10A2_UNORM:
11054 return &util_format_r10g10b10a2_unorm_description;
11055 case PIPE_FORMAT_R10G10B10X2_UNORM:
11056 return &util_format_r10g10b10x2_unorm_description;
11057 case PIPE_FORMAT_B10G10R10A2_UNORM:
11058 return &util_format_b10g10r10a2_unorm_description;
11059 case PIPE_FORMAT_B2G3R3_UNORM:
11060 return &util_format_b2g3r3_unorm_description;
11061 case PIPE_FORMAT_L8_UNORM:
11062 return &util_format_l8_unorm_description;
11063 case PIPE_FORMAT_A8_UNORM:
11064 return &util_format_a8_unorm_description;
11065 case PIPE_FORMAT_I8_UNORM:
11066 return &util_format_i8_unorm_description;
11067 case PIPE_FORMAT_L4A4_UNORM:
11068 return &util_format_l4a4_unorm_description;
11069 case PIPE_FORMAT_L8A8_UNORM:
11070 return &util_format_l8a8_unorm_description;
11071 case PIPE_FORMAT_L16_UNORM:
11072 return &util_format_l16_unorm_description;
11073 case PIPE_FORMAT_A16_UNORM:
11074 return &util_format_a16_unorm_description;
11075 case PIPE_FORMAT_I16_UNORM:
11076 return &util_format_i16_unorm_description;
11077 case PIPE_FORMAT_L16A16_UNORM:
11078 return &util_format_l16a16_unorm_description;
11079 case PIPE_FORMAT_A8_SNORM:
11080 return &util_format_a8_snorm_description;
11081 case PIPE_FORMAT_L8_SNORM:
11082 return &util_format_l8_snorm_description;
11083 case PIPE_FORMAT_L8A8_SNORM:
11084 return &util_format_l8a8_snorm_description;
11085 case PIPE_FORMAT_I8_SNORM:
11086 return &util_format_i8_snorm_description;
11087 case PIPE_FORMAT_A16_SNORM:
11088 return &util_format_a16_snorm_description;
11089 case PIPE_FORMAT_L16_SNORM:
11090 return &util_format_l16_snorm_description;
11091 case PIPE_FORMAT_L16A16_SNORM:
11092 return &util_format_l16a16_snorm_description;
11093 case PIPE_FORMAT_I16_SNORM:
11094 return &util_format_i16_snorm_description;
11095 case PIPE_FORMAT_A16_FLOAT:
11096 return &util_format_a16_float_description;
11097 case PIPE_FORMAT_L16_FLOAT:
11098 return &util_format_l16_float_description;
11099 case PIPE_FORMAT_L16A16_FLOAT:
11100 return &util_format_l16a16_float_description;
11101 case PIPE_FORMAT_I16_FLOAT:
11102 return &util_format_i16_float_description;
11103 case PIPE_FORMAT_A32_FLOAT:
11104 return &util_format_a32_float_description;
11105 case PIPE_FORMAT_L32_FLOAT:
11106 return &util_format_l32_float_description;
11107 case PIPE_FORMAT_L32A32_FLOAT:
11108 return &util_format_l32a32_float_description;
11109 case PIPE_FORMAT_I32_FLOAT:
11110 return &util_format_i32_float_description;
11111 case PIPE_FORMAT_L8_SRGB:
11112 return &util_format_l8_srgb_description;
11113 case PIPE_FORMAT_R8_SRGB:
11114 return &util_format_r8_srgb_description;
11115 case PIPE_FORMAT_L8A8_SRGB:
11116 return &util_format_l8a8_srgb_description;
11117 case PIPE_FORMAT_R8G8B8_SRGB:
11118 return &util_format_r8g8b8_srgb_description;
11119 case PIPE_FORMAT_R8G8B8A8_SRGB:
11120 return &util_format_r8g8b8a8_srgb_description;
11121 case PIPE_FORMAT_A8B8G8R8_SRGB:
11122 return &util_format_a8b8g8r8_srgb_description;
11123 case PIPE_FORMAT_X8B8G8R8_SRGB:
11124 return &util_format_x8b8g8r8_srgb_description;
11125 case PIPE_FORMAT_B8G8R8A8_SRGB:
11126 return &util_format_b8g8r8a8_srgb_description;
11127 case PIPE_FORMAT_B8G8R8X8_SRGB:
11128 return &util_format_b8g8r8x8_srgb_description;
11129 case PIPE_FORMAT_A8R8G8B8_SRGB:
11130 return &util_format_a8r8g8b8_srgb_description;
11131 case PIPE_FORMAT_X8R8G8B8_SRGB:
11132 return &util_format_x8r8g8b8_srgb_description;
11133 case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
11134 return &util_format_r8sg8sb8ux8u_norm_description;
11135 case PIPE_FORMAT_R10SG10SB10SA2U_NORM:
11136 return &util_format_r10sg10sb10sa2u_norm_description;
11137 case PIPE_FORMAT_R5SG5SB6U_NORM:
11138 return &util_format_r5sg5sb6u_norm_description;
11139 case PIPE_FORMAT_S8_UINT:
11140 return &util_format_s8_uint_description;
11141 case PIPE_FORMAT_Z16_UNORM:
11142 return &util_format_z16_unorm_description;
11143 case PIPE_FORMAT_Z32_UNORM:
11144 return &util_format_z32_unorm_description;
11145 case PIPE_FORMAT_Z32_FLOAT:
11146 return &util_format_z32_float_description;
11147 case PIPE_FORMAT_Z24_UNORM_S8_UINT:
11148 return &util_format_z24_unorm_s8_uint_description;
11149 case PIPE_FORMAT_S8_UINT_Z24_UNORM:
11150 return &util_format_s8_uint_z24_unorm_description;
11151 case PIPE_FORMAT_X24S8_UINT:
11152 return &util_format_x24s8_uint_description;
11153 case PIPE_FORMAT_S8X24_UINT:
11154 return &util_format_s8x24_uint_description;
11155 case PIPE_FORMAT_Z24X8_UNORM:
11156 return &util_format_z24x8_unorm_description;
11157 case PIPE_FORMAT_X8Z24_UNORM:
11158 return &util_format_x8z24_unorm_description;
11159 case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
11160 return &util_format_z32_float_s8x24_uint_description;
11161 case PIPE_FORMAT_X32_S8X24_UINT:
11162 return &util_format_x32_s8x24_uint_description;
11163 case PIPE_FORMAT_UYVY:
11164 return &util_format_uyvy_description;
11165 case PIPE_FORMAT_YUYV:
11166 return &util_format_yuyv_description;
11167 case PIPE_FORMAT_R8G8_B8G8_UNORM:
11168 return &util_format_r8g8_b8g8_unorm_description;
11169 case PIPE_FORMAT_G8R8_G8B8_UNORM:
11170 return &util_format_g8r8_g8b8_unorm_description;
11171 case PIPE_FORMAT_G8R8_B8R8_UNORM:
11172 return &util_format_g8r8_b8r8_unorm_description;
11173 case PIPE_FORMAT_R8G8_R8B8_UNORM:
11174 return &util_format_r8g8_r8b8_unorm_description;
11175 case PIPE_FORMAT_R11G11B10_FLOAT:
11176 return &util_format_r11g11b10_float_description;
11177 case PIPE_FORMAT_R9G9B9E5_FLOAT:
11178 return &util_format_r9g9b9e5_float_description;
11179 case PIPE_FORMAT_R1_UNORM:
11180 return &util_format_r1_unorm_description;
11181 case PIPE_FORMAT_R8G8Bx_SNORM:
11182 return &util_format_r8g8bx_snorm_description;
11183 case PIPE_FORMAT_DXT1_RGB:
11184 return &util_format_dxt1_rgb_description;
11185 case PIPE_FORMAT_DXT1_RGBA:
11186 return &util_format_dxt1_rgba_description;
11187 case PIPE_FORMAT_DXT3_RGBA:
11188 return &util_format_dxt3_rgba_description;
11189 case PIPE_FORMAT_DXT5_RGBA:
11190 return &util_format_dxt5_rgba_description;
11191 case PIPE_FORMAT_DXT1_SRGB:
11192 return &util_format_dxt1_srgb_description;
11193 case PIPE_FORMAT_DXT1_SRGBA:
11194 return &util_format_dxt1_srgba_description;
11195 case PIPE_FORMAT_DXT3_SRGBA:
11196 return &util_format_dxt3_srgba_description;
11197 case PIPE_FORMAT_DXT5_SRGBA:
11198 return &util_format_dxt5_srgba_description;
11199 case PIPE_FORMAT_RGTC1_UNORM:
11200 return &util_format_rgtc1_unorm_description;
11201 case PIPE_FORMAT_RGTC1_SNORM:
11202 return &util_format_rgtc1_snorm_description;
11203 case PIPE_FORMAT_RGTC2_UNORM:
11204 return &util_format_rgtc2_unorm_description;
11205 case PIPE_FORMAT_RGTC2_SNORM:
11206 return &util_format_rgtc2_snorm_description;
11207 case PIPE_FORMAT_LATC1_UNORM:
11208 return &util_format_latc1_unorm_description;
11209 case PIPE_FORMAT_LATC1_SNORM:
11210 return &util_format_latc1_snorm_description;
11211 case PIPE_FORMAT_LATC2_UNORM:
11212 return &util_format_latc2_unorm_description;
11213 case PIPE_FORMAT_LATC2_SNORM:
11214 return &util_format_latc2_snorm_description;
11215 case PIPE_FORMAT_ETC1_RGB8:
11216 return &util_format_etc1_rgb8_description;
11217 case PIPE_FORMAT_BPTC_RGBA_UNORM:
11218 return &util_format_bptc_rgba_unorm_description;
11219 case PIPE_FORMAT_BPTC_SRGBA:
11220 return &util_format_bptc_srgba_description;
11221 case PIPE_FORMAT_BPTC_RGB_FLOAT:
11222 return &util_format_bptc_rgb_float_description;
11223 case PIPE_FORMAT_BPTC_RGB_UFLOAT:
11224 return &util_format_bptc_rgb_ufloat_description;
11225 case PIPE_FORMAT_R64_FLOAT:
11226 return &util_format_r64_float_description;
11227 case PIPE_FORMAT_R64G64_FLOAT:
11228 return &util_format_r64g64_float_description;
11229 case PIPE_FORMAT_R64G64B64_FLOAT:
11230 return &util_format_r64g64b64_float_description;
11231 case PIPE_FORMAT_R64G64B64A64_FLOAT:
11232 return &util_format_r64g64b64a64_float_description;
11233 case PIPE_FORMAT_R32_FLOAT:
11234 return &util_format_r32_float_description;
11235 case PIPE_FORMAT_R32G32_FLOAT:
11236 return &util_format_r32g32_float_description;
11237 case PIPE_FORMAT_R32G32B32_FLOAT:
11238 return &util_format_r32g32b32_float_description;
11239 case PIPE_FORMAT_R32G32B32A32_FLOAT:
11240 return &util_format_r32g32b32a32_float_description;
11241 case PIPE_FORMAT_R32_UNORM:
11242 return &util_format_r32_unorm_description;
11243 case PIPE_FORMAT_R32G32_UNORM:
11244 return &util_format_r32g32_unorm_description;
11245 case PIPE_FORMAT_R32G32B32_UNORM:
11246 return &util_format_r32g32b32_unorm_description;
11247 case PIPE_FORMAT_R32G32B32A32_UNORM:
11248 return &util_format_r32g32b32a32_unorm_description;
11249 case PIPE_FORMAT_R32_USCALED:
11250 return &util_format_r32_uscaled_description;
11251 case PIPE_FORMAT_R32G32_USCALED:
11252 return &util_format_r32g32_uscaled_description;
11253 case PIPE_FORMAT_R32G32B32_USCALED:
11254 return &util_format_r32g32b32_uscaled_description;
11255 case PIPE_FORMAT_R32G32B32A32_USCALED:
11256 return &util_format_r32g32b32a32_uscaled_description;
11257 case PIPE_FORMAT_R32_SNORM:
11258 return &util_format_r32_snorm_description;
11259 case PIPE_FORMAT_R32G32_SNORM:
11260 return &util_format_r32g32_snorm_description;
11261 case PIPE_FORMAT_R32G32B32_SNORM:
11262 return &util_format_r32g32b32_snorm_description;
11263 case PIPE_FORMAT_R32G32B32A32_SNORM:
11264 return &util_format_r32g32b32a32_snorm_description;
11265 case PIPE_FORMAT_R32_SSCALED:
11266 return &util_format_r32_sscaled_description;
11267 case PIPE_FORMAT_R32G32_SSCALED:
11268 return &util_format_r32g32_sscaled_description;
11269 case PIPE_FORMAT_R32G32B32_SSCALED:
11270 return &util_format_r32g32b32_sscaled_description;
11271 case PIPE_FORMAT_R32G32B32A32_SSCALED:
11272 return &util_format_r32g32b32a32_sscaled_description;
11273 case PIPE_FORMAT_R16_FLOAT:
11274 return &util_format_r16_float_description;
11275 case PIPE_FORMAT_R16G16_FLOAT:
11276 return &util_format_r16g16_float_description;
11277 case PIPE_FORMAT_R16G16B16_FLOAT:
11278 return &util_format_r16g16b16_float_description;
11279 case PIPE_FORMAT_R16G16B16A16_FLOAT:
11280 return &util_format_r16g16b16a16_float_description;
11281 case PIPE_FORMAT_R16_UNORM:
11282 return &util_format_r16_unorm_description;
11283 case PIPE_FORMAT_R16G16_UNORM:
11284 return &util_format_r16g16_unorm_description;
11285 case PIPE_FORMAT_R16G16B16_UNORM:
11286 return &util_format_r16g16b16_unorm_description;
11287 case PIPE_FORMAT_R16G16B16A16_UNORM:
11288 return &util_format_r16g16b16a16_unorm_description;
11289 case PIPE_FORMAT_R16_USCALED:
11290 return &util_format_r16_uscaled_description;
11291 case PIPE_FORMAT_R16G16_USCALED:
11292 return &util_format_r16g16_uscaled_description;
11293 case PIPE_FORMAT_R16G16B16_USCALED:
11294 return &util_format_r16g16b16_uscaled_description;
11295 case PIPE_FORMAT_R16G16B16A16_USCALED:
11296 return &util_format_r16g16b16a16_uscaled_description;
11297 case PIPE_FORMAT_R16_SNORM:
11298 return &util_format_r16_snorm_description;
11299 case PIPE_FORMAT_R16G16_SNORM:
11300 return &util_format_r16g16_snorm_description;
11301 case PIPE_FORMAT_R16G16B16_SNORM:
11302 return &util_format_r16g16b16_snorm_description;
11303 case PIPE_FORMAT_R16G16B16A16_SNORM:
11304 return &util_format_r16g16b16a16_snorm_description;
11305 case PIPE_FORMAT_R16_SSCALED:
11306 return &util_format_r16_sscaled_description;
11307 case PIPE_FORMAT_R16G16_SSCALED:
11308 return &util_format_r16g16_sscaled_description;
11309 case PIPE_FORMAT_R16G16B16_SSCALED:
11310 return &util_format_r16g16b16_sscaled_description;
11311 case PIPE_FORMAT_R16G16B16A16_SSCALED:
11312 return &util_format_r16g16b16a16_sscaled_description;
11313 case PIPE_FORMAT_R8_UNORM:
11314 return &util_format_r8_unorm_description;
11315 case PIPE_FORMAT_R8G8_UNORM:
11316 return &util_format_r8g8_unorm_description;
11317 case PIPE_FORMAT_R8G8B8_UNORM:
11318 return &util_format_r8g8b8_unorm_description;
11319 case PIPE_FORMAT_R8G8B8A8_UNORM:
11320 return &util_format_r8g8b8a8_unorm_description;
11321 case PIPE_FORMAT_R8_USCALED:
11322 return &util_format_r8_uscaled_description;
11323 case PIPE_FORMAT_R8G8_USCALED:
11324 return &util_format_r8g8_uscaled_description;
11325 case PIPE_FORMAT_R8G8B8_USCALED:
11326 return &util_format_r8g8b8_uscaled_description;
11327 case PIPE_FORMAT_R8G8B8A8_USCALED:
11328 return &util_format_r8g8b8a8_uscaled_description;
11329 case PIPE_FORMAT_R8_SNORM:
11330 return &util_format_r8_snorm_description;
11331 case PIPE_FORMAT_R8G8_SNORM:
11332 return &util_format_r8g8_snorm_description;
11333 case PIPE_FORMAT_R8G8B8_SNORM:
11334 return &util_format_r8g8b8_snorm_description;
11335 case PIPE_FORMAT_R8G8B8A8_SNORM:
11336 return &util_format_r8g8b8a8_snorm_description;
11337 case PIPE_FORMAT_R8_SSCALED:
11338 return &util_format_r8_sscaled_description;
11339 case PIPE_FORMAT_R8G8_SSCALED:
11340 return &util_format_r8g8_sscaled_description;
11341 case PIPE_FORMAT_R8G8B8_SSCALED:
11342 return &util_format_r8g8b8_sscaled_description;
11343 case PIPE_FORMAT_R8G8B8A8_SSCALED:
11344 return &util_format_r8g8b8a8_sscaled_description;
11345 case PIPE_FORMAT_R32_FIXED:
11346 return &util_format_r32_fixed_description;
11347 case PIPE_FORMAT_R32G32_FIXED:
11348 return &util_format_r32g32_fixed_description;
11349 case PIPE_FORMAT_R32G32B32_FIXED:
11350 return &util_format_r32g32b32_fixed_description;
11351 case PIPE_FORMAT_R32G32B32A32_FIXED:
11352 return &util_format_r32g32b32a32_fixed_description;
11353 case PIPE_FORMAT_R10G10B10X2_USCALED:
11354 return &util_format_r10g10b10x2_uscaled_description;
11355 case PIPE_FORMAT_R10G10B10X2_SNORM:
11356 return &util_format_r10g10b10x2_snorm_description;
11357 case PIPE_FORMAT_YV12:
11358 return &util_format_yv12_description;
11359 case PIPE_FORMAT_YV16:
11360 return &util_format_yv16_description;
11361 case PIPE_FORMAT_IYUV:
11362 return &util_format_iyuv_description;
11363 case PIPE_FORMAT_NV12:
11364 return &util_format_nv12_description;
11365 case PIPE_FORMAT_NV21:
11366 return &util_format_nv21_description;
11367 case PIPE_FORMAT_A4R4_UNORM:
11368 return &util_format_a4r4_unorm_description;
11369 case PIPE_FORMAT_R4A4_UNORM:
11370 return &util_format_r4a4_unorm_description;
11371 case PIPE_FORMAT_R8A8_UNORM:
11372 return &util_format_r8a8_unorm_description;
11373 case PIPE_FORMAT_A8R8_UNORM:
11374 return &util_format_a8r8_unorm_description;
11375 case PIPE_FORMAT_R10G10B10A2_USCALED:
11376 return &util_format_r10g10b10a2_uscaled_description;
11377 case PIPE_FORMAT_R10G10B10A2_SSCALED:
11378 return &util_format_r10g10b10a2_sscaled_description;
11379 case PIPE_FORMAT_R10G10B10A2_SNORM:
11380 return &util_format_r10g10b10a2_snorm_description;
11381 case PIPE_FORMAT_B10G10R10A2_USCALED:
11382 return &util_format_b10g10r10a2_uscaled_description;
11383 case PIPE_FORMAT_B10G10R10A2_SSCALED:
11384 return &util_format_b10g10r10a2_sscaled_description;
11385 case PIPE_FORMAT_B10G10R10A2_SNORM:
11386 return &util_format_b10g10r10a2_snorm_description;
11387 case PIPE_FORMAT_R8_UINT:
11388 return &util_format_r8_uint_description;
11389 case PIPE_FORMAT_R8G8_UINT:
11390 return &util_format_r8g8_uint_description;
11391 case PIPE_FORMAT_R8G8B8_UINT:
11392 return &util_format_r8g8b8_uint_description;
11393 case PIPE_FORMAT_R8G8B8A8_UINT:
11394 return &util_format_r8g8b8a8_uint_description;
11395 case PIPE_FORMAT_R8_SINT:
11396 return &util_format_r8_sint_description;
11397 case PIPE_FORMAT_R8G8_SINT:
11398 return &util_format_r8g8_sint_description;
11399 case PIPE_FORMAT_R8G8B8_SINT:
11400 return &util_format_r8g8b8_sint_description;
11401 case PIPE_FORMAT_R8G8B8A8_SINT:
11402 return &util_format_r8g8b8a8_sint_description;
11403 case PIPE_FORMAT_R16_UINT:
11404 return &util_format_r16_uint_description;
11405 case PIPE_FORMAT_R16G16_UINT:
11406 return &util_format_r16g16_uint_description;
11407 case PIPE_FORMAT_R16G16B16_UINT:
11408 return &util_format_r16g16b16_uint_description;
11409 case PIPE_FORMAT_R16G16B16A16_UINT:
11410 return &util_format_r16g16b16a16_uint_description;
11411 case PIPE_FORMAT_R16_SINT:
11412 return &util_format_r16_sint_description;
11413 case PIPE_FORMAT_R16G16_SINT:
11414 return &util_format_r16g16_sint_description;
11415 case PIPE_FORMAT_R16G16B16_SINT:
11416 return &util_format_r16g16b16_sint_description;
11417 case PIPE_FORMAT_R16G16B16A16_SINT:
11418 return &util_format_r16g16b16a16_sint_description;
11419 case PIPE_FORMAT_R32_UINT:
11420 return &util_format_r32_uint_description;
11421 case PIPE_FORMAT_R32G32_UINT:
11422 return &util_format_r32g32_uint_description;
11423 case PIPE_FORMAT_R32G32B32_UINT:
11424 return &util_format_r32g32b32_uint_description;
11425 case PIPE_FORMAT_R32G32B32A32_UINT:
11426 return &util_format_r32g32b32a32_uint_description;
11427 case PIPE_FORMAT_R32_SINT:
11428 return &util_format_r32_sint_description;
11429 case PIPE_FORMAT_R32G32_SINT:
11430 return &util_format_r32g32_sint_description;
11431 case PIPE_FORMAT_R32G32B32_SINT:
11432 return &util_format_r32g32b32_sint_description;
11433 case PIPE_FORMAT_R32G32B32A32_SINT:
11434 return &util_format_r32g32b32a32_sint_description;
11435 case PIPE_FORMAT_A8_UINT:
11436 return &util_format_a8_uint_description;
11437 case PIPE_FORMAT_I8_UINT:
11438 return &util_format_i8_uint_description;
11439 case PIPE_FORMAT_L8_UINT:
11440 return &util_format_l8_uint_description;
11441 case PIPE_FORMAT_L8A8_UINT:
11442 return &util_format_l8a8_uint_description;
11443 case PIPE_FORMAT_A8_SINT:
11444 return &util_format_a8_sint_description;
11445 case PIPE_FORMAT_I8_SINT:
11446 return &util_format_i8_sint_description;
11447 case PIPE_FORMAT_L8_SINT:
11448 return &util_format_l8_sint_description;
11449 case PIPE_FORMAT_L8A8_SINT:
11450 return &util_format_l8a8_sint_description;
11451 case PIPE_FORMAT_A16_UINT:
11452 return &util_format_a16_uint_description;
11453 case PIPE_FORMAT_I16_UINT:
11454 return &util_format_i16_uint_description;
11455 case PIPE_FORMAT_L16_UINT:
11456 return &util_format_l16_uint_description;
11457 case PIPE_FORMAT_L16A16_UINT:
11458 return &util_format_l16a16_uint_description;
11459 case PIPE_FORMAT_A16_SINT:
11460 return &util_format_a16_sint_description;
11461 case PIPE_FORMAT_I16_SINT:
11462 return &util_format_i16_sint_description;
11463 case PIPE_FORMAT_L16_SINT:
11464 return &util_format_l16_sint_description;
11465 case PIPE_FORMAT_L16A16_SINT:
11466 return &util_format_l16a16_sint_description;
11467 case PIPE_FORMAT_A32_UINT:
11468 return &util_format_a32_uint_description;
11469 case PIPE_FORMAT_I32_UINT:
11470 return &util_format_i32_uint_description;
11471 case PIPE_FORMAT_L32_UINT:
11472 return &util_format_l32_uint_description;
11473 case PIPE_FORMAT_L32A32_UINT:
11474 return &util_format_l32a32_uint_description;
11475 case PIPE_FORMAT_A32_SINT:
11476 return &util_format_a32_sint_description;
11477 case PIPE_FORMAT_I32_SINT:
11478 return &util_format_i32_sint_description;
11479 case PIPE_FORMAT_L32_SINT:
11480 return &util_format_l32_sint_description;
11481 case PIPE_FORMAT_L32A32_SINT:
11482 return &util_format_l32a32_sint_description;
11483 case PIPE_FORMAT_B10G10R10A2_UINT:
11484 return &util_format_b10g10r10a2_uint_description;
11485 case PIPE_FORMAT_R8G8B8X8_SNORM:
11486 return &util_format_r8g8b8x8_snorm_description;
11487 case PIPE_FORMAT_R8G8B8X8_SRGB:
11488 return &util_format_r8g8b8x8_srgb_description;
11489 case PIPE_FORMAT_R8G8B8X8_UINT:
11490 return &util_format_r8g8b8x8_uint_description;
11491 case PIPE_FORMAT_R8G8B8X8_SINT:
11492 return &util_format_r8g8b8x8_sint_description;
11493 case PIPE_FORMAT_B10G10R10X2_UNORM:
11494 return &util_format_b10g10r10x2_unorm_description;
11495 case PIPE_FORMAT_R16G16B16X16_UNORM:
11496 return &util_format_r16g16b16x16_unorm_description;
11497 case PIPE_FORMAT_R16G16B16X16_SNORM:
11498 return &util_format_r16g16b16x16_snorm_description;
11499 case PIPE_FORMAT_R16G16B16X16_FLOAT:
11500 return &util_format_r16g16b16x16_float_description;
11501 case PIPE_FORMAT_R16G16B16X16_UINT:
11502 return &util_format_r16g16b16x16_uint_description;
11503 case PIPE_FORMAT_R16G16B16X16_SINT:
11504 return &util_format_r16g16b16x16_sint_description;
11505 case PIPE_FORMAT_R32G32B32X32_FLOAT:
11506 return &util_format_r32g32b32x32_float_description;
11507 case PIPE_FORMAT_R32G32B32X32_UINT:
11508 return &util_format_r32g32b32x32_uint_description;
11509 case PIPE_FORMAT_R32G32B32X32_SINT:
11510 return &util_format_r32g32b32x32_sint_description;
11511 case PIPE_FORMAT_R8A8_SNORM:
11512 return &util_format_r8a8_snorm_description;
11513 case PIPE_FORMAT_R16A16_UNORM:
11514 return &util_format_r16a16_unorm_description;
11515 case PIPE_FORMAT_R16A16_SNORM:
11516 return &util_format_r16a16_snorm_description;
11517 case PIPE_FORMAT_R16A16_FLOAT:
11518 return &util_format_r16a16_float_description;
11519 case PIPE_FORMAT_R32A32_FLOAT:
11520 return &util_format_r32a32_float_description;
11521 case PIPE_FORMAT_R8A8_UINT:
11522 return &util_format_r8a8_uint_description;
11523 case PIPE_FORMAT_R8A8_SINT:
11524 return &util_format_r8a8_sint_description;
11525 case PIPE_FORMAT_R16A16_UINT:
11526 return &util_format_r16a16_uint_description;
11527 case PIPE_FORMAT_R16A16_SINT:
11528 return &util_format_r16a16_sint_description;
11529 case PIPE_FORMAT_R32A32_UINT:
11530 return &util_format_r32a32_uint_description;
11531 case PIPE_FORMAT_R32A32_SINT:
11532 return &util_format_r32a32_sint_description;
11533 case PIPE_FORMAT_R10G10B10A2_UINT:
11534 return &util_format_r10g10b10a2_uint_description;
11535 case PIPE_FORMAT_B5G6R5_SRGB:
11536 return &util_format_b5g6r5_srgb_description;
11537 case PIPE_FORMAT_A8L8_UNORM:
11538 return &util_format_a8l8_unorm_description;
11539 case PIPE_FORMAT_A8L8_SNORM:
11540 return &util_format_a8l8_snorm_description;
11541 case PIPE_FORMAT_A8L8_SRGB:
11542 return &util_format_a8l8_srgb_description;
11543 case PIPE_FORMAT_A16L16_UNORM:
11544 return &util_format_a16l16_unorm_description;
11545 case PIPE_FORMAT_G8R8_UNORM:
11546 return &util_format_g8r8_unorm_description;
11547 case PIPE_FORMAT_G8R8_SNORM:
11548 return &util_format_g8r8_snorm_description;
11549 case PIPE_FORMAT_G16R16_UNORM:
11550 return &util_format_g16r16_unorm_description;
11551 case PIPE_FORMAT_G16R16_SNORM:
11552 return &util_format_g16r16_snorm_description;
11553 case PIPE_FORMAT_A8B8G8R8_SNORM:
11554 return &util_format_a8b8g8r8_snorm_description;
11555 case PIPE_FORMAT_X8B8G8R8_SNORM:
11556 return &util_format_x8b8g8r8_snorm_description;
11557 case PIPE_FORMAT_ETC2_RGB8:
11558 return &util_format_etc2_rgb8_description;
11559 case PIPE_FORMAT_ETC2_SRGB8:
11560 return &util_format_etc2_srgb8_description;
11561 case PIPE_FORMAT_ETC2_RGB8A1:
11562 return &util_format_etc2_rgb8a1_description;
11563 case PIPE_FORMAT_ETC2_SRGB8A1:
11564 return &util_format_etc2_srgb8a1_description;
11565 case PIPE_FORMAT_ETC2_RGBA8:
11566 return &util_format_etc2_rgba8_description;
11567 case PIPE_FORMAT_ETC2_SRGBA8:
11568 return &util_format_etc2_srgba8_description;
11569 case PIPE_FORMAT_ETC2_R11_UNORM:
11570 return &util_format_etc2_r11_unorm_description;
11571 case PIPE_FORMAT_ETC2_R11_SNORM:
11572 return &util_format_etc2_r11_snorm_description;
11573 case PIPE_FORMAT_ETC2_RG11_UNORM:
11574 return &util_format_etc2_rg11_unorm_description;
11575 case PIPE_FORMAT_ETC2_RG11_SNORM:
11576 return &util_format_etc2_rg11_snorm_description;
11577 case PIPE_FORMAT_ASTC_4x4:
11578 return &util_format_astc_4x4_description;
11579 case PIPE_FORMAT_ASTC_5x4:
11580 return &util_format_astc_5x4_description;
11581 case PIPE_FORMAT_ASTC_5x5:
11582 return &util_format_astc_5x5_description;
11583 case PIPE_FORMAT_ASTC_6x5:
11584 return &util_format_astc_6x5_description;
11585 case PIPE_FORMAT_ASTC_6x6:
11586 return &util_format_astc_6x6_description;
11587 case PIPE_FORMAT_ASTC_8x5:
11588 return &util_format_astc_8x5_description;
11589 case PIPE_FORMAT_ASTC_8x6:
11590 return &util_format_astc_8x6_description;
11591 case PIPE_FORMAT_ASTC_8x8:
11592 return &util_format_astc_8x8_description;
11593 case PIPE_FORMAT_ASTC_10x5:
11594 return &util_format_astc_10x5_description;
11595 case PIPE_FORMAT_ASTC_10x6:
11596 return &util_format_astc_10x6_description;
11597 case PIPE_FORMAT_ASTC_10x8:
11598 return &util_format_astc_10x8_description;
11599 case PIPE_FORMAT_ASTC_10x10:
11600 return &util_format_astc_10x10_description;
11601 case PIPE_FORMAT_ASTC_12x10:
11602 return &util_format_astc_12x10_description;
11603 case PIPE_FORMAT_ASTC_12x12:
11604 return &util_format_astc_12x12_description;
11605 case PIPE_FORMAT_ASTC_4x4_SRGB:
11606 return &util_format_astc_4x4_srgb_description;
11607 case PIPE_FORMAT_ASTC_5x4_SRGB:
11608 return &util_format_astc_5x4_srgb_description;
11609 case PIPE_FORMAT_ASTC_5x5_SRGB:
11610 return &util_format_astc_5x5_srgb_description;
11611 case PIPE_FORMAT_ASTC_6x5_SRGB:
11612 return &util_format_astc_6x5_srgb_description;
11613 case PIPE_FORMAT_ASTC_6x6_SRGB:
11614 return &util_format_astc_6x6_srgb_description;
11615 case PIPE_FORMAT_ASTC_8x5_SRGB:
11616 return &util_format_astc_8x5_srgb_description;
11617 case PIPE_FORMAT_ASTC_8x6_SRGB:
11618 return &util_format_astc_8x6_srgb_description;
11619 case PIPE_FORMAT_ASTC_8x8_SRGB:
11620 return &util_format_astc_8x8_srgb_description;
11621 case PIPE_FORMAT_ASTC_10x5_SRGB:
11622 return &util_format_astc_10x5_srgb_description;
11623 case PIPE_FORMAT_ASTC_10x6_SRGB:
11624 return &util_format_astc_10x6_srgb_description;
11625 case PIPE_FORMAT_ASTC_10x8_SRGB:
11626 return &util_format_astc_10x8_srgb_description;
11627 case PIPE_FORMAT_ASTC_10x10_SRGB:
11628 return &util_format_astc_10x10_srgb_description;
11629 case PIPE_FORMAT_ASTC_12x10_SRGB:
11630 return &util_format_astc_12x10_srgb_description;
11631 case PIPE_FORMAT_ASTC_12x12_SRGB:
11632 return &util_format_astc_12x12_srgb_description;
11633 default:
11634 return NULL;
11635 }
11636 }
11637
11638