aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_format.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format.h')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h
index 0fbaf4cc1..5f86e2d2c 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format.h
+++ b/mesalib/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;