projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5539304
)
gallium/util: add util_format_is_srgb() helper
author
Brian Paul
<brianp@vmware.com>
Wed, 27 Jul 2011 22:08:13 +0000
(16:08 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 22 Sep 2011 14:26:36 +0000
(08:26 -0600)
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 964f19c3a2e7934d33dcadfb49c298ecb58efb9f..98528ea595f8f19416b4e6a703c10e86912893af 100644
(file)
--- a/
src/gallium/auxiliary/util/u_format.h
+++ b/
src/gallium/auxiliary/util/u_format.h
@@
-410,6
+410,13
@@
util_format_is_s3tc(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_S3TC ? TRUE : FALSE;
}
+static INLINE boolean
+util_format_is_srgb(enum pipe_format format)
+{
+ const struct util_format_description *desc = util_format_description(format);
+ return desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB;
+}
+
static INLINE boolean
util_format_has_depth(const struct util_format_description *desc)
{