mesa: remove FEATURE_texture_s3tc define.
authorOliver McFadden <oliver.mcfadden@linux.intel.com>
Tue, 11 Sep 2012 06:39:12 +0000 (09:39 +0300)
committerOliver McFadden <oliver.mcfadden@linux.intel.com>
Sat, 15 Sep 2012 09:57:04 +0000 (12:57 +0300)
Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/extensions.c
src/mesa/main/formats.c
src/mesa/main/mfeatures.h
src/mesa/main/texcompress.c
src/mesa/main/texcompress_s3tc.c
src/mesa/main/texcompress_s3tc.h
src/mesa/main/texformat.c
src/mesa/state_tracker/st_format.c

index e80b8b5ebfa3342eeafd5181062469326ce5f4bd..d1a1529433fbc1be3a39ff8004003b9da1152edd 100644 (file)
@@ -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
 }
 
 
index 5bc8235a34dfb76553fc7a9955cde1bfbb0dced7..99a80347ccbfd4f79fbb22f4dc5dda4ae75e0a14 100644 (file)
@@ -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:
@@ -2277,7 +2276,6 @@ _mesa_format_to_type_and_comps(gl_format format,
    case MESA_FORMAT_SRGBA_DXT1:
    case MESA_FORMAT_SRGBA_DXT3:
    case MESA_FORMAT_SRGBA_DXT5:
-#endif
 #endif
    case MESA_FORMAT_RED_RGTC1:
    case MESA_FORMAT_SIGNED_RED_RGTC1:
index 97bb8b28d6143c7e6dd8cac1bc2954420562aa87..1cbeed6aeb1174233f06e504b84e710eb5a7afa3 100644 (file)
@@ -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
 
index ff4a9e768aa6a37a6d6171c7ffc4d532067b5eed..fb0198715fd087250d56c013ec2d7b27b5c0616e 100644 (file)
@@ -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:
index b5d7d3b9be97a9b48c07ded3cf5767b12ec6fa13..9c04196e52a63150d7f842c346dbaaab5e4e7775 100644 (file)
@@ -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 */
index 2c06e50cef270af0b09739f1b217c2919895cacf..524ac0c134e61fcd1e54aab99fa59fa9663ad13c 100644 (file)
@@ -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 */
index e9e4f5cee8e69d02a00ea3e06982170767aba175..910f318fc40d4138528985b1c9e577a9b3e797f5 100644 (file)
@@ -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 */
       }
index 302b58c7b103006b19289be78a78e8cb82028227..e039765f1c0a10853b740d823cc96060d021ba71 100644 (file)
@@ -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: