summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format_table.py
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-08 20:48:47 +0100
committerMichal Krol <michal@vmware.com>2009-12-08 20:48:47 +0100
commiteb926ddf9eee1095c7fc12013f0b8375bbaeca6f (patch)
tree304702202339b784ac2fa721538b26979c4ea912 /src/gallium/auxiliary/util/u_format_table.py
parent876a785a182d7987786377ff0a44ee40628254f3 (diff)
Simplify the redundant meaning of format layout.
We really just need to know whether the format is compressed or not. For more detailed information format colorspace should suffice.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_table.py')
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_table.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index 8713594376..c772a75e61 100755
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -35,8 +35,12 @@ import sys
from u_format_parse import *
-def layout_map(layout):
- return 'UTIL_FORMAT_LAYOUT_' + str(layout).upper()
+layout_map = {
+ 'arith': 'UTIL_FORMAT_LAYOUT_PLAIN',
+ 'array': 'UTIL_FORMAT_LAYOUT_PLAIN',
+ 'yuv': 'UTIL_FORMAT_LAYOUT_PLAIN',
+ 'dxt': 'UTIL_FORMAT_LAYOUT_DXT',
+}
def colorspace_map(colorspace):
@@ -104,7 +108,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]