aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 24a551061..31a559e9d 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -190,7 +190,9 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
- if (ctx->Extensions.EXT_texture_compression_s3tc) {
+ /* Assume that the ANGLE flag will always be set if the EXT flag is set.
+ */
+ if (ctx->Extensions.ANGLE_texture_compression_dxt) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
return GL_RGB;
@@ -203,19 +205,8 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
- /* GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE && GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE */
- if (ctx->API == API_OPENGLES2 &&
- ctx->Extensions.ANGLE_texture_compression_dxt) {
- switch (internalFormat) {
- case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- return GL_RGBA;
- default:
- ; /* fallthrough */
- }
- }
-
- 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: