- # We don't generate code for YUV formats, and many of the new ones lack pack/unpack
- # functions for softpipe/llvmpipe.
- noaccess_formats = [
- 'yv12',
- 'yv16',
- 'iyuv',
- 'nv12',
- 'nv16',
- 'nv21',
- 'p010',
- 'p012',
- 'p016',
- 'xyuv',
- 'ayuv',
- 'r8g8_r8b8_unorm',
- 'g8r8_b8r8_unorm',
- 'g8r8_g8b8_unorm',
- 'y8_u8_v8_422_unorm',
- 'y8_u8v8_422_unorm',
- 'y8_u8_v8_444_unorm',
- 'y16_u16_v16_420_unorm',
- 'y16_u16_v16_422_unorm',
- 'y16_u16v16_422_unorm',
- 'y16_u16_v16_444_unorm',
- ]
- access = sn not in noaccess_formats
- if format.layout in ('astc', 'atc', 'fxt1'):
- access = False
- if format.layout == 'etc' and sn != 'etc1_rgb8':
- access = False
-
- print('const struct util_format_pack_description')
- print('util_format_%s_pack_description = {' % sn)
- if format.colorspace != ZS and not format.is_pure_color() and access:
+ print(" [%s] = {" % (format.name,))
+
+ if format.colorspace != ZS and not format.is_pure_color():