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 <erik.faye-l...@collabora.com> --- 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 453465fb1c8..0a42d3dd9a0 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: -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev