projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3168e0
)
util: Add pf_name() replacement: util_format_name().
author
José Fonseca
<jfonseca@vmware.com>
Sun, 14 Feb 2010 13:23:32 +0000
(13:23 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Sun, 14 Feb 2010 13:23:32 +0000
(13:23 +0000)
src/gallium/auxiliary/util/u_format.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_format.h
b/src/gallium/auxiliary/util/u_format.h
index 4323bc881bd46f4a754eda41a37d5b8eafce96e4..2fbbb83d4ba14463a2f2ba3ebcb9f99c05cd498d 100644
(file)
--- 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)
{