[Mesa-dev] [PATCH v2 11/18] mesa: Use _mesa_has_3DFX_texture_compression_FXT1()
Nanley Chery
nanleychery at gmail.com
Fri Oct 30 14:19:28 PDT 2015
From: Nanley Chery <nanley.g.chery at intel.com>
Replace the open-coded check for extension support with
the helper function that determines this support.
v2. Don't check for pre-1.2 desktop GL contexts
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/mesa/main/glformats.c | 3 +--
src/mesa/main/texcompress.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
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 a8ac19e..d036bce 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -264,8 +264,7 @@ GLuint
_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
{
GLuint n = 0;
- if (_mesa_is_desktop_gl(ctx) &&
- ctx->Extensions.TDFX_texture_compression_FXT1) {
+ 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.2
More information about the mesa-dev
mailing list