[D3D] Some tracing changes...

Lionel Ulmer lionel.ulmer at free.fr
Fri May 16 04:04:08 CDT 2003


Changelog:
 - silence some TRACEs to better spot real errors

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
--- dlls/ddraw_CVS/d3ddevice/mesa.c	Fri May 16 09:54:05 2003
+++ dlls/ddraw/d3ddevice/mesa.c	Fri May 16 10:29:20 2003
@@ -723,7 +723,7 @@
 	    break;
 
 	default:
-	    TRACE("Unhandled primitive\n");
+	    FIXME("Unhandled primitive %08x\n", d3dpt);
 	    break;
     }
 }
@@ -1833,6 +1833,12 @@
 	    color[3] = ((dwState >> 24) & 0xFF) / 255.0;
 
 	    glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, color);
+
+	    TRACE(" Stage type : D3DTSS_BORDERCOLOR => %02lx %02lx %02lx %02lx (RGBA)\n",
+		  ((dwState >> 16) & 0xFF),
+		  ((dwState >>  8) & 0xFF),
+		  ((dwState >>  0) & 0xFF),
+		  ((dwState >> 24) & 0xFF));
 	} break;
 	    
 	case D3DTSS_TEXCOORDINDEX: {
--- dlls/ddraw_CVS/mesa.c	Fri May 16 09:53:44 2003
+++ dlls/ddraw/mesa.c	Fri May 16 10:28:29 2003
@@ -131,13 +131,17 @@
 	        break;
 
 	    case D3DRENDERSTATE_WRAPU: /* 5 */
-	        if (dwRenderState)
-		    ERR("WRAPU mode unsupported by OpenGL.. Expect graphical glitches !\n");
-	        break;
-	      
 	    case D3DRENDERSTATE_WRAPV: /* 6 */
+	    case D3DRENDERSTATE_WRAP0: /* 128 */
+	    case D3DRENDERSTATE_WRAP1: /* 129 */
+	    case D3DRENDERSTATE_WRAP2: /* 130 */
+	    case D3DRENDERSTATE_WRAP3: /* 131 */
+	    case D3DRENDERSTATE_WRAP4: /* 132 */
+	    case D3DRENDERSTATE_WRAP5: /* 133 */
+	    case D3DRENDERSTATE_WRAP6: /* 134 */
+	    case D3DRENDERSTATE_WRAP7: /* 135 */
 	        if (dwRenderState)
-		    ERR("WRAPV mode unsupported by OpenGL.. Expect graphical glitches !\n");
+		    ERR("Texture WRAP modes unsupported by OpenGL.. Expect graphical glitches !\n");
 	        break;
 
 	    case D3DRENDERSTATE_ZENABLE:          /*  7 */
@@ -499,6 +503,16 @@
     } else if (dwRenderStateType == D3DRENDERSTATE_TEXTUREADDRESS) {
         lpStateBlock->render_state[D3DRENDERSTATE_TEXTUREADDRESSU - 1] = dwRenderState;
         lpStateBlock->render_state[D3DRENDERSTATE_TEXTUREADDRESSV - 1] = dwRenderState;
+    } else if (dwRenderStateType == D3DRENDERSTATE_WRAPU) {
+        if (dwRenderState) 
+	    lpStateBlock->render_state[D3DRENDERSTATE_WRAP0] |= D3DWRAP_U;
+	else
+	    lpStateBlock->render_state[D3DRENDERSTATE_WRAP0] &= ~D3DWRAP_U;
+    } else if (dwRenderStateType == D3DRENDERSTATE_WRAPV) {
+        if (dwRenderState) 
+	    lpStateBlock->render_state[D3DRENDERSTATE_WRAP0] |= D3DWRAP_V;
+	else
+	    lpStateBlock->render_state[D3DRENDERSTATE_WRAP0] &= ~D3DWRAP_V;
     }
     
     /* Default case */


More information about the wine-patches mailing list