summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texfetch.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-07-01 15:38:56 -0700
committerEric Anholt <[email protected]>2019-07-16 12:51:13 -0700
commit35e2d31ba4218cd55085c97764741eaf2fa3a332 (patch)
treeb84e1b165a85f09133a4d0b891c99bac971868f6 /src/mesa/swrast/s_texfetch.c
parentece03848c27675eb4933f07f45acd49336d99144 (diff)
mesa: Drop redundant checks for sRGB before sRGB to linear conversion.
_mesa_get_srgb_format_linear() just returns the original format if it wasn't sRGB. Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_texfetch.c')
-rw-r--r--src/mesa/swrast/s_texfetch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index ed8df7bab64..079df32f7cd 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -491,10 +491,8 @@ set_fetch_functions(const struct gl_sampler_object *samp,
STATIC_ASSERT(ARRAY_SIZE(texfetch_funcs) == MESA_FORMAT_COUNT);
- if (samp->sRGBDecode == GL_SKIP_DECODE_EXT &&
- _mesa_get_format_color_encoding(format) == GL_SRGB) {
+ if (samp->sRGBDecode == GL_SKIP_DECODE_EXT)
format = _mesa_get_srgb_format_linear(format);
- }
assert(format < MESA_FORMAT_COUNT);