[Mesa-dev] [PATCH v2 15/18] mesa: Fix ARB_texture_compression_bptc functionality leaks
Nanley Chery
nanleychery at gmail.com
Fri Oct 30 14:19:32 PDT 2015
From: Nanley Chery <nanley.g.chery at intel.com>
Stop leaks into GLES contexts in _mesa_target_can_be_compressed().
v2. Remove OpenGL 3.1 requirement (Marek, Chad)
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/mesa/main/glformats.c | 3 +--
src/mesa/main/teximage.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 9134d7d..542dcfc 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -1327,8 +1327,7 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format)
case MESA_FORMAT_LAYOUT_ETC2:
return _mesa_is_gles3(ctx) || ctx->Extensions.ARB_ES3_compatibility;
case MESA_FORMAT_LAYOUT_BPTC:
- return _mesa_is_desktop_gl(ctx) &&
- ctx->Extensions.ARB_texture_compression_bptc;
+ return _mesa_has_ARB_texture_compression_bptc(ctx);
case MESA_FORMAT_LAYOUT_ASTC:
return _mesa_has_KHR_texture_compression_astc_ldr(ctx);
default:
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index c14f941..7910fe7 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1387,7 +1387,7 @@ _mesa_target_can_be_compressed(const struct gl_context *ctx, GLenum target,
return write_error(error, GL_INVALID_OPERATION);
break;
case MESA_FORMAT_LAYOUT_BPTC:
- target_can_be_compresed = ctx->Extensions.ARB_texture_compression_bptc;
+ target_can_be_compresed = _mesa_has_ARB_texture_compression_bptc(ctx);
break;
case MESA_FORMAT_LAYOUT_ASTC:
target_can_be_compresed =
--
2.6.2
More information about the mesa-dev
mailing list