From: Erik Faye-Lund Date: Fri, 16 Nov 2018 10:10:23 +0000 (+0100) Subject: mesa/main: do not allow snorm-texture enums before gles3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3629ee025c8e88692118272f270e948750820c47;p=mesa.git mesa/main: do not allow snorm-texture enums before gles3 ctx->Extensions.EXT_texture_snorm 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 --- diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 174f17d882d..79d7e881b31 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2411,7 +2411,7 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat) } } - if (ctx->Extensions.EXT_texture_snorm) { + if (_mesa_has_EXT_texture_snorm(ctx) || _mesa_is_gles3(ctx)) { switch (internalFormat) { case GL_RED_SNORM: case GL_R8_SNORM: