1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656

use crate::ffi::root::gli;

use std::fmt;

pub enum TexFormatType {
    DDS,
    KTX,
    KMG,
}

/// Texture data format.
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct Format(pub(crate) gli::format);

impl Format {

    /// Evaluate whether a format value is value or not.
    #[inline]
    pub fn is_valid(&self) -> bool {
        self.0 >= Format::FIRST.0 && self.0 <= Format::LAST.0
    }

    /// Evaluate whether a format is compressed with an S3TC algorithm.
    #[inline]
    pub fn is_compressed(&self) -> bool {
        unsafe { gli::is_compressed(self.0) }
    }

    /// Evaluate whether a format is compressed with an S3TC algorithm.
    #[inline]
    pub fn is_s3tc_compressed(&self) -> bool {
        unsafe { gli::is_s3tc_compressed(self.0) }
    }

    /// Evaluate whether a format stores sRGB color space values.
    #[inline]
    pub fn is_srgb(&self) -> bool {
        unsafe { gli::is_srgb(self.0) }
    }

    // TODO: Implement block_size, block_extent and component_count.
//    /// Return the size in bytes of a block for a format.
//    #[inline]
//    pub fn block_size(&self) -> usize {
//        unsafe { gli::block_size(self.0) }
//    }

//    /// Return the dimensions in texels of the block for a format
//    #[inline]
//    pub fn block_extent(&self) -> [u32; 3usize] {
//
//    }

//    /// Return the number of components of a format
//    #[inline]
//    size_t component_count(&self) -> bool {}

    /// Evaluate whether a format is unsigned.
    #[inline]
    pub fn is_unsigned(&self) -> bool {
        unsafe { gli::is_unsigned(self.0) }
    }

    /// Evaluate whether a format is signed.
    #[inline]
    pub fn is_signed(&self) -> bool {
        unsafe { gli::is_signed(self.0) }
    }

    /// Evaluate whether the format is an integer format.
    #[inline]
    pub fn is_integer(&self) -> bool {
        unsafe { gli::is_integer(self.0) }
    }

    /// Evaluate whether the format is a signed integer format.
    #[inline]
    pub fn is_signed_integer(&self) -> bool {
        unsafe { gli::is_signed_integer(self.0) }
    }

    /// Evaluate whether the format is an unsigned integer format.
    #[inline]
    pub fn is_unsigned_integer(&self) -> bool {
        unsafe { gli::is_unsigned_integer(self.0) }
    }

    /// Evaluate whether the format is an float format.
    #[inline]
    pub fn is_float(&self) -> bool {
        unsafe { gli::is_float(self.0) }
    }

    /// Evaluate whether the format is normalized.
    #[inline]
    pub fn is_normalized(&self) -> bool {
        unsafe { gli::is_normalized(self.0) }
    }

    /// Evaluate whether the format is an unsigned normalized format.
    #[inline]
    pub fn is_unorm(&self) -> bool {
        unsafe { gli::is_unorm(self.0) }
    }

    /// Evaluate whether the format is a signed normalized format.
    #[inline]
    pub fn is_snorm(&self) -> bool {
        unsafe { gli::is_snorm(self.0) }
    }

    /// Evaluate whether the format is packed.
    #[inline]
    pub fn is_packed(&self) -> bool {
        unsafe { gli::is_packed(self.0) }
    }

    /// Evaluate whether the format is a depth format.
    #[inline]
    pub fn is_depth(&self) -> bool {
        unsafe { gli::is_depth(self.0) }
    }

    /// Evaluate whether the format has a stencil component.
    #[inline]
    pub fn is_stencil(&self) -> bool {
        unsafe { gli::is_stencil(self.0) }
    }

    /// Evaluate whether the format has depth and stencil components.
    #[inline]
    pub fn is_depth_stencil(&self) -> bool {
        unsafe { gli::is_depth_stencil(self.0) }
    }
}

/// Represent the source of a channel.
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct Swizzle(pub(crate) gli::swizzle);

pub type Swizzles = [gli::swizzle; 4];

impl Swizzle {

    /// Determine whether the Swizzle value represent a channel.
    #[inline]
    pub fn is_channel(&self) -> bool {
        self.0 >= Swizzle::CHANNEL_FIRST.0 && self.0 <= Swizzle::LAST.0
    }
}

impl Format {
    pub const UNDEFINED: Format = Format(gli::format_FORMAT_UNDEFINED);

    pub const FIRST               : Format = Format(gli::format_FORMAT_FIRST);
    pub const RG4_UNORM_PACK8     : Format = Format(gli::format_FORMAT_RG4_UNORM_PACK8);
    pub const RGBA4_UNORM_PACK16  : Format = Format(gli::format_FORMAT_RGBA4_UNORM_PACK16);
    pub const BGRA4_UNORM_PACK16  : Format = Format(gli::format_FORMAT_BGRA4_UNORM_PACK16);
    pub const R5G6B5_UNORM_PACK16 : Format = Format(gli::format_FORMAT_R5G6B5_UNORM_PACK16);
    pub const B5G6R5_UNORM_PACK16 : Format = Format(gli::format_FORMAT_B5G6R5_UNORM_PACK16);
    pub const RGB5A1_UNORM_PACK16 : Format = Format(gli::format_FORMAT_RGB5A1_UNORM_PACK16);
    pub const BGR5A1_UNORM_PACK16 : Format = Format(gli::format_FORMAT_BGR5A1_UNORM_PACK16);
    pub const A1RGB5_UNORM_PACK16 : Format = Format(gli::format_FORMAT_A1RGB5_UNORM_PACK16);

