From d471473b5842154c0b44b7bec149401f6dab43cc Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 19 Oct 1999 18:37:02 +0000 Subject: Changes to reduce the memory footprint of display lists --- src/mesa/drivers/glide/fxdd.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/glide/fxdd.c') diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 6eed8ce290..3580971ae8 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -347,6 +347,8 @@ void fxDDSetNearFar(GLcontext *ctx, GLfloat n, GLfloat f) { FX_CONTEXT(ctx)->new_state |= FX_NEW_FOG; ctx->Driver.RenderStart = fxSetupFXUnits; + + FX_CONTEXT(ctx)->wscale = fabs(f)/65535.0f; } /* KW: Put the word Mesa in the render string because quakeworld @@ -360,7 +362,44 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name) #if defined(GLX_DIRECT_RENDERING) return "Mesa Glide - DRI VB/V3"; #else - return (GLubyte*)"Mesa Glide"; + { + static char buf[80]; + + if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_VOODOO) + { + GrVoodooConfig_t *vc = + &glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig; + + sprintf(buf, + "Mesa Glide v0.30 Voodoo_Graphics %d " + "CARD/%d FB/%d TM/%d TMU/%s", + glbCurrentBoard, + (vc->sliDetect ? (vc->fbRam*2) : vc->fbRam), + (vc->tmuConfig[GR_TMU0].tmuRam + + ((vc->nTexelfx>1) ? vc->tmuConfig[GR_TMU1].tmuRam : 0)), + vc->nTexelfx, + (vc->sliDetect ? "SLI" : "NOSLI")); + } + else if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96) + { + GrSst96Config_t *sc = + &glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config; + + sprintf(buf, + "Glide v0.30 Voodoo_Rush %d " + "CARD/%d FB/%d TM/%d TMU/NOSLI", + glbCurrentBoard, + sc->fbRam, + sc->tmuConfig.tmuRam, + sc->nTexelfx); + } + else + { + strcpy(buf, "Glide v0.30 UNKNOWN"); + } + + return (GLubyte *) buf; + } #endif default: return NULL; -- cgit v1.2.3