diff options
author | Erik Faye-Lund <[email protected]> | 2018-11-16 11:10:23 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2018-12-03 18:16:44 +0100 |
commit | 3629ee025c8e88692118272f270e948750820c47 (patch) | |
tree | 55f860332af68e1e1feb055348ec9efe565cad39 /src | |
parent | 52dc8b4f7bd6a8127c2a39edcb5193d1b5e89309 (diff) |
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/glformats.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: |