    pub const R8_UNORM_PACK8   : Format = Format(gli::format_FORMAT_R8_UNORM_PACK8);
    pub const R8_SNORM_PACK8   : Format = Format(gli::format_FORMAT_R8_SNORM_PACK8);
    pub const R8_USCALED_PACK8 : Format = Format(gli::format_FORMAT_R8_USCALED_PACK8);
    pub const R8_SSCALED_PACK8 : Format = Format(gli::format_FORMAT_R8_SSCALED_PACK8);
    pub const R8_UINT_PACK8    : Format = Format(gli::format_FORMAT_R8_UINT_PACK8);
    pub const R8_SINT_PACK8    : Format = Format(gli::format_FORMAT_R8_SINT_PACK8);
    pub const R8_SRGB_PACK8    : Format = Format(gli::format_FORMAT_R8_SRGB_PACK8);

    pub const RG8_UNORM_PACK8   : Format = Format(gli::format_FORMAT_RG8_UNORM_PACK8);
    pub const RG8_SNORM_PACK8   : Format = Format(gli::format_FORMAT_RG8_SNORM_PACK8);
    pub const RG8_USCALED_PACK8 : Format = Format(gli::format_FORMAT_RG8_USCALED_PACK8);
    pub const RG8_SSCALED_PACK8 : Format = Format(gli::format_FORMAT_RG8_SSCALED_PACK8);
    pub const RG8_UINT_PACK8    : Format = Format(gli::format_FORMAT_RG8_UINT_PACK8);
    pub const RG8_SINT_PACK8    : Format = Format(gli::format_FORMAT_RG8_SINT_PACK8);
    pub const RG8_SRGB_PACK8    : Format = Format(gli::format_FORMAT_RG8_SRGB_PACK8);

    pub const RGB8_UNORM_PACK8   : Format = Format(gli::format_FORMAT_RGB8_UNORM_PACK8);
    pub const RGB8_SNORM_PACK8   : Format = Format(gli::format_FORMAT_RGB8_SNORM_PACK8);
    pub const RGB8_USCALED_PACK8 : Format = Format(gli::format_FORMAT_RGB8_USCALED_PACK8);
    pub const RGB8_SSCALED_PACK8 : Format = Format(gli::format_FORMAT_RGB8_SSCALED_PACK8);
    pub const RGB8_UINT_PACK8    : Format = Format(gli::format_FORMAT_RGB8_UINT_PACK8);
    pub const RGB8_SINT_PACK8    : Format = Format(gli::format_FORMAT_RGB8_SINT_PACK8);
    pub const RGB8_SRGB_PACK8    : Format = Format(gli::format_FORMAT_RGB8_SRGB_PACK8);

    pub const BGR8_UNORM_PACK8   : Format = Format(gli::format_FORMAT_BGR8_UNORM_PACK8);
    pub const BGR8_SNORM_PACK8   : Format = Format(gli::format_FORMAT_BGR8_SNORM_PACK8);
    pub const BGR8_USCALED_PACK8 : Format = Format(gli::format_FORMAT_BGR8_USCALED_PACK8);
    pub const BGR8_SSCALED_PACK8 : Format = Format(gli::format_FORMAT_BGR8_SSCALED_PACK8);
    pub const BGR8_UINT_PACK8    : Format = Format(gli::format_FORMAT_BGR8_UINT_PACK8);
    pub const BGR8_SINT_PACK8    : Format = Format(gli::format_FORMAT_BGR8_SINT_PACK8);
    pub const BGR8_SRGB_PACK8    : Format = Format(gli::format_FORMAT_BGR8_SRGB_PACK8);

    pub const RGBA8_UNORM_PACK8   : Format = Format(gli::format_FORMAT_RGBA8_UNORM_PACK8);
    pub const RGBA8_SNORM_PACK8   : Format = Format(gli::format_FORMAT_RGBA8_SNORM_PACK8);
    pub const RGBA8_USCALED_PACK8 : Format = Format(gli::format_FORMAT_RGBA8_USCALED_PACK8);
    pub const RGBA8_SSCALED_PACK8 : Format = Format(gli::format_FORMAT_RGBA8_SSCALED_PACK8);
    pub const RGBA8_UINT_PACK8    : Format = Format(gli::format_FORMAT_RGBA8_UINT_PACK8);
    pub const RGBA8_SINT_PACK8    : Format = Format(gli::format_FORMAT_RGBA8_SINT_PACK8);
    pub const RGBA8_SRGB_PACK8    : Format = Format(gli::format_FORMAT_RGBA8_SRGB_PACK8);

    pub const BGRA8_UNORM_PACK8   : Format = Format(gli::format_FORMAT_BGRA8_UNORM_PACK8);
    pub const BGRA8_SNORM_PACK8   : Format = Format(gli::format_FORMAT_BGRA8_SNORM_PACK8);
    pub const BGRA8_USCALED_PACK8 : Format = Format(gli::format_FORMAT_BGRA8_USCALED_PACK8);
    pub const BGRA8_SSCALED_PACK8 : Format = Format(gli::format_FORMAT_BGRA8_SSCALED_PACK8);
    pub const BGRA8_UINT_PACK8    : Format = Format(gli::format_FORMAT_BGRA8_UINT_PACK8);
    pub const BGRA8_SINT_PACK8    : Format = Format(gli::format_FORMAT_BGRA8_SINT_PACK8);
    pub const BGRA8_SRGB_PACK8    : Format = Format(gli::format_FORMAT_BGRA8_SRGB_PACK8);

