summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/savage/savage_xmesa.c
diff options
context:
space:
mode:
authorFelix Kuehling <fxkuehl@gmx.de>2005-04-23 17:18:57 +0000
committerFelix Kuehling <fxkuehl@gmx.de>2005-04-23 17:18:57 +0000
commit9b4536a654774e3df330e9f238475aa20e30f7a3 (patch)
tree0914b87511904e1553c9737fbda0c03f8e56f2b2 /src/mesa/drivers/dri/savage/savage_xmesa.c
parentdf943a40411d2b71381e5053d7c59e8cd2400fff (diff)
Texturing fixes for Savage3D/MX/IX:
- force emitting texAddr when the texture image changed (flush caches) - set transparent texture color key to something improbable (couldn't find a way to disable it completely) - fixed texture environment modes GL_DECAL and GL_REPLACE - made texture environment mode GL_BLEND a software fallback - added two custom texture formats for promoting from GL_ALPHA to ARGB8888 and 4444. Since the hardware can't be made to ignore the RGB color components, set them to 1 instead of 0. This gives the correct results - disabled GL_EXT_texture_env_add on Savage3D/MX/IX - map both GL_CLAMP and GL_CLAMP_TO_EDGE to hardware mode "wrap". It doesn't match either mode exactly by the spec, so we should either fall back on both or none. I chose the latter. - fall back to software when s and t wrapping modes differ (hardware has only one bit for both)
Diffstat (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c')
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index c3bf710e25..0b3dbbd03c 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -123,10 +123,14 @@ unsigned long time_sum=0;
struct timeval tv_s1,tv_f1;
#endif
-static const char *const card_extensions[] =
+static const char *const common_extensions[] =
{
"GL_ARB_multitexture",
"GL_EXT_texture_lod_bias",
+ NULL
+};
+static const char *const s4_extensions[] =
+{
"GL_EXT_texture_env_add",
NULL
};
@@ -522,7 +526,9 @@ savageCreateContext( const __GLcontextModes *mesaVis,
debug_control );
#endif
- driInitExtensions( ctx, card_extensions, GL_TRUE );
+ driInitExtensions( ctx, common_extensions, GL_TRUE );
+ if (savageScreen->chipset >= S3_SAVAGE4)
+ driInitExtensions( ctx, s4_extensions, GL_FALSE );
savageDDInitStateFuncs( ctx );
savageDDInitSpanFuncs( ctx );