[Mesa-dev] [PATCH 19/47] mesa: remove FEATURE_texture_s3tc define.
Oliver McFadden
oliver.mcfadden at linux.intel.com
Thu Sep 13 01:18:48 PDT 2012
Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
src/mesa/main/extensions.c | 2 --
src/mesa/main/formats.c | 2 --
src/mesa/main/mfeatures.h | 2 --
src/mesa/main/texcompress.c | 3 ---
src/mesa/main/texcompress_s3tc.c | 6 ------
src/mesa/main/texcompress_s3tc.h | 27 ---------------------------
src/mesa/main/texformat.c | 8 --------
src/mesa/state_tracker/st_format.c | 9 ---------
8 files changed, 0 insertions(+), 59 deletions(-)
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index e80b8b5..d1a1529 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 5bc8235..99a8034 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 97bb8b2..1cbeed6 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 ff4a9e7..fb01987 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 8736e20..42851f0 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 2c06e50..524ac0c 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 e9e4f5c..910f318 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 302b58c..e039765 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:
--
1.7.8.6
More information about the mesa-dev
mailing list