    pub const RGBA8_UNORM_PACK32   : Format = Format(gli::format_FORMAT_RGBA8_UNORM_PACK32);
    pub const RGBA8_SNORM_PACK32   : Format = Format(gli::format_FORMAT_RGBA8_SNORM_PACK32);
    pub const RGBA8_USCALED_PACK32 : Format = Format(gli::format_FORMAT_RGBA8_USCALED_PACK32);
    pub const RGBA8_SSCALED_PACK32 : Format = Format(gli::format_FORMAT_RGBA8_SSCALED_PACK32);
    pub const RGBA8_UINT_PACK32    : Format = Format(gli::format_FORMAT_RGBA8_UINT_PACK32);
    pub const RGBA8_SINT_PACK32    : Format = Format(gli::format_FORMAT_RGBA8_SINT_PACK32);
    pub const RGBA8_SRGB_PACK32    : Format = Format(gli::format_FORMAT_RGBA8_SRGB_PACK32);

    pub const RGB10A2_UNORM_PACK32   : Format = Format(gli::format_FORMAT_RGB10A2_UNORM_PACK32);
    pub const RGB10A2_SNORM_PACK32   : Format = Format(gli::format_FORMAT_RGB10A2_SNORM_PACK32);
    pub const RGB10A2_USCALED_PACK32 : Format = Format(gli::format_FORMAT_RGB10A2_USCALED_PACK32);
    pub const RGB10A2_SSCALED_PACK32 : Format = Format(gli::format_FORMAT_RGB10A2_SSCALED_PACK32);
    pub const RGB10A2_UINT_PACK32    : Format = Format(gli::format_FORMAT_RGB10A2_UINT_PACK32);
    pub const RGB10A2_SINT_PACK32    : Format = Format(gli::format_FORMAT_RGB10A2_SINT_PACK32);

    pub const BGR10A2_UNORM_PACK32   : Format = Format(gli::format_FORMAT_BGR10A2_UNORM_PACK32);
    pub const BGR10A2_SNORM_PACK32   : Format = Format(gli::format_FORMAT_BGR10A2_SNORM_PACK32);
    pub const BGR10A2_USCALED_PACK32 : Format = Format(gli::format_FORMAT_BGR10A2_USCALED_PACK32);
    pub const BGR10A2_SSCALED_PACK32 : Format = Format(gli::format_FORMAT_BGR10A2_SSCALED_PACK32);
    pub const BGR10A2_UINT_PACK32    : Format = Format(gli::format_FORMAT_BGR10A2_UINT_PACK32);
    pub const BGR10A2_SINT_PACK32    : Format = Format(gli::format_FORMAT_BGR10A2_SINT_PACK32);

    pub const R16_UNORM_PACK16   : Format = Format(gli::format_FORMAT_R16_UNORM_PACK16);
    pub const R16_SNORM_PACK16   : Format = Format(gli::format_FORMAT_R16_SNORM_PACK16);
    pub const R16_USCALED_PACK16 : Format = Format(gli::format_FORMAT_R16_USCALED_PACK16);
    pub const R16_SSCALED_PACK16 : Format = Format(gli::format_FORMAT_R16_SSCALED_PACK16);
    pub const R16_UINT_PACK16    : Format = Format(gli::format_FORMAT_R16_UINT_PACK16);
    pub const R16_SINT_PACK16    : Format = Format(gli::format_FORMAT_R16_SINT_PACK16);
    pub const R16_SFLOAT_PACK16  : Format = Format(gli::format_FORMAT_R16_SFLOAT_PACK16);

    pub const RG16_UNORM_PACK16   : Format = Format(gli::format_FORMAT_RG16_UNORM_PACK16);
    pub const RG16_SNORM_PACK16   : Format = Format(gli::format_FORMAT_RG16_SNORM_PACK16);
    pub const RG16_USCALED_PACK16 : Format = Format(gli::format_FORMAT_RG16_USCALED_PACK16);
    pub const RG16_SSCALED_PACK16 : Format = Format(gli::format_FORMAT_RG16_SSCALED_PACK16);
    pub const RG16_UINT_PACK16    : Format = Format(gli::format_FORMAT_RG16_UINT_PACK16);
    pub const RG16_SINT_PACK16    : Format = Format(gli::format_FORMAT_RG16_SINT_PACK16);
    pub const RG16_SFLOAT_PACK16  : Format = Format(gli::format_FORMAT_RG16_SFLOAT_PACK16);

    pub const RGB16_UNORM_PACK16   : Format = Format(gli::format_FORMAT_RGB16_UNORM_PACK16);
    pub const RGB16_SNORM_PACK16   : Format = Format(gli::format_FORMAT_RGB16_SNORM_PACK16);
    pub const RGB16_USCALED_PACK16 : Format = Format(gli::format_FORMAT_RGB16_USCALED_PACK16);
    pub const RGB16_SSCALED_PACK16 : Format = Format(gli::format_FORMAT_RGB16_SSCALED_PACK16);
    pub const RGB16_UINT_PACK16    : Format = Format(gli::format_FORMAT_RGB16_UINT_PACK16);
    pub const RGB16_SINT_PACK16    : Format = Format(gli::format_FORMAT_RGB16_SINT_PACK16);
    pub const RGB16_SFLOAT_PACK16  : Format = Format(gli::format_FORMAT_RGB16_SFLOAT_PACK16);

    pub const RGBA16_UNORM_PACK16   : Format = Format(gli::format_FORMAT_RGBA16_UNORM_PACK16);
    pub const RGBA16_SNORM_PACK16   : Format = Format(gli::format_FORMAT_RGBA16_SNORM_PACK16);
    pub const RGBA16_USCALED_PACK16 : Format = Format(gli::format_FORMAT_RGBA16_USCALED_PACK16);
    pub const RGBA16_SSCALED_PACK16 : Format = Format(gli::format_FORMAT_RGBA16_SSCALED_PACK16);
    pub const RGBA16_UINT_PACK16    : Format = Format(gli::format_FORMAT_RGBA16_UINT_PACK16);
    pub const RGBA16_SINT_PACK16    : Format = Format(gli::format_FORMAT_RGBA16_SINT_PACK16);
    pub const RGBA16_SFLOAT_PACK16  : Format = Format(gli::format_FORMAT_RGBA16_SFLOAT_PACK16);

