From 5126683e3b971ccfb51e50e560750ce44e86bae8 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Fri, 2 Apr 2010 05:23:32 +0200 Subject: gallium/util: add util_format_is_supported to check for pack/unpack This improves the code by making it more readable, and removes special knowledge of S3TC and other formats from softpipe. --- src/gallium/auxiliary/util/u_format_table.py | 3 ++- 1 file changed, 2 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 94a4331b15..2c0c9bffee 100755 --- a/src/gallium/auxiliary/util/u_format_table.py +++ b/src/gallium/auxiliary/util/u_format_table.py @@ -92,7 +92,7 @@ def write_format_table(formats): u_format_pack.generate(formats) for format in formats: - print 'const struct util_format_description' + print 'struct util_format_description' print 'util_format_%s_description = {' % (format.short_name(),) print " %s," % (format.name,) print " \"%s\"," % (format.name,) @@ -103,6 +103,7 @@ def write_format_table(formats): print " %s,\t/* is_array */" % (bool_map(format.is_array()),) print " %s,\t/* is_bitmask */" % (bool_map(format.is_bitmask()),) print " %s,\t/* is_mixed */" % (bool_map(format.is_mixed()),) + print " %s,\t/* is_supported */" % ("TRUE" if u_format_pack.is_format_supported(format) else "FALSE",) print " {" for i in range(4): channel = format.channels[i] -- cgit v1.2.3