diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-02-14 13:23:32 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-02-14 13:23:32 +0000 |
commit | 5784381b1e8a7f7535bbd5cc1672770026662bb0 (patch) | |
tree | acb672ebbba99138e904aeb63bdf62d2926ccd35 /src/gallium | |
parent | c3168e050eabff55e12485c8648f4cf0744182c1 (diff) |
util: Add pf_name() replacement: util_format_name().
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_format.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index 4323bc881b..2fbbb83d4b 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -156,6 +156,19 @@ util_format_description(enum pipe_format format); * Format query functions. */ +static INLINE const char * +util_format_name(enum pipe_format format) +{ + const struct util_format_description *desc = util_format_description(format); + + assert(format); + if (!format) { + return "???"; + } + + return desc->name; +} + static INLINE boolean util_format_is_compressed(enum pipe_format format) { |