[Mesa-dev] [RFC 12/21] mesa: Fix 3DFX_texture_compression_FXT1 funtionality leaks
Nanley Chery
nanleychery at gmail.com
Mon Oct 19 15:44:50 PDT 2015
From: Nanley Chery <nanley.g.chery at intel.com>
Stop leaks into the following contexts:
* GLES in _mesa_get_compressed_formats().
* GL legacy 1.0 in all uses.
The extension spec lists OpenGL 1.1 as required, so update the
extension table accordingly.
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/mesa/main/extensions_table.h | 2 +-
src/mesa/main/glformats.c | 3 +--
src/mesa/main/texcompress.c | 4 +---
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index b18f4e6..7fe4546 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -266,7 +266,7 @@ EXT(KHR_texture_compression_astc_hdr , KHR_texture_compression_astc_hdr
EXT(KHR_texture_compression_astc_ldr , KHR_texture_compression_astc_ldr , GLL, GLC, x , ES2, 2012)
-EXT(3DFX_texture_compression_FXT1 , TDFX_texture_compression_FXT1 , GLL, GLC, x , x , 1999)
+EXT(3DFX_texture_compression_FXT1 , TDFX_texture_compression_FXT1 , 11, GLC, x , x , 1999)
EXT(AMD_conservative_depth , ARB_conservative_depth , GLL, GLC, x , x , 2009)
EXT(AMD_draw_buffers_blend , ARB_draw_buffers_blend , GLL, GLC, x , x , 2009)
EXT(AMD_performance_monitor , AMD_performance_monitor , GLL, GLC, x , x , 2007)
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 2ed42ea..3ad9e3c 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -1315,8 +1315,7 @@ _mesa_is_compressed_format(const struct gl_context *ctx, GLenum format)
&& ctx->Extensions.EXT_texture_compression_s3tc;
}
case MESA_FORMAT_LAYOUT_FXT1:
- return _mesa_is_desktop_gl(ctx)
- && ctx->Extensions.TDFX_texture_compression_FXT1;
+ return _mesa_has_3DFX_texture_compression_FXT1(ctx);
case MESA_FORMAT_LAYOUT_RGTC:
return _mesa_is_desktop_gl(ctx)
&& ctx->Extensions.ARB_texture_compression_rgtc;
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 1615f4f..8ea7fe9 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -286,9 +286,7 @@ GLuint
_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
{
GLuint n = 0;
- if (ctx->Extensions.TDFX_texture_compression_FXT1 &&
- (ctx->API == API_OPENGL_CORE ||
- (ctx->API == API_OPENGL_COMPAT && ctx->Version > 10))) {
+ if (_mesa_has_3DFX_texture_compression_FXT1(ctx)) {
if (formats) {
formats[n++] = GL_COMPRESSED_RGB_FXT1_3DFX;
formats[n++] = GL_COMPRESSED_RGBA_FXT1_3DFX;
--
2.6.1
More information about the mesa-dev
mailing list