projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc3d9a8
)
util: add util_format_short_name
author
Marek Olšák
<maraeo@gmail.com>
Mon, 3 May 2010 18:09:14 +0000
(20:09 +0200)
committer
Marek Olšák
<maraeo@gmail.com>
Mon, 3 May 2010 18:39:43 +0000
(20:39 +0200)
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 6514315ea286ca179f2b08e4d82b660ae933bd3c..8ba076949b6eb2477c71469555f9423224fbf9e4 100644
(file)
--- a/
src/gallium/auxiliary/util/u_format.h
+++ b/
src/gallium/auxiliary/util/u_format.h
@@
-338,6
+338,19
@@
util_format_name(enum pipe_format format)
return desc->name;
}
+static INLINE const char *
+util_format_short_name(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ assert(desc);
+ if (!desc) {
+ return "???";
+ }
+
+ return desc->short_name;
+}
+
/**
* Whether this format is plain, see UTIL_FORMAT_LAYOUT_PLAIN for more info.
*/