    pub const R32_UINT_PACK32   : Format = Format(gli::format_FORMAT_R32_UINT_PACK32);
    pub const R32_SINT_PACK32   : Format = Format(gli::format_FORMAT_R32_SINT_PACK32);
    pub const R32_SFLOAT_PACK32 : Format = Format(gli::format_FORMAT_R32_SFLOAT_PACK32);

    pub const RG32_UINT_PACK32   : Format = Format(gli::format_FORMAT_RG32_UINT_PACK32);
    pub const RG32_SINT_PACK32   : Format = Format(gli::format_FORMAT_RG32_SINT_PACK32);
    pub const RG32_SFLOAT_PACK32 : Format = Format(gli::format_FORMAT_RG32_SFLOAT_PACK32);

    pub const RGB32_UINT_PACK32   : Format = Format(gli::format_FORMAT_RGB32_UINT_PACK32);
    pub const RGB32_SINT_PACK32   : Format = Format(gli::format_FORMAT_RGB32_SINT_PACK32);
    pub const RGB32_SFLOAT_PACK32 : Format = Format(gli::format_FORMAT_RGB32_SFLOAT_PACK32);

    pub const RGBA32_UINT_PACK32   : Format = Format(gli::format_FORMAT_RGBA32_UINT_PACK32);
    pub const RGBA32_SINT_PACK32   : Format = Format(gli::format_FORMAT_RGBA32_SINT_PACK32);
    pub const RGBA32_SFLOAT_PACK32 : Format = Format(gli::format_FORMAT_RGBA32_SFLOAT_PACK32);

    pub const R64_UINT_PACK64   : Format = Format(gli::format_FORMAT_R64_UINT_PACK64);
    pub const R64_SINT_PACK64   : Format = Format(gli::format_FORMAT_R64_SINT_PACK64);
    pub const R64_SFLOAT_PACK64 : Format = Format(gli::format_FORMAT_R64_SFLOAT_PACK64);

    pub const RG64_UINT_PACK64   : Format = Format(gli::format_FORMAT_RG64_UINT_PACK64);
    pub const RG64_SINT_PACK64   : Format = Format(gli::format_FORMAT_RG64_SINT_PACK64);
    pub const RG64_SFLOAT_PACK64 : Format = Format(gli::format_FORMAT_RG64_SFLOAT_PACK64);

    pub const RGB64_UINT_PACK64   : Format = Format(gli::format_FORMAT_RGB64_UINT_PACK64);
    pub const RGB64_SINT_PACK64   : Format = Format(gli::format_FORMAT_RGB64_SINT_PACK64);
    pub const RGB64_SFLOAT_PACK64 : Format = Format(gli::format_FORMAT_RGB64_SFLOAT_PACK64);

    pub const RGBA64_UINT_PACK64   : Format = Format(gli::format_FORMAT_RGBA64_UINT_PACK64);
    pub const RGBA64_SINT_PACK64   : Format = Format(gli::format_FORMAT_RGBA64_SINT_PACK64);
    pub const RGBA64_SFLOAT_PACK64 : Format = Format(gli::format_FORMAT_RGBA64_SFLOAT_PACK64);

    pub const RG11B10_UFLOAT_PACK32 : Format = Format(gli::format_FORMAT_RG11B10_UFLOAT_PACK32);
    pub const RGB9E5_UFLOAT_PACK32  : Format = Format(gli::format_FORMAT_RGB9E5_UFLOAT_PACK32);

    pub const D16_UNORM_PACK16          : Format = Format(gli::format_FORMAT_D16_UNORM_PACK16);
    pub const D24_UNORM_PACK32          : Format = Format(gli::format_FORMAT_D24_UNORM_PACK32);
    pub const D32_SFLOAT_PACK32         : Format = Format(gli::format_FORMAT_D32_SFLOAT_PACK32);
    pub const S8_UINT_PACK8             : Format = Format(gli::format_FORMAT_S8_UINT_PACK8);
    pub const D16_UNORM_S8_UINT_PACK32  : Format = Format(gli::format_FORMAT_D16_UNORM_S8_UINT_PACK32);
    pub const D24_UNORM_S8_UINT_PACK32  : Format = Format(gli::format_FORMAT_D24_UNORM_S8_UINT_PACK32);
    pub const D32_SFLOAT_S8_UINT_PACK64 : Format = Format(gli::format_FORMAT_D32_SFLOAT_S8_UINT_PACK64);

