ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
#endif
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
-#if FEATURE_texture_s3tc
if (ctx->Mesa_DXTn) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
_mesa_enable_extension(ctx, "GL_S3_s3tc");
}
-#endif
}
case MESA_FORMAT_RGB_FXT1:
case MESA_FORMAT_RGBA_FXT1:
-#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
case MESA_FORMAT_RGBA_DXT1:
case MESA_FORMAT_RGBA_DXT3:
case MESA_FORMAT_SRGBA_DXT1:
case MESA_FORMAT_SRGBA_DXT3:
case MESA_FORMAT_SRGBA_DXT5:
-#endif
#endif
case MESA_FORMAT_RED_RGTC1:
case MESA_FORMAT_SIGNED_RED_RGTC1:
#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
return GL_COMPRESSED_RGB_FXT1_3DFX;
case MESA_FORMAT_RGBA_FXT1:
return GL_COMPRESSED_RGBA_FXT1_3DFX;
-#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
return GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
case MESA_FORMAT_RGBA_DXT1:
case MESA_FORMAT_SRGBA_DXT5:
return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
#endif
-#endif
-
case MESA_FORMAT_RED_RGTC1:
return GL_COMPRESSED_RED_RGTC1;
case MESA_FORMAT_SIGNED_RED_RGTC1:
#include "swrast/s_context.h"
-#if FEATURE_texture_s3tc
-
-
#if defined(_WIN32) || defined(WIN32)
#define DXTN_LIBNAME "dxtn.dll"
#define RTLD_LAZY 0
texel[ACOMP] = UBYTE_TO_FLOAT(rgba[ACOMP]);
}
#endif /* FEATURE_EXT_texture_sRGB */
-
-
-#endif /* FEATURE_texture_s3tc */
struct gl_context;
struct swrast_texture_image;
-#if FEATURE_texture_s3tc
-
extern GLboolean
_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS);
extern void
_mesa_init_texture_s3tc(struct gl_context *ctx);
-#else /* FEATURE_texture_s3tc */
-
-/* these are used only in texstore_funcs[] */
-#define _mesa_texstore_rgb_dxt1 NULL
-#define _mesa_texstore_rgba_dxt1 NULL
-#define _mesa_texstore_rgba_dxt3 NULL
-#define _mesa_texstore_rgba_dxt5 NULL
-
-/* these are used only in texfetch_funcs[] */
-#define _mesa_fetch_texel_2d_f_rgb_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_rgba_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_rgba_dxt3 NULL
-#define _mesa_fetch_texel_2d_f_rgba_dxt5 NULL
-#define _mesa_fetch_texel_2d_f_srgb_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_srgba_dxt1 NULL
-#define _mesa_fetch_texel_2d_f_srgba_dxt3 NULL
-#define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL
-
-static inline void
-_mesa_init_texture_s3tc(struct gl_context *ctx)
-{
-}
-
-#endif /* FEATURE_texture_s3tc */
-
#endif /* TEXCOMPRESS_S3TC_H */
}
}
-#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
; /* fallthrough */
}
}
-#endif
if (ctx->Extensions.ARB_texture_float) {
switch (internalFormat) {
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_EXT:
-#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
-#endif
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB8);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_EXT:
-#if FEATURE_texture_s3tc
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
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
if (ctx->Extensions.EXT_texture_compression_s3tc)
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGB_DXT1);
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT5);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
-#endif
default:
; /* fallthrough */
}
return PIPE_FORMAT_Z32_FLOAT_S8X24_UINT;
case MESA_FORMAT_YCBCR:
return PIPE_FORMAT_UYVY;
-#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
return PIPE_FORMAT_DXT1_RGB;
case MESA_FORMAT_RGBA_DXT1:
return PIPE_FORMAT_DXT3_SRGBA;
case MESA_FORMAT_SRGBA_DXT5:
return PIPE_FORMAT_DXT5_SRGBA;
-#endif
-#endif
-#if FEATURE_EXT_texture_sRGB
case MESA_FORMAT_SLA8:
return PIPE_FORMAT_L8A8_SRGB;
case MESA_FORMAT_SL8:
case PIPE_FORMAT_YUYV:
return MESA_FORMAT_YCBCR_REV;
-#if FEATURE_texture_s3tc
case PIPE_FORMAT_DXT1_RGB:
return MESA_FORMAT_RGB_DXT1;
case PIPE_FORMAT_DXT1_RGBA:
return MESA_FORMAT_SRGBA_DXT3;
case PIPE_FORMAT_DXT5_SRGBA:
return MESA_FORMAT_SRGBA_DXT5;
-#endif
-#endif
-
-#if FEATURE_EXT_texture_sRGB
case PIPE_FORMAT_L8A8_SRGB:
return MESA_FORMAT_SLA8;
case PIPE_FORMAT_L8_SRGB: