diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-04-02 05:23:32 +0200 |
---|---|---|
committer | Luca Barbieri <luca@luca-barbieri.com> | 2010-04-02 06:16:30 +0200 |
commit | 5126683e3b971ccfb51e50e560750ce44e86bae8 (patch) | |
tree | ccdb7104752d266653a1201a97e551bed94ecd23 /src/gallium/auxiliary/util/u_format_table.py | |
parent | 52e9b990a192a9329006d5f7dd2ac222effea5a5 (diff) |
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.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format_table.py')
-rwxr-xr-x | src/gallium/auxiliary/util/u_format_table.py | 3 |
1 files changed, 2 insertions, 1 deletions
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] |