diff options
author | Felix Kuehling <fxkuehl@gmx.de> | 2005-04-30 02:03:18 +0000 |
---|---|---|
committer | Felix Kuehling <fxkuehl@gmx.de> | 2005-04-30 02:03:18 +0000 |
commit | f1d053b19ad3839fb9d1d39350336f4420da255f (patch) | |
tree | 7cdd31c31ce4273352106a267d60213e53589e86 /src/mesa/drivers/dri/savage/savage_xmesa.c | |
parent | 28d0a9c9dd68320482f506e9a36848f70d3807a0 (diff) |
Added S3TC support to the Savage driver with some help from Mark Cass's
S3TC support for an older driver version. On Savage3D/IX/MX
GL_EXT_texture_compression_s3tc can't be enabled because DXT3 and DXT5
are not supported. However GL_S3_s3tc is enabled on all Savage chips.
Tested on a Savage IX and a ProSavageDDR
Diffstat (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c')
-rw-r--r-- | src/mesa/drivers/dri/savage/savage_xmesa.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 0b3dbbd03c..485bc77458 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -34,6 +34,8 @@ #include "utils.h" +#include "extensions.h" + #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" #include "tnl/tnl.h" @@ -90,12 +92,13 @@ DRI_CONF_BEGIN SAVAGE_SYNC_FRAMES(false) DRI_CONF_MAX_TEXTURE_UNITS(2,1,2) DRI_CONF_TEXTURE_HEAPS(DRI_CONF_TEXTURE_HEAPS_ALL) + DRI_CONF_FORCE_S3TC_ENABLE(false) DRI_CONF_SECTION_END DRI_CONF_SECTION_DEBUG DRI_CONF_NO_RAST(false) DRI_CONF_SECTION_END DRI_CONF_END; -static const GLuint __driNConfigOptions = 9; +static const GLuint __driNConfigOptions = 10; #ifdef USE_NEW_INTERFACE static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; @@ -127,6 +130,7 @@ static const char *const common_extensions[] = { "GL_ARB_multitexture", "GL_EXT_texture_lod_bias", + "GL_ARB_texture_compression", NULL }; static const char *const s4_extensions[] = @@ -529,6 +533,14 @@ savageCreateContext( const __GLcontextModes *mesaVis, driInitExtensions( ctx, common_extensions, GL_TRUE ); if (savageScreen->chipset >= S3_SAVAGE4) driInitExtensions( ctx, s4_extensions, GL_FALSE ); + if (ctx->Mesa_DXTn || + driQueryOptionb (&imesa->optionCache, "force_s3tc_enable")) { + _mesa_enable_extension( ctx, "GL_S3_s3tc" ); + if (savageScreen->chipset >= S3_SAVAGE4) + /* This extension needs DXT3 and DTX5 support in hardware. + * Not available on Savage3D/MX/IX. */ + _mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" ); + } savageDDInitStateFuncs( ctx ); savageDDInitSpanFuncs( ctx ); |