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;*/
_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
}
*comps = 4;
return;
-#if FEATURE_EXT_texture_sRGB
case MESA_FORMAT_SRGB8:
*datatype = GL_UNSIGNED_BYTE;
*comps = 3;
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
-#endif
case MESA_FORMAT_RGB_FXT1:
case MESA_FORMAT_RGBA_FXT1:
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:
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:
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:
#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
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:
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:
#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].
}
return table[cs8];
}
-#endif /* FEATURE_EXT_texture_sRGB */
typedef void (*dxtFetchTexelFuncExt)( GLint srcRowstride, GLubyte *pixdata, GLint col, GLint row, GLvoid *texelOut );
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)
texel[BCOMP] = nonlinear_to_linear(rgba[BCOMP]);
texel[ACOMP] = UBYTE_TO_FLOAT(rgba[ACOMP]);
}
-#endif /* FEATURE_EXT_texture_sRGB */
}
}
-#if FEATURE_EXT_texture_sRGB
if (ctx->Extensions.EXT_texture_sRGB) {
switch (internalFormat) {
case GL_SRGB_EXT:
; /* fallthrough */
}
}
-#endif /* FEATURE_EXT_texture_sRGB */
if (ctx->Extensions.EXT_texture_integer) {
switch (internalFormat) {
}
}
-#if FEATURE_EXT_texture_sRGB
if (ctx->Extensions.EXT_texture_sRGB) {
switch (internalFormat) {
case GL_SRGB_EXT:
; /* fallthrough */
}
}
-#endif /* FEATURE_EXT_texture_sRGB */
if (ctx->Version >= 30 ||
ctx->Extensions.EXT_texture_integer) {
}
-
-
-#if FEATURE_EXT_texture_sRGB
static GLboolean
_mesa_texstore_srgb8(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)
{
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:
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:
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:
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: