summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-12-01 12:02:04 -0800
committerIan Romanick <[email protected]>2013-01-23 23:38:04 -0500
commita021881ccdaf1d81fb7c8bef4b58b4c037dc4f44 (patch)
treed4a9d8d0df948ca77926dcb876d01834f43300ac /src/mesa/main/texformat.c
parent8059c2ea9011110df3632e28a4311de9373b9b4e (diff)
mesa: Use a single flag for the S3TC extensions that don't require on-line compression
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Lee Salzman <[email protected]>
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 4fb4b70f973..b0ff6ec73c3 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -251,7 +251,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
*/
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
if (ctx->Extensions.EXT_texture_compression_s3tc ||
- ctx->Extensions.S3_s3tc)
+ ctx->Extensions.ANGLE_texture_compression_dxt)
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
if (ctx->Extensions.TDFX_texture_compression_FXT1)
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
@@ -264,7 +264,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
/* We don't use texture compression for 1D and 1D array textures. */
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
if (ctx->Extensions.EXT_texture_compression_s3tc ||
- ctx->Extensions.S3_s3tc)
+ ctx->Extensions.ANGLE_texture_compression_dxt)
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
if (ctx->Extensions.TDFX_texture_compression_FXT1)
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
@@ -329,7 +329,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
}
}
- if (ctx->Extensions.S3_s3tc) {
+ if (_mesa_is_desktop_gl(ctx)
+ && ctx->Extensions.ANGLE_texture_compression_dxt) {
switch (internalFormat) {
case GL_RGB_S3TC:
case GL_RGB4_S3TC: