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