From 0c19008f099861923d936cad00b51b520f38737d Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Mon, 8 Mar 2004 07:52:18 +0000 Subject: Voodoo Rush fixes --- src/mesa/drivers/glide/fxapi.c | 1 + src/mesa/drivers/glide/fxdd.c | 14 ++++++++++++-- src/mesa/drivers/glide/fxglidew.c | 7 ++++--- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src/mesa/drivers/glide') diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c index 930534fcd8..20cf7240de 100644 --- a/src/mesa/drivers/glide/fxapi.c +++ b/src/mesa/drivers/glide/fxapi.c @@ -397,6 +397,7 @@ fxMesaCreateContext(GLuint win, sliaa = 0; switch (voodoo->type) { case GR_SSTTYPE_VOODOO: + case GR_SSTTYPE_SST96: case GR_SSTTYPE_Banshee: fxMesa->bgrOrder = GL_TRUE; fxMesa->snapVertices = GL_TRUE; diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index d2fb55d570..55e2e87d0d 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1331,8 +1331,18 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa) return 0; } - if (fxMesa->haveZBuffer) - grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); + /* [dBorca] Hack alert: + * Unlike the rest of the Voodoo family, the Rush + * doesn't support ZBUFFER with WBUFFER-like depth functions! + * I guess we could use WBUFFER, which is better, but we can't + * because the depth span functions would need to translate + * depth values to 4.12 floating point... + */ + if (fxMesa->haveZBuffer) { + grDepthBufferMode((fxMesa->type == GR_SSTTYPE_SST96) + ? GR_DEPTHBUFFER_WBUFFER + : GR_DEPTHBUFFER_ZBUFFER); + } if (!fxMesa->bgrOrder) { grLfbWriteColorFormat(GR_COLORFORMAT_ABGR); diff --git a/src/mesa/drivers/glide/fxglidew.c b/src/mesa/drivers/glide/fxglidew.c index e386b0d825..6af9895f1b 100644 --- a/src/mesa/drivers/glide/fxglidew.c +++ b/src/mesa/drivers/glide/fxglidew.c @@ -194,7 +194,9 @@ FX_grSstQueryHardware(GrHwConfiguration * config) grSstSelect(i); extension = grGetString(GR_HARDWARE); - if (strstr(extension, "Voodoo2")) { + if (strstr(extension, "Rush")) { + config->SSTs[i].type = GR_SSTTYPE_SST96; + } else if (strstr(extension, "Voodoo2")) { config->SSTs[i].type = GR_SSTTYPE_Voodoo2; } else if (strstr(extension, "Voodoo Banshee")) { config->SSTs[i].type = GR_SSTTYPE_Banshee; @@ -204,8 +206,7 @@ FX_grSstQueryHardware(GrHwConfiguration * config) config->SSTs[i].type = GR_SSTTYPE_Voodoo4; } else if (strstr(extension, "Voodoo5")) { config->SSTs[i].type = GR_SSTTYPE_Voodoo5; - } else { /* Voodoo1,rush */ - /* ZZZ TO DO: Need to distinguish whether we have V1 or Rush. */ + } else { config->SSTs[i].type = GR_SSTTYPE_VOODOO; } -- cgit v1.2.3