summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2012-09-11 09:39:12 +0300
committerOliver McFadden <[email protected]>2012-09-15 12:57:04 +0300
commitab8d76357fe17b7b380e6f513f3385e2d39ca06d (patch)
tree859b21a8019a5e61362a2cfcac305e647220430b /src/mesa
parentbeb293e4cdbdbb012ee866c9548466b24e6b2194 (diff)
mesa: remove FEATURE_texture_s3tc define.
Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/extensions.c2
-rw-r--r--src/mesa/main/formats.c2
-rw-r--r--src/mesa/main/mfeatures.h2
-rw-r--r--src/mesa/main/texcompress.c3
-rw-r--r--src/mesa/main/texcompress_s3tc.c6
-rw-r--r--src/mesa/main/texcompress_s3tc.h27
-rw-r--r--src/mesa/main/texformat.c8
-rw-r--r--src/mesa/state_tracker/st_format.c9
8 files changed, 0 insertions, 59 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index e80b8b5ebfa..d1a1529433f 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -523,12 +523,10 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
#endif
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
-#if FEATURE_texture_s3tc
if (ctx->Mesa_DXTn) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
_mesa_enable_extension(ctx, "GL_S3_s3tc");
}
-#endif
}
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 5bc8235a34d..99a80347ccb 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -2267,7 +2267,6 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_RGB_FXT1:
case MESA_FORMAT_RGBA_FXT1:
-#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
case MESA_FORMAT_RGBA_DXT1:
case MESA_FORMAT_RGBA_DXT3:
@@ -2278,7 +2277,6 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_SRGBA_DXT3:
case MESA_FORMAT_SRGBA_DXT5:
#endif
-#endif
case MESA_FORMAT_RED_RGTC1:
case MESA_FORMAT_SIGNED_RED_RGTC1:
case MESA_FORMAT_RG_RGTC2:
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index 97bb8b28d61..1cbeed6aeb1 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -84,8 +84,6 @@
#define FEATURE_remap_table 0
#endif
-#define FEATURE_texture_s3tc FEATURE_GL
-
#define FEATURE_extra_context_init FEATURE_ES
#define FEATURE_point_size_array FEATURE_ES
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index ff4a9e768aa..fb0198715fd 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -379,7 +379,6 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
return GL_COMPRESSED_RGB_FXT1_3DFX;
case MESA_FORMAT_RGBA_FXT1:
return GL_COMPRESSED_RGBA_FXT1_3DFX;
-#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
return GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
case MESA_FORMAT_RGBA_DXT1:
@@ -398,8 +397,6 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
case MESA_FORMAT_SRGBA_DXT5:
return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
#endif
-#endif
-
case MESA_FORMAT_RED_RGTC1:
return GL_COMPRESSED_RED_RGTC1;
case MESA_FORMAT_SIGNED_RED_RGTC1:
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index b5d7d3b9be9..9c04196e52a 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -47,9 +47,6 @@
#include "swrast/s_context.h"
-#if FEATURE_texture_s3tc
-
-
#if defined(_WIN32) || defined(WIN32)
#define DXTN_LIBNAME "dxtn.dll"
#define RTLD_LAZY 0
@@ -531,6 +528,3 @@ _mesa_fetch_texel_srgba_dxt5(const struct swrast_texture_image *texImage,
texel[ACOMP] = UBYTE_TO_FLOAT(rgba[ACOMP]);
}
#endif /* FEATURE_EXT_texture_sRGB */
-
-
-#endif /* FEATURE_texture_s3tc */
diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h
index 2c06e50cef2..524ac0c134e 100644
--- a/src/mesa/main/texcompress_s3tc.h
+++ b/src/mesa/main/texcompress_s3tc.h
@@ -33,8 +33,6 @@
struct gl_context;
struct swrast_texture_image;
-#if FEATURE_texture_s3tc
-
extern GLboolean
_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS);
@@ -82,29 +80,4 @@ _mesa_fetch_texel_srgba_dxt5(const struct swrast_texture_image *texImage,
extern void
_mesa_init_texture_s3tc(struct gl_context *ctx);
-#else /* FEATURE_texture_s3tc */
-
-/* these are used only in texstore_funcs[] */
-#define _mesa_texstore_rgb_dxt1 NULL
-#define _mesa_texstore_rgba_dxt1 NULL
-#define _mesa_texstore_rgba_dxt3 NULL
-#define _mesa_texstore_rgba_dxt5 NULL
-
-/* these are used only in texfetch_funcs[] */
-#define _mesa_fetch_texel_2d_f_rgb_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_rgba_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_rgba_dxt3 NULL
-#define _mesa_fetch_texel_2d_f_rgba_dxt5 NULL
-#define _mesa_fetch_texel_2d_f_srgb_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_srgba_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_srgba_dxt3 NULL
-#define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL
-
-static inline void
-_mesa_init_texture_s3tc(struct gl_context *ctx)
-{
-}
-
-#endif /* FEATURE_texture_s3tc */
-
#endif /* TEXCOMPRESS_S3TC_H */
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index e9e4f5cee8e..910f318fc40 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -302,7 +302,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
}
}
-#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
@@ -336,7 +335,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
; /* fallthrough */
}
}
-#endif
if (ctx->Extensions.ARB_texture_float) {
switch (internalFormat) {
@@ -585,22 +583,17 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_EXT:
-#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
-#endif
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
-#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
-#endif
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA8);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
-#if FEATURE_texture_s3tc
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
@@ -621,7 +614,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT5);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
-#endif
default:
; /* fallthrough */
}
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 302b58c7b10..e039765f1c0 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -119,7 +119,6 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_Z32_FLOAT_S8X24_UINT;
case MESA_FORMAT_YCBCR:
return PIPE_FORMAT_UYVY;
-#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
return PIPE_FORMAT_DXT1_RGB;
case MESA_FORMAT_RGBA_DXT1:
@@ -137,9 +136,6 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_DXT3_SRGBA;
case MESA_FORMAT_SRGBA_DXT5:
return PIPE_FORMAT_DXT5_SRGBA;
-#endif
-#endif
-#if FEATURE_EXT_texture_sRGB
case MESA_FORMAT_SLA8:
return PIPE_FORMAT_L8A8_SRGB;
case MESA_FORMAT_SL8:
@@ -449,7 +445,6 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_YUYV:
return MESA_FORMAT_YCBCR_REV;
-#if FEATURE_texture_s3tc
case PIPE_FORMAT_DXT1_RGB:
return MESA_FORMAT_RGB_DXT1;
case PIPE_FORMAT_DXT1_RGBA:
@@ -467,10 +462,6 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_SRGBA_DXT3;
case PIPE_FORMAT_DXT5_SRGBA:
return MESA_FORMAT_SRGBA_DXT5;
-#endif
-#endif
-
-#if FEATURE_EXT_texture_sRGB
case PIPE_FORMAT_L8A8_SRGB:
return MESA_FORMAT_SLA8;
case PIPE_FORMAT_L8_SRGB: