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