summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format_table.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-26 15:45:48 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-26 16:46:34 +0000
commit4757325951e35460975e77d70dacf8b6eb10ab11 (patch)
tree0a40045d38001039bab42419faa805404776817f /src/gallium/auxiliary/util/u_format_table.py
parentfda9a19b3465e3eb6ef74611a85021055eb78a64 (diff)
util: Factor some code into u_format_parse.py
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_table.py')
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_table.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index a7a4fd18a8..4e29d15f3b 100755
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -117,7 +117,10 @@ def write_format_table(formats):
sep = ","
else:
sep = ""
- print " {%s, %s, %u}%s\t/* %s */" % (type_map[channel.type], bool_map(channel.norm), channel.size, sep, "xyzw"[i])
+ if channel.size:
+ print " {%s, %s, %u}%s\t/* %s = %s */" % (type_map[channel.type], bool_map(channel.norm), channel.size, sep, "xyzw"[i], channel.name)
+ else:
+ print " {0, 0, 0}%s" % (sep,)
print " },"
print " {"
for i in range(4):