ctx->Extensions.ARB_occlusion_query = true;
}
- if (intel->ctx.Mesa_DXTn
- || driQueryOptionb(&intel->optionCache, "force_s3tc_enable"))
- ctx->Extensions.EXT_texture_compression_s3tc = true;
-
+ ctx->Extensions.EXT_texture_compression_s3tc = true;
ctx->Extensions.ANGLE_texture_compression_dxt = true;
}
if (ctx->API != API_OPENGL_CORE)
ctx->Extensions.ARB_color_buffer_float = true;
- if (ctx->Mesa_DXTn || driQueryOptionb(&brw->optionCache, "force_s3tc_enable"))
- ctx->Extensions.EXT_texture_compression_s3tc = true;
-
+ ctx->Extensions.EXT_texture_compression_s3tc = true;
ctx->Extensions.ANGLE_texture_compression_dxt = true;
}
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.NV_fog_distance = true;
ctx->Extensions.NV_texture_rectangle = true;
- if (ctx->Mesa_DXTn) {
- ctx->Extensions.EXT_texture_compression_s3tc = true;
- ctx->Extensions.ANGLE_texture_compression_dxt = true;
- }
+ ctx->Extensions.EXT_texture_compression_s3tc = true;
+ ctx->Extensions.ANGLE_texture_compression_dxt = true;
/* GL constants. */
ctx->Const.MaxTextureLevels = 12;
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.NV_fog_distance = true;
ctx->Extensions.NV_texture_rectangle = true;
- if (ctx->Mesa_DXTn) {
- ctx->Extensions.EXT_texture_compression_s3tc = true;
- ctx->Extensions.ANGLE_texture_compression_dxt = true;
- }
+ ctx->Extensions.EXT_texture_compression_s3tc = true;
+ ctx->Extensions.ANGLE_texture_compression_dxt = true;
/* GL constants. */
ctx->Const.MaxTextureCoordUnits = NV20_TEXTURE_UNITS;
others get the bit ordering right but don't actually do YUV-RGB conversion */
ctx->Extensions.MESA_ycbcr_texture = true;
}
- if (rmesa->radeon.glCtx.Mesa_DXTn) {
- ctx->Extensions.EXT_texture_compression_s3tc = true;
- ctx->Extensions.ANGLE_texture_compression_dxt = true;
- }
- else if (driQueryOptionb (&rmesa->radeon.optionCache, "force_s3tc_enable")) {
- ctx->Extensions.EXT_texture_compression_s3tc = true;
- ctx->Extensions.ANGLE_texture_compression_dxt = true;
- }
+ ctx->Extensions.EXT_texture_compression_s3tc = true;
+ ctx->Extensions.ANGLE_texture_compression_dxt = true;
#if 0
r200InitDriverFuncs( ctx );
ctx->Extensions.NV_texture_rectangle = true;
ctx->Extensions.OES_EGL_image = true;
- if (rmesa->radeon.glCtx.Mesa_DXTn) {
- ctx->Extensions.EXT_texture_compression_s3tc = true;
- ctx->Extensions.ANGLE_texture_compression_dxt = true;
- }
- else if (driQueryOptionb (&rmesa->radeon.optionCache, "force_s3tc_enable")) {
- ctx->Extensions.EXT_texture_compression_s3tc = true;
- ctx->Extensions.ANGLE_texture_compression_dxt = true;
- }
+ ctx->Extensions.EXT_texture_compression_s3tc = true;
+ ctx->Extensions.ANGLE_texture_compression_dxt = true;
/* XXX these should really go right after _mesa_init_driver_functions() */
radeon_fbo_init(&rmesa->radeon);
if (!_mesa_init_texture( ctx ))
return GL_FALSE;
- _mesa_init_texture_s3tc( ctx );
-
/* Miscellaneous */
ctx->NewState = _NEW_ALL;
ctx->NewDriverState = ~0;
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
ctx->Extensions.OES_standard_derivatives = GL_TRUE;
ctx->Extensions.TDFX_texture_compression_FXT1 = GL_TRUE;
- if (ctx->Mesa_DXTn) {
- ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE;
- ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
- }
+ ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE;
+ ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
}
/**
*/
GLboolean HasConfig;
- /** software compression/decompression supported or not */
- GLboolean Mesa_DXTn;
-
GLboolean TextureFormatSupported[MESA_FORMAT_COUNT];
GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */
#include "util/format_srgb.h"
-void
-_mesa_init_texture_s3tc( struct gl_context *ctx )
-{
- /* called during context initialization */
- ctx->Mesa_DXTn = GL_TRUE;
-}
-
/**
* Store user's image in rgb_dxt1 format.
*/
_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS);
-extern void
-_mesa_init_texture_s3tc(struct gl_context *ctx);
-
extern compressed_fetch_func
_mesa_get_dxt_fetch_func(mesa_format format);
* 1D ARRAY textures in S3TC format.
*/
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
}
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_UNORM8);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8X8_UNORM);
case GL_COMPRESSED_RGBA_ARB:
/* We don't use texture compression for 1D and 1D array textures. */
if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) {
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
- RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */
}
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_UNORM);
RETURN_IF_SUPPORTED(MESA_FORMAT_A8R8G8B8_SRGB);
break;
case GL_COMPRESSED_SRGB_EXT:
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
RETURN_IF_SUPPORTED(MESA_FORMAT_BGR_SRGB8);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
RETURN_IF_SUPPORTED(MESA_FORMAT_A8R8G8B8_SRGB);
break;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
- if (ctx->Mesa_DXTn)
- RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
+ RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3); /* Not srgba_dxt1, see spec */
RETURN_IF_SUPPORTED(MESA_FORMAT_A8B8G8R8_SRGB);
RETURN_IF_SUPPORTED(MESA_FORMAT_B8G8R8A8_SRGB);
RETURN_IF_SUPPORTED(MESA_FORMAT_A8R8G8B8_SRGB);
}
}
- /* If the application requested compression to an S3TC format but we don't
- * have the DXTn library, force a generic compressed format instead.
- */
- if (internalFormat != format && format != GL_NONE) {
- const GLenum before = internalFormat;
-
- switch (internalFormat) {
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- if (!ctx->Mesa_DXTn)
- internalFormat = GL_COMPRESSED_RGB;
- break;
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- if (!ctx->Mesa_DXTn)
- internalFormat = GL_COMPRESSED_RGBA;
- break;
- default:
- break;
- }
-
- if (before != internalFormat) {
- _mesa_warning(ctx,
- "DXT compression requested (%s), "
- "but libtxc_dxtn library not installed. Using %s "
- "instead.",
- _mesa_enum_to_string(before),
- _mesa_enum_to_string(internalFormat));
- }
- }
-
- /* choose format from scratch */
f = ctx->Driver.ChooseTextureFormat(ctx, target, internalFormat,
format, type);
assert(f != MESA_FORMAT_NONE);
/* GL limits and extensions */
st_init_limits(pipe->screen, &ctx->Const, &ctx->Extensions);
st_init_extensions(pipe->screen, &ctx->Const,
- &ctx->Extensions, &st->options, ctx->Mesa_DXTn);
+ &ctx->Extensions, &st->options, GL_TRUE);
if (st_have_perfmon(st)) {
ctx->Extensions.AMD_performance_monitor = GL_TRUE;
}
pFormat = st_choose_format(st, internalFormat, format, type,
- pTarget, 0, bindings, ctx->Mesa_DXTn);
+ pTarget, 0, bindings, GL_TRUE);
if (pFormat == PIPE_FORMAT_NONE && !is_renderbuffer) {
/* try choosing format again, this time without render target bindings */
pFormat = st_choose_format(st, internalFormat, format, type,
pTarget, 0, PIPE_BIND_SAMPLER_VIEW,
- ctx->Mesa_DXTn);
+ GL_TRUE);
}
if (pFormat == PIPE_FORMAT_NONE) {