mesa: remove FEATURE_EXT_texture_sRGB define.
authorOliver McFadden <oliver.mcfadden@linux.intel.com>
Tue, 11 Sep 2012 08:11:56 +0000 (11:11 +0300)
committerOliver McFadden <oliver.mcfadden@linux.intel.com>
Sat, 15 Sep 2012 09:57:48 +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/glformats.c
src/mesa/main/mfeatures.h
src/mesa/main/texcompress.c
src/mesa/main/texcompress_s3tc.c
src/mesa/main/texformat.c
src/mesa/main/teximage.c
src/mesa/main/texstore.c
src/mesa/state_tracker/st_format.c

index 3dcd0c8113cd7d1027dbe35c638b99699817ce38..5077e4dd65f50bb3ba3f5c0c3aabadc6192c3d35 100644 (file)
@@ -460,10 +460,8 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
    ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE;
    ctx->Extensions.EXT_texture_shared_exponent = GL_TRUE;
-#if FEATURE_EXT_texture_sRGB
    ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
    ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE;
-#endif
    ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
 #if FEATURE_EXT_transform_feedback
    /*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/
@@ -568,9 +566,7 @@ void
 _mesa_enable_2_1_extensions(struct gl_context *ctx)
 {
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
-#if FEATURE_EXT_texture_sRGB
    ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
-#endif
 }
 
 
index 99a80347ccbfd4f79fbb22f4dc5dda4ae75e0a14..df23af1dd0efe66ff2ae6e9c736b4a39a46b4424 100644 (file)
@@ -2245,7 +2245,6 @@ _mesa_format_to_type_and_comps(gl_format format,
       *comps = 4;
       return;
 
-#if FEATURE_EXT_texture_sRGB
    case MESA_FORMAT_SRGB8:
       *datatype = GL_UNSIGNED_BYTE;
       *comps = 3;
@@ -2263,7 +2262,6 @@ _mesa_format_to_type_and_comps(gl_format format,
       *datatype = GL_UNSIGNED_BYTE;
       *comps = 2;
       return;
-#endif
 
    case MESA_FORMAT_RGB_FXT1:
    case MESA_FORMAT_RGBA_FXT1:
@@ -2271,12 +2269,10 @@ _mesa_format_to_type_and_comps(gl_format format,
    case MESA_FORMAT_RGBA_DXT1:
    case MESA_FORMAT_RGBA_DXT3:
    case MESA_FORMAT_RGBA_DXT5:
-#if FEATURE_EXT_texture_sRGB
    case MESA_FORMAT_SRGB_DXT1:
    case MESA_FORMAT_SRGBA_DXT1:
    case MESA_FORMAT_SRGBA_DXT3:
    case MESA_FORMAT_SRGBA_DXT5:
-#endif
    case MESA_FORMAT_RED_RGTC1:
    case MESA_FORMAT_SIGNED_RED_RGTC1:
    case MESA_FORMAT_RG_RGTC2:
index 2d06cb7151b9e58247af4aea5f4db279a2e3917b..047a613a1314bc8ac52b4824a1c057d2b2a6d5a2 100644 (file)
@@ -544,7 +544,6 @@ _mesa_is_color_format(GLenum format)
       case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
       case GL_COMPRESSED_RGB_FXT1_3DFX:
       case GL_COMPRESSED_RGBA_FXT1_3DFX:
-#if FEATURE_EXT_texture_sRGB
       case GL_SRGB_EXT:
       case GL_SRGB8_EXT:
       case GL_SRGB_ALPHA_EXT:
@@ -561,7 +560,6 @@ _mesa_is_color_format(GLenum format)
       case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
       case GL_COMPRESSED_SLUMINANCE_EXT:
       case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
-#endif /* FEATURE_EXT_texture_sRGB */
       case GL_COMPRESSED_RED_RGTC1:
       case GL_COMPRESSED_SIGNED_RED_RGTC1:
       case GL_COMPRESSED_RG_RGTC2:
index a1610211e70a77a74ee8b1f452c4074da39a2a45..fd3eae100649cce5b4a6237e4d9e22d73d56042b 100644 (file)
@@ -84,7 +84,6 @@
 #define FEATURE_remap_table               0
 #endif
 
-#define FEATURE_EXT_texture_sRGB          FEATURE_GL
 #define FEATURE_EXT_transform_feedback    FEATURE_GL
 
 #define FEATURE_APPLE_object_purgeable    FEATURE_GL
index fb0198715fd087250d56c013ec2d7b27b5c0616e..bb61e6eda747f75c88fb4b1319cfd2d2df9af775 100644 (file)
@@ -387,7 +387,6 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
       return GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
    case MESA_FORMAT_RGBA_DXT5:
       return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
-#if FEATURE_EXT_texture_sRGB
    case MESA_FORMAT_SRGB_DXT1:
       return GL_COMPRESSED_SRGB_S3TC_DXT1_EXT;
    case MESA_FORMAT_SRGBA_DXT1:
@@ -396,7 +395,6 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
       return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
    case MESA_FORMAT_SRGBA_DXT5:
       return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
-#endif
    case MESA_FORMAT_RED_RGTC1:
       return GL_COMPRESSED_RED_RGTC1;
    case MESA_FORMAT_SIGNED_RED_RGTC1:
index 9c04196e52a63150d7f842c346dbaaab5e4e7775..6476f118e64184fa1ca69df9f1af1102a0d5d994 100644 (file)
@@ -57,7 +57,6 @@
 #define DXTN_LIBNAME "libtxc_dxtn.so"
 #endif
 
