Module: Mesa Branch: master Commit: 4afae877e6914e311340e0b1d3490ec2fed9422f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4afae877e6914e311340e0b1d3490ec2fed9422f
Author: José Fonseca <[email protected]> Date: Sat Mar 6 12:46:29 2010 +0000 util: Add the shortened format name to the description. --- src/gallium/auxiliary/util/u_format.h | 6 ++++++ src/gallium/auxiliary/util/u_format_table.py | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index e8fa002..ec6b077 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -120,9 +120,15 @@ struct util_format_channel_description struct util_format_description { enum pipe_format format; + const char *name; /** + * Short name, striped of the prefix, lower case. + */ + const char *short_name; + + /** * Pixel block dimensions. */ struct util_format_block block; diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py index 4e29d15..f9d21ed 100755 --- a/src/gallium/auxiliary/util/u_format_table.py +++ b/src/gallium/auxiliary/util/u_format_table.py @@ -90,6 +90,7 @@ def write_format_table(formats): print 'util_format_none_description = {' print " PIPE_FORMAT_NONE," print " \"PIPE_FORMAT_NONE\"," + print " \"none\"," print " {0, 0, 0}," print " 0," print " 0," @@ -105,6 +106,7 @@ def write_format_table(formats): print 'util_format_%s_description = {' % (format.short_name(),) print " %s," % (format.name,) print " \"%s\"," % (format.name,) + print " \"%s\"," % (format.short_name(),) print " {%u, %u, %u},\t/* block */" % (format.block_width, format.block_height, format.block_size()) print " %s," % (layout_map(format.layout),) print " %u,\t/* nr_channels */" % (format.nr_channels(),) _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
