diff options
author | Erik Faye-Lund <[email protected]> | 2018-11-16 09:51:26 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2018-12-03 18:16:44 +0100 |
commit | 2dfcaf7554cab0aae32372dc4a77fdb3ba74173d (patch) | |
tree | 04f071dc8aba764132b5700cf13b56a37b7325d7 /src/mesa/main | |
parent | 1aa134038c3b9eefd6d7e6d227bea7bdc5bb7a4e (diff) |
mesa/main: do not allow astc enums on gles1
ctx->Extensions.KHR_texture_compression_astc_ldr is set regardless of
the API that's used, so checking for those direcly will always enable
extensions when they are supported by the driver.
But there's no extension enabling ASTC for OpenGL ES 1.x, so we
shouldn't allow those enums there.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/glformats.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index b0711d3b9ec..4a9ac1137f7 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1389,7 +1389,7 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format) case MESA_FORMAT_LAYOUT_BPTC: return _mesa_has_ARB_texture_compression_bptc(ctx); case MESA_FORMAT_LAYOUT_ASTC: - return ctx->Extensions.KHR_texture_compression_astc_ldr; + return _mesa_has_KHR_texture_compression_astc_ldr(ctx); default: return GL_FALSE; } @@ -2373,9 +2373,9 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat) return base_compressed; } - if ((ctx->Extensions.KHR_texture_compression_astc_ldr && + if ((_mesa_has_KHR_texture_compression_astc_ldr(ctx) && is_astc_2d_format(internalFormat)) || - (ctx->Extensions.OES_texture_compression_astc && + (_mesa_has_OES_texture_compression_astc(ctx) && is_astc_3d_format(internalFormat))) return GL_RGBA; |