summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/extensions.c6
-rw-r--r--src/mesa/main/mtypes.h3
-rw-r--r--src/mesa/main/texcompress_s3tc.c7
-rw-r--r--src/mesa/main/texcompress_s3tc.h3
-rw-r--r--src/mesa/main/texformat.c14
-rw-r--r--src/mesa/main/teximage.c32
7 files changed, 6 insertions, 61 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 55a65ac2abe..676103d4778 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -866,8 +866,6 @@ init_attrib_groups(struct gl_context *ctx)
if (!_mesa_init_texture( ctx ))
return GL_FALSE;
- _mesa_init_texture_s3tc( ctx );
-
/* Miscellaneous */
ctx->NewState = _NEW_ALL;
ctx->NewDriverState = ~0;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5a5fdd247f3..f185aa5aab5 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -177,10 +177,8 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
ctx->Extensions.OES_standard_derivatives = GL_TRUE;
ctx->Extensions.TDFX_texture_compression_FXT1 = GL_TRUE;
- if (ctx->Mesa_DXTn) {
- ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE;
- ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
- }
+ ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE;
+ ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
}
/**
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index db9ea760e01..abda1a36e46 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4974,9 +4974,6 @@ struct gl_context
*/
GLboolean HasConfig;
- /** software compression/decompression supported or not */
- GLboolean Mesa_DXTn;
-
GLboolean TextureFormatSupported[MESA_FORMAT_COUNT];
GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 14067f0e991..a3bb340b4ee 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -43,13 +43,6 @@
#include "util/format_srgb.h"
-void
-_mesa_init_texture_s3tc( struct gl_context *ctx )
-{
- /* called during context initialization */
- ctx->Mesa_DXTn = GL_TRUE;
-}
-
/**
* Store user's image in rgb_dxt1 format.
*/
diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h
index 438b71fe332..0dbb5fc5371 100644
--- a/src/mesa/main/texcompress_s3tc.h
+++ b/src/mesa/main/texcompress_s3tc.h
@@ -44,9 +44,6 @@ extern GLboolean
_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS);
-extern void
-_mesa_init_texture_s3tc(struct gl_context *ctx);
-
extern compressed_fetch_func
_mesa_get_dxt_fetch_func(mesa_format format);
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index baa3988f0a0..3f8e7a49a27 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -249,9 +249,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
* 1D ARRAY textures in S3TC format.
*/
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
}
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
@@ -260,9 +258,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
case GL_COMPRESSED_RGBA_ARB:
/* We don't use texture compression for 1D and 1D array textures. */
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
}
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
@@ -502,15 +498,13 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_A8R8G8B8_SRGB);
break;
case GL_COMPRESSED_SRGB_EXT:
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
RETURN_IF_SUPPORTED(MESA_FORMAT_A8R8G8B8_SRGB);
break;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
RETURN_IF_SUPPORTED(MESA_FORMAT_A8R8G8B8_SRGB);
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index d0642051909..0a3025a2e6b 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2769,38 +2769,6 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
}
- /* If the application requested compression to an S3TC format but we don't
- * have the DXTn library, force a generic compressed format instead.
- */
- if (internalFormat != format && format != GL_NONE) {
- const GLenum before = internalFormat;
-
- switch (internalFormat) {
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- if (!ctx->Mesa_DXTn)
- internalFormat = GL_COMPRESSED_RGB;
- break;
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- if (!ctx->Mesa_DXTn)
- internalFormat = GL_COMPRESSED_RGBA;
- break;
- default:
- break;
- }
-
- if (before != internalFormat) {
- _mesa_warning(ctx,
- "DXT compression requested (%s), "
- "but libtxc_dxtn library not installed. Using %s "
- "instead.",
- _mesa_enum_to_string(before),
- _mesa_enum_to_string(internalFormat));
- }
- }
-
- /* choose format from scratch */
f = ctx->Driver.ChooseTextureFormat(ctx, target, internalFormat,
format, type);
assert(f != MESA_FORMAT_NONE);