Commit 88233b0b authored by Oliver McFadden's avatar Oliver McFadden

mesa: remove FEATURE_EXT_texture_sRGB define.

Signed-off-by: default avatarOliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
parent e9ccb5fe
......@@ -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
}
......
......@@ -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:
......
......@@ -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:
......
......@@ -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
......
......@@ -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:
......
......@@ -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 */
......@@ -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) {
......
......@@ -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) {
......
......@@ -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)
{
......
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment