Mesa (master): gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats
Marek Olšák
mareko at kemper.freedesktop.org
Thu Jan 23 00:50:51 UTC 2014
Module: Mesa
Branch: master
Commit: d40532f260c15d56e5fa836147e02c031a999682
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d40532f260c15d56e5fa836147e02c031a999682
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Jan 21 19:53:45 2014 +0100
gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formats
This fixes a serious regression introduced
in 4e549ddb500cf677b6fa16d9ebdfa67cc23da097.
Cc: 9.2 10.0 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/auxiliary/util/u_format.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 0fbaf4c..5f86e2d 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -872,6 +872,9 @@ util_format_get_component_bits(enum pipe_format format,
static INLINE enum pipe_format
util_format_srgb(enum pipe_format format)
{
+ if (util_format_is_srgb(format))
+ return format;
+
switch (format) {
case PIPE_FORMAT_L8_UNORM:
return PIPE_FORMAT_L8_SRGB;
More information about the mesa-commit
mailing list