[dx81] VS fix for 3dmark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After all the previous software vertex shader fixes, 3dmark still wasnt right. This one resolves it, and with this patch, a 3dmark2001se version installed on windows and copied onto wine (install doesnt work yet) will display most tests about right in low res mode only, once. Note you can compile out the vertex shader support and it still works (probably a better idea if you are after a measurement!), but I am using it as a testbed for the software vertexshader code as well.

FYI To get them to run multiple times I have found a horrendous hole in our light code, and have a patch which works for 3dmark but not much else... As soon as I have it working without any obvious regressions it will probably be my next patch but its large and ugly.

This will then leave the high res modes, which needs render to texture support which is completely broken (I love it when a fixme says expect a crash...). Its on my list , but time is short at the moment.

Changelog

Add real support for VS1.1, ie make the relative addressing mode work

Jason
diff -u3 dlls/d3d8/dx80/shader.c dlls/d3d8/shader.c
--- dlls/d3d8/dx80/shader.c	2003-09-18 20:18:25.000000000 +0100
+++ dlls/d3d8/shader.c	2003-09-23 00:10:59.000000000 +0100
@@ -410,7 +410,7 @@
     TRACE("V[%lu]", reg);
     break;
   case D3DSPR_CONST:
-    TRACE("C[%s%lu]", (reg & D3DVS_ADDRMODE_RELATIVE) ? "a0.x + " : "", reg);
+    TRACE("C[%s%lu]", (param & D3DVS_ADDRMODE_RELATIVE) ? "a0.x + " : "", reg);
     break;
   case D3DSPR_ADDR: /*case D3DSPR_TEXTURE:*/
     TRACE("a[%lu]", reg);
@@ -656,7 +656,7 @@
 	    p[i] = &input->V[reg];
 	    break;
 	  case D3DSPR_CONST:
-	    if (reg & D3DVS_ADDRMODE_RELATIVE) {
+	    if (pToken[i] & D3DVS_ADDRMODE_RELATIVE) {
 	      p[i] = &vshader->data->C[(DWORD) A[0].x + reg];
 	    } else {
 	      p[i] = &vshader->data->C[reg];
@@ -1050,7 +1050,7 @@
     TRACE("V[%lu]", reg);
     break;
   case D3DSPR_CONST:
-    TRACE("C[%s%lu]", (reg & D3DVS_ADDRMODE_RELATIVE) ? "a0.x + " : "", reg);
+    TRACE("C[%s%lu]", (param & D3DVS_ADDRMODE_RELATIVE) ? "a0.x + " : "", reg);
     break;
   case D3DSPR_TEXTURE: /* case D3DSPR_ADDR: */
     TRACE("t[%lu]", reg);

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux