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 <erik.faye-l...@collabora.com>
---
 src/mesa/main/glformats.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 2e2ef9a05bb..b715af1a468 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;
 
-- 
2.19.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to