diff options
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_table.py')
-rwxr-xr-x | src/gallium/auxiliary/util/u_format_table.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py index e94fbbecb3..c536e39171 100755 --- a/src/gallium/auxiliary/util/u_format_table.py +++ b/src/gallium/auxiliary/util/u_format_table.py @@ -51,9 +51,6 @@ class Type: return s -SCALED, NORM, SRGB = 'scaled', 'norm', 'srgb' - - class Format: def __init__(self, name, layout, block_width, block_height, in_types, out_swizzle, colorspace): @@ -111,7 +108,12 @@ def layout_map(layout): return 'UTIL_FORMAT_LAYOUT_' + str(layout).upper() -layout_channels_map = { +def colorspace_map(colorspace): + return 'UTIL_FORMAT_COLORSPACE_' + str(colorspace).upper() + + +colorspace_channels_map = { + 'rgb': 'rgba', 'rgba': 'rgba', 'zs': 'zs', 'yuv': ['y1', 'y2', 'u', 'v'], @@ -186,7 +188,7 @@ def write_format_table(formats): comment = 'ignored' print " %s%s /* %s */" % (swizzle_map[swizzle], sep, comment) print " }," - print " UTIL_FORMAT_COLORSPACE_RGB," + print " %s," % (colorspace_map(format.colorspace),) print " }," print " {" print " PIPE_FORMAT_NONE," |