From 4757325951e35460975e77d70dacf8b6eb10ab11 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 26 Feb 2010 15:45:48 +0000 Subject: util: Factor some code into u_format_parse.py --- src/gallium/auxiliary/util/u_format_table.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (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 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): -- cgit v1.2.3