From d97293998605003a89bd772f101254db302672f2 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 16 Nov 2018 11:25:17 +0100 Subject: [PATCH] mesa/main: do not allow sRGB texture enums before gles3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ctx->Extensions.EXT_texture_sRGB is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. There's no extension adding support for this on OpenGL ES before version 3.0, so let's tighten the check. Signed-off-by: Erik Faye-Lund Reviewed-by: Marek Olšák --- src/mesa/main/glformats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 79d7e881b31..b8fe32ca52a 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2450,7 +2450,7 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat) } } - if (ctx->Extensions.EXT_texture_sRGB) { + if (_mesa_has_EXT_texture_sRGB(ctx) || _mesa_is_gles3(ctx)) { switch (internalFormat) { case GL_SRGB_EXT: case GL_SRGB8_EXT: -- 2.30.2