From dfdf83d714c0d32d9182eb3001cf642aa6cb5c87 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Wed, 9 Dec 2009 14:22:30 +0100 Subject: Revert "Simplify the redundant meaning of format layout." This reverts commit eb926ddf9eee1095c7fc12013f0b8375bbaeca6f. --- src/gallium/auxiliary/util/u_format_table.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/gallium/auxiliary/util/u_format_table.py') diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py index c772a75e61..8713594376 100755 --- a/src/gallium/auxiliary/util/u_format_table.py +++ b/src/gallium/auxiliary/util/u_format_table.py @@ -35,12 +35,8 @@ import sys from u_format_parse import * -layout_map = { - 'arith': 'UTIL_FORMAT_LAYOUT_PLAIN', - 'array': 'UTIL_FORMAT_LAYOUT_PLAIN', - 'yuv': 'UTIL_FORMAT_LAYOUT_PLAIN', - 'dxt': 'UTIL_FORMAT_LAYOUT_DXT', -} +def layout_map(layout): + return 'UTIL_FORMAT_LAYOUT_' + str(layout).upper() def colorspace_map(colorspace): @@ -108,7 +104,7 @@ def write_format_table(formats): print " %s," % (format.name,) print " \"%s\"," % (format.name,) print " {%u, %u, %u}, /* block */" % (format.block_width, format.block_height, format.block_size()) - print " %s," % (layout_map[format.layout],) + print " %s," % (layout_map(format.layout),) print " {" for i in range(4): type = format.in_types[i] -- cgit v1.2.3