projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cdedaa
)
util: add util_format_is_plain
author
Marek Olšák
<maraeo@gmail.com>
Mon, 3 May 2010 17:19:02 +0000
(19:19 +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 fb6ade5c06b5f1b7739b9b0ae1439f4df8a51a5c..6514315ea286ca179f2b08e4d82b660ae933bd3c 100644
(file)
--- a/
src/gallium/auxiliary/util/u_format.h
+++ b/
src/gallium/auxiliary/util/u_format.h
@@
-338,6
+338,21
@@
util_format_name(enum pipe_format format)
return desc->name;
}
+/**
+ * Whether this format is plain, see UTIL_FORMAT_LAYOUT_PLAIN for more info.
+ */
+static INLINE boolean
+util_format_is_plain(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+
+ if (!format) {
+ return FALSE;
+ }
+
+ return desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ? TRUE : FALSE;
+}
+
static INLINE boolean
util_format_is_s3tc(enum pipe_format format)
{