    pub const RGB_DXT1_UNORM_BLOCK8   : Format = Format(gli::format_FORMAT_RGB_DXT1_UNORM_BLOCK8);
    pub const RGB_DXT1_SRGB_BLOCK8    : Format = Format(gli::format_FORMAT_RGB_DXT1_SRGB_BLOCK8);
    pub const RGBA_DXT1_UNORM_BLOCK8  : Format = Format(gli::format_FORMAT_RGBA_DXT1_UNORM_BLOCK8);
    pub const RGBA_DXT1_SRGB_BLOCK8   : Format = Format(gli::format_FORMAT_RGBA_DXT1_SRGB_BLOCK8);
    pub const RGBA_DXT3_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_DXT3_UNORM_BLOCK16);
    pub const RGBA_DXT3_SRGB_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_DXT3_SRGB_BLOCK16);
    pub const RGBA_DXT5_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_DXT5_UNORM_BLOCK16);
    pub const RGBA_DXT5_SRGB_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_DXT5_SRGB_BLOCK16);
    pub const R_ATI1N_UNORM_BLOCK8    : Format = Format(gli::format_FORMAT_R_ATI1N_UNORM_BLOCK8);
    pub const R_ATI1N_SNORM_BLOCK8    : Format = Format(gli::format_FORMAT_R_ATI1N_SNORM_BLOCK8);
    pub const RG_ATI2N_UNORM_BLOCK16  : Format = Format(gli::format_FORMAT_RG_ATI2N_UNORM_BLOCK16);
    pub const RG_ATI2N_SNORM_BLOCK16  : Format = Format(gli::format_FORMAT_RG_ATI2N_SNORM_BLOCK16);
    pub const RGB_BP_UFLOAT_BLOCK16   : Format = Format(gli::format_FORMAT_RGB_BP_UFLOAT_BLOCK16);
    pub const RGB_BP_SFLOAT_BLOCK16   : Format = Format(gli::format_FORMAT_RGB_BP_SFLOAT_BLOCK16);
    pub const RGBA_BP_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_BP_UNORM_BLOCK16);
    pub const RGBA_BP_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_BP_SRGB_BLOCK16);

    pub const RGB_ETC2_UNORM_BLOCK8   : Format = Format(gli::format_FORMAT_RGB_ETC2_UNORM_BLOCK8);
    pub const RGB_ETC2_SRGB_BLOCK8    : Format = Format(gli::format_FORMAT_RGB_ETC2_SRGB_BLOCK8);
    pub const RGBA_ETC2_UNORM_BLOCK8  : Format = Format(gli::format_FORMAT_RGBA_ETC2_UNORM_BLOCK8);
    pub const RGBA_ETC2_SRGB_BLOCK8   : Format = Format(gli::format_FORMAT_RGBA_ETC2_SRGB_BLOCK8);
    pub const RGBA_ETC2_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_ETC2_UNORM_BLOCK16);
    pub const RGBA_ETC2_SRGB_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_ETC2_SRGB_BLOCK16);
    pub const R_EAC_UNORM_BLOCK8      : Format = Format(gli::format_FORMAT_R_EAC_UNORM_BLOCK8);
    pub const R_EAC_SNORM_BLOCK8      : Format = Format(gli::format_FORMAT_R_EAC_SNORM_BLOCK8);
    pub const RG_EAC_UNORM_BLOCK16    : Format = Format(gli::format_FORMAT_RG_EAC_UNORM_BLOCK16);
    pub const RG_EAC_SNORM_BLOCK16    : Format = Format(gli::format_FORMAT_RG_EAC_SNORM_BLOCK16);

    pub const RGBA_ASTC_4X4_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_4X4_UNORM_BLOCK16);
    pub const RGBA_ASTC_4X4_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_4X4_SRGB_BLOCK16);
    pub const RGBA_ASTC_5X4_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_5X4_UNORM_BLOCK16);
    pub const RGBA_ASTC_5X4_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_5X4_SRGB_BLOCK16);
    pub const RGBA_ASTC_5X5_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_5X5_UNORM_BLOCK16);
    pub const RGBA_ASTC_5X5_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_5X5_SRGB_BLOCK16);
    pub const RGBA_ASTC_6X5_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_6X5_UNORM_BLOCK16);
    pub const RGBA_ASTC_6X5_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_6X5_SRGB_BLOCK16);
    pub const RGBA_ASTC_6X6_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_6X6_UNORM_BLOCK16);
    pub const RGBA_ASTC_6X6_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_6X6_SRGB_BLOCK16);
    pub const RGBA_ASTC_8X5_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_8X5_UNORM_BLOCK16);
    pub const RGBA_ASTC_8X5_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_8X5_SRGB_BLOCK16);
    pub const RGBA_ASTC_8X6_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_8X6_UNORM_BLOCK16);
    pub const RGBA_ASTC_8X6_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_8X6_SRGB_BLOCK16);
    pub const RGBA_ASTC_8X8_UNORM_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_8X8_UNORM_BLOCK16);
    pub const RGBA_ASTC_8X8_SRGB_BLOCK16    : Format = Format(gli::format_FORMAT_RGBA_ASTC_8X8_SRGB_BLOCK16);
    pub const RGBA_ASTC_10X5_UNORM_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X5_UNORM_BLOCK16);
    pub const RGBA_ASTC_10X5_SRGB_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X5_SRGB_BLOCK16);
    pub const RGBA_ASTC_10X6_UNORM_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X6_UNORM_BLOCK16);
    pub const RGBA_ASTC_10X6_SRGB_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X6_SRGB_BLOCK16);
    pub const RGBA_ASTC_10X8_UNORM_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X8_UNORM_BLOCK16);
    pub const RGBA_ASTC_10X8_SRGB_BLOCK16   : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X8_SRGB_BLOCK16);
    pub const RGBA_ASTC_10X10_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X10_UNORM_BLOCK16);
    pub const RGBA_ASTC_10X10_SRGB_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_ASTC_10X10_SRGB_BLOCK16);
    pub const RGBA_ASTC_12X10_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_ASTC_12X10_UNORM_BLOCK16);
    pub const RGBA_ASTC_12X10_SRGB_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_ASTC_12X10_SRGB_BLOCK16);
    pub const RGBA_ASTC_12X12_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_ASTC_12X12_UNORM_BLOCK16);
    pub const RGBA_ASTC_12X12_SRGB_BLOCK16  : Format = Format(gli::format_FORMAT_RGBA_ASTC_12X12_SRGB_BLOCK16);

    pub const RGB_PVRTC1_8X8_UNORM_BLOCK32   : Format = Format(gli::format_FORMAT_RGB_PVRTC1_8X8_UNORM_BLOCK32);
    pub const RGB_PVRTC1_8X8_SRGB_BLOCK32    : Format = Format(gli::format_FORMAT_RGB_PVRTC1_8X8_SRGB_BLOCK32);
    pub const RGB_PVRTC1_16X8_UNORM_BLOCK32  : Format = Format(gli::format_FORMAT_RGB_PVRTC1_16X8_UNORM_BLOCK32);
    pub const RGB_PVRTC1_16X8_SRGB_BLOCK32   : Format = Format(gli::format_FORMAT_RGB_PVRTC1_16X8_SRGB_BLOCK32);
    pub const RGBA_PVRTC1_8X8_UNORM_BLOCK32  : Format = Format(gli::format_FORMAT_RGBA_PVRTC1_8X8_UNORM_BLOCK32);
    pub const RGBA_PVRTC1_8X8_SRGB_BLOCK32   : Format = Format(gli::format_FORMAT_RGBA_PVRTC1_8X8_SRGB_BLOCK32);
    pub const RGBA_PVRTC1_16X8_UNORM_BLOCK32 : Format = Format(gli::format_FORMAT_RGBA_PVRTC1_16X8_UNORM_BLOCK32);
    pub const RGBA_PVRTC1_16X8_SRGB_BLOCK32  : Format = Format(gli::format_FORMAT_RGBA_PVRTC1_16X8_SRGB_BLOCK32);
    pub const RGBA_PVRTC2_4X4_UNORM_BLOCK8   : Format = Format(gli::format_FORMAT_RGBA_PVRTC2_4X4_UNORM_BLOCK8);
    pub const RGBA_PVRTC2_4X4_SRGB_BLOCK8    : Format = Format(gli::format_FORMAT_RGBA_PVRTC2_4X4_SRGB_BLOCK8);
    pub const RGBA_PVRTC2_8X4_UNORM_BLOCK8   : Format = Format(gli::format_FORMAT_RGBA_PVRTC2_8X4_UNORM_BLOCK8);
    pub const RGBA_PVRTC2_8X4_SRGB_BLOCK8    : Format = Format(gli::format_FORMAT_RGBA_PVRTC2_8X4_SRGB_BLOCK8);

    pub const RGB_ETC_UNORM_BLOCK8    : Format = Format(gli::format_FORMAT_RGB_ETC_UNORM_BLOCK8);
    pub const RGB_ATC_UNORM_BLOCK8    : Format = Format(gli::format_FORMAT_RGB_ATC_UNORM_BLOCK8);
    pub const RGBA_ATCA_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_ATCA_UNORM_BLOCK16);
    pub const RGBA_ATCI_UNORM_BLOCK16 : Format = Format(gli::format_FORMAT_RGBA_ATCI_UNORM_BLOCK16);

    pub const L8_UNORM_PACK8    : Format = Format(gli::format_FORMAT_L8_UNORM_PACK8);
    pub const A8_UNORM_PACK8    : Format = Format(gli::format_FORMAT_A8_UNORM_PACK8);
    pub const LA8_UNORM_PACK8   : Format = Format(gli::format_FORMAT_LA8_UNORM_PACK8);
    pub const L16_UNORM_PACK16  : Format = Format(gli::format_FORMAT_L16_UNORM_PACK16);
    pub const A16_UNORM_PACK16  : Format = Format(gli::format_FORMAT_A16_UNORM_PACK16);
    pub const LA16_UNORM_PACK16 : Format = Format(gli::format_FORMAT_LA16_UNORM_PACK16);

    pub const BGR8_UNORM_PACK32 : Format = Format(gli::format_FORMAT_BGR8_UNORM_PACK32);
    pub const BGR8_SRGB_PACK32  : Format = Format(gli::format_FORMAT_BGR8_SRGB_PACK32);

    pub const RG3B2_UNORM_PACK8 : Format = Format(gli::format_FORMAT_RG3B2_UNORM_PACK8);
    pub const LAST              : Format = Format(gli::format_FORMAT_LAST);
}

