[Mesa-dev] [PATCH 19/45] mesa: replace FEATURE_texture_s3tc with FEATURE_GL define.

Oliver McFadden oliver.mcfadden at linux.intel.com
Tue Sep 11 02:56:32 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        |    2 +-
 src/mesa/main/texcompress_s3tc.c   |    4 ++--
 src/mesa/main/texcompress_s3tc.h   |    6 +++---
 src/mesa/main/texformat.c          |    8 ++++----
 src/mesa/state_tracker/st_format.c |    4 ++--
 8 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index b16519d..d801f72 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -527,7 +527,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
 #if FEATURE_GL
    _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
 #endif
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
    if (ctx->Mesa_DXTn) {
       _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
       _mesa_enable_extension(ctx, "GL_S3_s3tc");
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index bd45090..caa1e8e 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -2269,7 +2269,7 @@ _mesa_format_to_type_and_comps(gl_format format,
    case MESA_FORMAT_RGB_FXT1:
    case MESA_FORMAT_RGBA_FXT1:
 #endif
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
    case MESA_FORMAT_RGB_DXT1:
    case MESA_FORMAT_RGBA_DXT1:
    case MESA_FORMAT_RGBA_DXT3:
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 91eabe0..a24fb23 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -381,7 +381,7 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
    case MESA_FORMAT_RGBA_FXT1:
       return GL_COMPRESSED_RGBA_FXT1_3DFX;
 #endif
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
    case MESA_FORMAT_RGB_DXT1:
       return GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
    case MESA_FORMAT_RGBA_DXT1:
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 8736e20..b349c43 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -47,7 +47,7 @@
 #include "swrast/s_context.h"
 
 
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
 
 
 #if defined(_WIN32) || defined(WIN32)
@@ -533,4 +533,4 @@ _mesa_fetch_texel_srgba_dxt5(const struct swrast_texture_image *texImage,
 #endif /* FEATURE_EXT_texture_sRGB */
 
 
-#endif /* FEATURE_texture_s3tc */
+#endif /* FEATURE_GL */
diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h
index 2c06e50..08110c8 100644
--- a/src/mesa/main/texcompress_s3tc.h
+++ b/src/mesa/main/texcompress_s3tc.h
@@ -33,7 +33,7 @@
 struct gl_context;
 struct swrast_texture_image;
 
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
 
 extern GLboolean
 _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS);
@@ -82,7 +82,7 @@ _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 */
+#else /* FEATURE_GL */
 
 /* these are used only in texstore_funcs[] */
 #define _mesa_texstore_rgb_dxt1 NULL
@@ -105,6 +105,6 @@ _mesa_init_texture_s3tc(struct gl_context *ctx)
 {
 }
 
-#endif /* FEATURE_texture_s3tc */
+#endif /* FEATURE_GL */
 
 #endif /* TEXCOMPRESS_S3TC_H */
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index fa86686..8f97926 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -304,7 +304,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
    }
 #endif
 
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
    if (ctx->Extensions.EXT_texture_compression_s3tc) {
       switch (internalFormat) {
          case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
@@ -587,7 +587,7 @@ _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 FEATURE_GL
             if (ctx->Extensions.EXT_texture_compression_s3tc)
 	       RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
 #endif
@@ -595,14 +595,14 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
 	    RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
 	    break;
          case GL_COMPRESSED_SRGB_ALPHA_EXT:
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
             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
+#if FEATURE_GL
          case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
             if (ctx->Extensions.EXT_texture_compression_s3tc)
 	       RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 302b58c..9bdb692 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -119,7 +119,7 @@ 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
+#if FEATURE_GL
    case MESA_FORMAT_RGB_DXT1:
       return PIPE_FORMAT_DXT1_RGB;
    case MESA_FORMAT_RGBA_DXT1:
@@ -449,7 +449,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
    case PIPE_FORMAT_YUYV:
       return MESA_FORMAT_YCBCR_REV;
 
-#if FEATURE_texture_s3tc
+#if FEATURE_GL
    case PIPE_FORMAT_DXT1_RGB:
       return MESA_FORMAT_RGB_DXT1;
    case PIPE_FORMAT_DXT1_RGBA:
-- 
1.7.8.6



More information about the mesa-dev mailing list