summaryrefslogtreecommitdiff
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorIan Romanick <idr@freedesktop.org>2009-01-27 17:36:03 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-01-28 16:28:10 -0800
commit33fa5e4bfad8005f09ad3c9fc92c40fa863935d1 (patch)
tree6f481153716629a9a308e2aab1a4835de00f521b /src/mesa/main/texformat.c
parent26da28c995557c8b913e5ccfe31b31dc32e6c735 (diff)
Make GL_ARB_texture_compression mandatory
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c52
1 files changed, 25 insertions, 27 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 08725846c6..ffbb7fb19d 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -1481,41 +1481,39 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
}
}
- if (ctx->Extensions.ARB_texture_compression) {
- switch (internalFormat) {
- case GL_COMPRESSED_ALPHA_ARB:
- return &_mesa_texformat_alpha;
- case GL_COMPRESSED_LUMINANCE_ARB:
- return &_mesa_texformat_luminance;
- case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- return &_mesa_texformat_luminance_alpha;
- case GL_COMPRESSED_INTENSITY_ARB:
- return &_mesa_texformat_intensity;
- case GL_COMPRESSED_RGB_ARB:
+ switch (internalFormat) {
+ case GL_COMPRESSED_ALPHA_ARB:
+ return &_mesa_texformat_alpha;
+ case GL_COMPRESSED_LUMINANCE_ARB:
+ return &_mesa_texformat_luminance;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
+ return &_mesa_texformat_luminance_alpha;
+ case GL_COMPRESSED_INTENSITY_ARB:
+ return &_mesa_texformat_intensity;
+ case GL_COMPRESSED_RGB_ARB:
#if FEATURE_texture_fxt1
- if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return &_mesa_texformat_rgb_fxt1;
+ if (ctx->Extensions.TDFX_texture_compression_FXT1)
+ return &_mesa_texformat_rgb_fxt1;
#endif
#if FEATURE_texture_s3tc
- if (ctx->Extensions.EXT_texture_compression_s3tc ||
- ctx->Extensions.S3_s3tc)
- return &_mesa_texformat_rgb_dxt1;
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ ctx->Extensions.S3_s3tc)
+ return &_mesa_texformat_rgb_dxt1;
#endif
- return &_mesa_texformat_rgb;
- case GL_COMPRESSED_RGBA_ARB:
+ return &_mesa_texformat_rgb;
+ case GL_COMPRESSED_RGBA_ARB:
#if FEATURE_texture_fxt1
- if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return &_mesa_texformat_rgba_fxt1;
+ if (ctx->Extensions.TDFX_texture_compression_FXT1)
+ return &_mesa_texformat_rgba_fxt1;
#endif
#if FEATURE_texture_s3tc
- if (ctx->Extensions.EXT_texture_compression_s3tc ||
- ctx->Extensions.S3_s3tc)
- return &_mesa_texformat_rgba_dxt3; /* Not rgba_dxt1, see spec */
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ ctx->Extensions.S3_s3tc)
+ return &_mesa_texformat_rgba_dxt3; /* Not rgba_dxt1, see spec */
#endif
- return &_mesa_texformat_rgba;
- default:
- ; /* fallthrough */
- }
+ return &_mesa_texformat_rgba;
+ default:
+ ; /* fallthrough */
}
if (ctx->Extensions.MESA_ycbcr_texture) {