-#if FEATURE_EXT_texture_sRGB
 /**
  * Convert an 8-bit sRGB value from non-linear space to a
  * linear RGB value in [0, 1].
@@ -84,7 +83,6 @@ nonlinear_to_linear(GLubyte cs8)
    }
    return table[cs8];
 }
-#endif /* FEATURE_EXT_texture_sRGB */
 
 typedef void (*dxtFetchTexelFuncExt)( GLint srcRowstride, GLubyte *pixdata, GLint col, GLint row, GLvoid *texelOut );
 
@@ -475,7 +473,6 @@ _mesa_fetch_texel_rgba_dxt5(const struct swrast_texture_image *texImage,
    texel[ACOMP] = UBYTE_TO_FLOAT(rgba[ACOMP]);
 }
 
-#if FEATURE_EXT_texture_sRGB
 void
 _mesa_fetch_texel_srgb_dxt1(const struct swrast_texture_image *texImage,
                             GLint i, GLint j, GLint k, GLfloat *texel)
@@ -527,4 +524,3 @@ _mesa_fetch_texel_srgba_dxt5(const struct swrast_texture_image *texImage,
    texel[BCOMP] = nonlinear_to_linear(rgba[BCOMP]);
    texel[ACOMP] = UBYTE_TO_FLOAT(rgba[ACOMP]);
 }
-#endif /* FEATURE_EXT_texture_sRGB */
index 910f318fc40d4138528985b1c9e577a9b3e797f5..17270ba9248c020df7a796fd43bacf22099a260e 100644 (file)
@@ -551,7 +551,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
       }
    }
 
-#if FEATURE_EXT_texture_sRGB
    if (ctx->Extensions.EXT_texture_sRGB) {
       switch (internalFormat) {
          case GL_SRGB_EXT:
@@ -618,7 +617,6 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
             ; /* fallthrough */
       }
    }
-#endif /* FEATURE_EXT_texture_sRGB */
 
    if (ctx->Extensions.EXT_texture_integer) {
       switch (internalFormat) {
index 3a37a7cd7936d471d85a4244391ff6f2d774afda..da8fbcd32762e5a3af84063dc7686a1fe7d2b712 100644 (file)
@@ -311,7 +311,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
       }
    }
 
-#if FEATURE_EXT_texture_sRGB
    if (ctx->Extensions.EXT_texture_sRGB) {
       switch (internalFormat) {
       case GL_SRGB_EXT:
@@ -338,7 +337,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
          ; /* fallthrough */
       }
    }
-#endif /* FEATURE_EXT_texture_sRGB */
 
    if (ctx->Version >= 30 ||
        ctx->Extensions.EXT_texture_integer) {
index 2d055808ead917e4e76e055b1138b99f4a55338d..e2598a1dcea700935ddfe4baac66633d0183c5ff 100644 (file)
@@ -3604,9 +3604,6 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
 }
 
 
-
-
-#if FEATURE_EXT_texture_sRGB
 static GLboolean
 _mesa_texstore_srgb8(TEXSTORE_PARAMS)
 {
@@ -3710,17 +3707,6 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
    return k;
 }
 
-#else
-
-/* these are used only in texstore_funcs[] below */
-#define _mesa_texstore_srgb8 NULL
-#define _mesa_texstore_srgba8 NULL
-#define _mesa_texstore_sargb8 NULL
-#define _mesa_texstore_sl8 NULL
-#define _mesa_texstore_sla8 NULL
-
-#endif /* FEATURE_EXT_texture_sRGB */
-
 static GLboolean
 _mesa_texstore_rgb9_e5(TEXSTORE_PARAMS)
 {
index e039765f1c0a10853b740d823cc96060d021ba71..a9ff2cd0dd5b5d450cf61f08b140ebbb34b4eea3 100644 (file)
@@ -127,7 +127,6 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
       return PIPE_FORMAT_DXT3_RGBA;
    case MESA_FORMAT_RGBA_DXT5:
       return PIPE_FORMAT_DXT5_RGBA;
-#if FEATURE_EXT_texture_sRGB
    case MESA_FORMAT_SRGB_DXT1:
       return PIPE_FORMAT_DXT1_SRGB;
    case MESA_FORMAT_SRGBA_DXT1:
@@ -146,7 +145,6 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
       return PIPE_FORMAT_A8B8G8R8_SRGB;
    case MESA_FORMAT_SARGB8:
       return PIPE_FORMAT_B8G8R8A8_SRGB;
-#endif
    case MESA_FORMAT_RGBA_FLOAT32:
       return PIPE_FORMAT_R32G32B32A32_FLOAT;
    case MESA_FORMAT_RGBA_FLOAT16:
@@ -453,7 +451,6 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
       return MESA_FORMAT_RGBA_DXT3;
    case PIPE_FORMAT_DXT5_RGBA:
       return MESA_FORMAT_RGBA_DXT5;
-#if FEATURE_EXT_texture_sRGB
    case PIPE_FORMAT_DXT1_SRGB:
       return MESA_FORMAT_SRGB_DXT1;
    case PIPE_FORMAT_DXT1_SRGBA:
@@ -472,7 +469,6 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
       return MESA_FORMAT_SRGBA8;
    case PIPE_FORMAT_B8G8R8A8_SRGB:
       return MESA_FORMAT_SARGB8;
-#endif
    case PIPE_FORMAT_R32G32B32A32_FLOAT:
       return MESA_FORMAT_RGBA_FLOAT32;
    case PIPE_FORMAT_R16G16B16A16_FLOAT: