Voodoo Rush fixes
authorDaniel Borca <dborca@users.sourceforge.net>
Mon, 8 Mar 2004 07:52:18 +0000 (07:52 +0000)
committerDaniel Borca <dborca@users.sourceforge.net>
Mon, 8 Mar 2004 07:52:18 +0000 (07:52 +0000)
src/mesa/drivers/glide/fxapi.c
src/mesa/drivers/glide/fxdd.c
src/mesa/drivers/glide/fxglidew.c

index 930534fcd89363f9c0dc62bc7696015aebc192eb..20cf7240de541d4e403b1c64ea9258d000cbdde6 100644 (file)
@@ -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;
index d2fb55d57029ad1afcedb0dfe39127d9510da2c3..55e2e87d0d0ee793fb87fc78f6a1f62f07366e22 100644 (file)
@@ -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);
index e386b0d8250ca5f58b00fdf831d9faddaf8fc7f2..6af9895f1ba6aa1dd7135337a8f3efb834ff9adf 100644 (file)
@@ -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;
       }