impl Swizzle {
    pub const FIRST         : Swizzle = Swizzle(gli::swizzle_SWIZZLE_FIRST);
    pub const RED           : Swizzle = Swizzle(gli::swizzle_SWIZZLE_RED);
    pub const CHANNEL_FIRST : Swizzle = Swizzle(gli::swizzle_SWIZZLE_CHANNEL_FIRST);
    pub const GREEN         : Swizzle = Swizzle(gli::swizzle_SWIZZLE_GREEN);
    pub const BLUE          : Swizzle = Swizzle(gli::swizzle_SWIZZLE_BLUE);
    pub const ALPHA         : Swizzle = Swizzle(gli::swizzle_SWIZZLE_ALPHA);
    pub const CHANNEL_LAST  : Swizzle = Swizzle(gli::swizzle_SWIZZLE_CHANNEL_LAST);
    pub const ZERO          : Swizzle = Swizzle(gli::swizzle_SWIZZLE_ZERO);
    pub const ONE           : Swizzle = Swizzle(gli::swizzle_SWIZZLE_ONE);
    pub const LAST          : Swizzle = Swizzle(gli::swizzle_SWIZZLE_LAST);
}

impl fmt::Display for Swizzle {

    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            | Swizzle::RED           => write!(f, stringify!(Swizzle::RED  )),
            | Swizzle::GREEN         => write!(f, stringify!(Swizzle::GREEN)),
            | Swizzle::BLUE          => write!(f, stringify!(Swizzle::BLUE )),
            | Swizzle::ALPHA         => write!(f, stringify!(Swizzle::ALPHA)),
            | Swizzle::ZERO          => write!(f, stringify!(Swizzle::ZERO )),
            | Swizzle::ONE           => write!(f, stringify!(Swizzle::ONE  )),
            | _ => write!(f, "Unknown Swizzle"),
        }
    }
}

