Mesa (master): gallium/util: add util_format_is_srgb() helper
Brian Paul
brianp at kemper.freedesktop.org
Thu Sep 22 14:45:10 UTC 2011
Module: Mesa
Branch: master
Commit: ff6cf60cb80c3bc31d9a4307c32185f65054bc58
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff6cf60cb80c3bc31d9a4307c32185f65054bc58
Author: Brian Paul <brianp at vmware.com>
Date: Wed Jul 27 16:08:13 2011 -0600
gallium/util: add util_format_is_srgb() helper
---
src/gallium/auxiliary/util/u_format.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 964f19c..98528ea 100644
--- 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)
{
More information about the mesa-commit
mailing list