macro_rules! impl_format_display {
    ($(
        $format:ident,
    )*) => {
        impl fmt::Display for Format {

            fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
                match *self {
                $(
                    | Format::$format => write!(f, stringify!($format)),
                )*
                    | _ => write!(f, "Unknown Swizzle"),
                }
            }
        }
    };
}

impl_format_display!(
    UNDEFINED,
    RG4_UNORM_PACK8,
    RGBA4_UNORM_PACK16,
    BGRA4_UNORM_PACK16,
    R5G6B5_UNORM_PACK16,
    B5G6R5_UNORM_PACK16,
    RGB5A1_UNORM_PACK16,
    BGR5A1_UNORM_PACK16,
    A1RGB5_UNORM_PACK16,
    R8_UNORM_PACK8,
    R8_SNORM_PACK8,   
    R8_USCALED_PACK8, 
    R8_SSCALED_PACK8, 
    R8_UINT_PACK8,    
    R8_SINT_PACK8,    
    R8_SRGB_PACK8,    
    RG8_UNORM_PACK8,
    RG8_SNORM_PACK8,  
    RG8_USCALED_PACK8,
    RG8_SSCALED_PACK8,
    RG8_UINT_PACK8,   
    RG8_SINT_PACK8,   
    RG8_SRGB_PACK8,   
    RGB8_UNORM_PACK8,
    RGB8_SNORM_PACK8, 
    RGB8_USCALED_PACK8,
    RGB8_UINT_PACK8,
    RGB8_SINT_PACK8,  
    RGB8_SRGB_PACK8,  
    BGR8_UNORM_PACK8,
    BGR8_SNORM_PACK8,  
    BGR8_USCALED_PACK8,
    BGR8_SSCALED_PACK8,
    BGR8_UINT_PACK8,   
    BGR8_SINT_PACK8,   
    BGR8_SRGB_PACK8,   
    RGBA8_UNORM_PACK8,
    RGBA8_SNORM_PACK8,   
    RGBA8_USCALED_PACK8, 
    RGBA8_SSCALED_PACK8, 
    RGBA8_UINT_PACK8,    
    RGBA8_SINT_PACK8,    
    RGBA8_SRGB_PACK8,    
    BGRA8_UNORM_PACK8,
    BGRA8_SNORM_PACK8,   
    BGRA8_USCALED_PACK8, 
    BGRA8_SSCALED_PACK8, 
    BGRA8_UINT_PACK8,    
    BGRA8_SINT_PACK8,    
    BGRA8_SRGB_PACK8,    
    RGBA8_UNORM_PACK32,
    RGBA8_SNORM_PACK32,  
    RGBA8_USCALED_PACK32,
    RGBA8_SSCALED_PACK32,
    RGBA8_UINT_PACK32,   
    RGBA8_SINT_PACK32,   
    RGBA8_SRGB_PACK32,   
    RGB10A2_UNORM_PACK32,
    RGB10A2_SNORM_PACK32,  
    RGB10A2_USCALED_PACK32,
    RGB10A2_SSCALED_PACK32,
    RGB10A2_UINT_PACK32,   
    RGB10A2_SINT_PACK32,   
    BGR10A2_UNORM_PACK32,
    BGR10A2_SNORM_PACK32, 
    BGR10A2_USCALED_PACK32,
    BGR10A2_SSCALED_PACK32,
    BGR10A2_UINT_PACK32,  
    BGR10A2_SINT_PACK32,  
    R16_UNORM_PACK16,
    R16_SNORM_PACK16,   
    R16_USCALED_PACK16, 
    R16_SSCALED_PACK16, 
    R16_UINT_PACK16,    
    R16_SINT_PACK16,    
    R16_SFLOAT_PACK16,  
    RG16_UNORM_PACK16,
    RG16_SNORM_PACK16,  
    RG16_USCALED_PACK16,
    RG16_SSCALED_PACK16,
    RG16_UINT_PACK16,   
    RG16_SINT_PACK16,   
    RG16_SFLOAT_PACK16, 
    RGB16_UNORM_PACK16,
    RGB16_SNORM_PACK16,   
    RGB16_USCALED_PACK16, 
    RGB16_SSCALED_PACK16, 
    RGB16_UINT_PACK16,    
    RGB16_SINT_PACK16,    
    RGB16_SFLOAT_PACK16,  
    RGBA16_UNORM_PACK16,
    RGBA16_SNORM_PACK16,  
    RGBA16_USCALED_PACK16,
    RGBA16_SSCALED_PACK16,
    RGBA16_UINT_PACK16,   
    RGBA16_SINT_PACK16,   
    RGBA16_SFLOAT_PACK16, 
    R32_UINT_PACK32,
    R32_SINT_PACK32,
    R32_SFLOAT_PACK32,                         
    RG32_UINT_PACK32,   
    RG32_SINT_PACK32,   
    RG32_SFLOAT_PACK32, 
    RGB32_UINT_PACK32,
    RGB32_SINT_PACK32,  
    RGB32_SFLOAT_PACK32,                         
    RGBA32_UINT_PACK32,   
    RGBA32_SINT_PACK32,   
    RGBA32_SFLOAT_PACK32, 
    R64_UINT_PACK64,
    R64_SINT_PACK64,  
    R64_SFLOAT_PACK64,                         
    RG64_UINT_PACK64,  
    RG64_SINT_PACK64,  
    RG64_SFLOAT_PACK64,                         
    RGB64_UINT_PACK64,  
    RGB64_SINT_PACK64,  
    RGB64_SFLOAT_PACK64,                                  
    RGBA64_UINT_PACK64,   
    RGBA64_SINT_PACK64,   
    RGBA64_SFLOAT_PACK64, 
    RG11B10_UFLOAT_PACK32,
    RGB9E5_UFLOAT_PACK32, 
    D16_UNORM_PACK16,
    D24_UNORM_PACK32,         
    D32_SFLOAT_PACK32,        
    S8_UINT_PACK8,            
    D16_UNORM_S8_UINT_PACK32, 
    D24_UNORM_S8_UINT_PACK32, 
    D32_SFLOAT_S8_UINT_PACK64,                             
    RGB_DXT1_UNORM_BLOCK8,  
    RGB_DXT1_SRGB_BLOCK8,   
    RGBA_DXT1_UNORM_BLOCK8, 
    RGBA_DXT1_SRGB_BLOCK8,  
    RGBA_DXT3_UNORM_BLOCK16,
    RGBA_DXT3_SRGB_BLOCK16, 
    RGBA_DXT5_UNORM_BLOCK16,
    RGBA_DXT5_SRGB_BLOCK16, 
    R_ATI1N_UNORM_BLOCK8,   
    R_ATI1N_SNORM_BLOCK8,   
    RG_ATI2N_UNORM_BLOCK16, 
    RG_ATI2N_SNORM_BLOCK16, 
    RGB_BP_UFLOAT_BLOCK16,  
    RGB_BP_SFLOAT_BLOCK16,  
    RGBA_BP_UNORM_BLOCK16,  
    RGBA_BP_SRGB_BLOCK16,   
    RGB_ETC2_UNORM_BLOCK8,
    RGB_ETC2_SRGB_BLOCK8,   
    RGBA_ETC2_UNORM_BLOCK8, 
    RGBA_ETC2_SRGB_BLOCK8,  
    RGBA_ETC2_UNORM_BLOCK16,
    RGBA_ETC2_SRGB_BLOCK16, 
    R_EAC_UNORM_BLOCK8,     
    R_EAC_SNORM_BLOCK8,     
    RG_EAC_UNORM_BLOCK16,   
    RG_EAC_SNORM_BLOCK16,   
    RGBA_ASTC_4X4_UNORM_BLOCK16,
    RGBA_ASTC_4X4_SRGB_BLOCK16,    
    RGBA_ASTC_5X4_UNORM_BLOCK16,   
    RGBA_ASTC_5X4_SRGB_BLOCK16,    
    RGBA_ASTC_5X5_UNORM_BLOCK16,   
    RGBA_ASTC_5X5_SRGB_BLOCK16,    
    RGBA_ASTC_6X5_UNORM_BLOCK16,   
    RGBA_ASTC_6X5_SRGB_BLOCK16,    
    RGBA_ASTC_6X6_UNORM_BLOCK16,   
    RGBA_ASTC_6X6_SRGB_BLOCK16,    
    RGBA_ASTC_8X5_UNORM_BLOCK16,   
    RGBA_ASTC_8X5_SRGB_BLOCK16,    
    RGBA_ASTC_8X6_UNORM_BLOCK16,   
    RGBA_ASTC_8X6_SRGB_BLOCK16,    
    RGBA_ASTC_8X8_UNORM_BLOCK16,   
    RGBA_ASTC_8X8_SRGB_BLOCK16,    
    RGBA_ASTC_10X5_UNORM_BLOCK16,  
    RGBA_ASTC_10X5_SRGB_BLOCK16,   
    RGBA_ASTC_10X6_UNORM_BLOCK16,  
    RGBA_ASTC_10X6_SRGB_BLOCK16,   
    RGBA_ASTC_10X8_UNORM_BLOCK16,
    RGBA_ASTC_10X8_SRGB_BLOCK16,
    RGBA_ASTC_10X10_UNORM_BLOCK16, 
    RGBA_ASTC_10X10_SRGB_BLOCK16,
    RGBA_ASTC_12X10_UNORM_BLOCK16, 
    RGBA_ASTC_12X10_SRGB_BLOCK16,
    RGBA_ASTC_12X12_UNORM_BLOCK16, 
    RGBA_ASTC_12X12_SRGB_BLOCK16,
    RGB_PVRTC1_8X8_UNORM_BLOCK32,  
    RGB_PVRTC1_8X8_SRGB_BLOCK32,   
    RGB_PVRTC1_16X8_UNORM_BLOCK32, 
    RGB_PVRTC1_16X8_SRGB_BLOCK32,  
    RGBA_PVRTC1_8X8_UNORM_BLOCK32, 
    RGBA_PVRTC1_8X8_SRGB_BLOCK32,  
    RGBA_PVRTC1_16X8_UNORM_BLOCK32,
    RGBA_PVRTC1_16X8_SRGB_BLOCK32,
    RGBA_PVRTC2_4X4_UNORM_BLOCK8,  
    RGBA_PVRTC2_4X4_SRGB_BLOCK8,
    RGBA_PVRTC2_8X4_UNORM_BLOCK8,  
    RGBA_PVRTC2_8X4_SRGB_BLOCK8,
    RGB_ETC_UNORM_BLOCK8,
    RGB_ATC_UNORM_BLOCK8,   
    RGBA_ATCA_UNORM_BLOCK16,
    RGBA_ATCI_UNORM_BLOCK16,                                  
    L8_UNORM_PACK8,   
    A8_UNORM_PACK8,   
    LA8_UNORM_PACK8,  
    L16_UNORM_PACK16, 
    A16_UNORM_PACK16, 
    LA16_UNORM_PACK16,                     
    BGR8_UNORM_PACK32,
    BGR8_SRGB_PACK32,
    RG3B2_UNORM_PACK8,
);