[2/20] WineD3D: Readd the fixed function stream source trace

Stefan Dösinger stefan at codeweavers.com
Sat Jan 6 11:12:21 CST 2007


This time only for fixed function fvfs and strided data from ddraw, as Ivan 
pointed out.
-------------- next part --------------
From a748eebdd26aab96246c54886054ebb6d607ce6b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stefan_D=C3=B6singer?= <stefan at imac.local>
Date: Thu, 4 Jan 2007 14:07:32 +0100
Subject: [PATCH] WineD3D: Readd fixed function stream source traces

---
 dlls/wined3d/drawprim.c |   33 ---------------------------------
 dlls/wined3d/state.c    |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 33 deletions(-)

diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 85ce26e..e8fdb12 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -1141,39 +1141,6 @@ #undef BUFFER_OR_DATA
     This->shader_backend->shader_cleanup(usePixelShaderFunction, useVertexShaderFunction);
 }
 
-inline void drawPrimitiveTraceDataLocations(
-    WineDirect3DVertexStridedData *dataLocations) {
-
-    /* Dump out what parts we have supplied */
-    TRACE("Strided Data:\n");
-    TRACE_STRIDED((dataLocations), position);
-    TRACE_STRIDED((dataLocations), blendWeights);
-    TRACE_STRIDED((dataLocations), blendMatrixIndices);
-    TRACE_STRIDED((dataLocations), normal);
-    TRACE_STRIDED((dataLocations), pSize);
-    TRACE_STRIDED((dataLocations), diffuse);
-    TRACE_STRIDED((dataLocations), specular);
-    TRACE_STRIDED((dataLocations), texCoords[0]);
-    TRACE_STRIDED((dataLocations), texCoords[1]);
-    TRACE_STRIDED((dataLocations), texCoords[2]);
-    TRACE_STRIDED((dataLocations), texCoords[3]);
-    TRACE_STRIDED((dataLocations), texCoords[4]);
-    TRACE_STRIDED((dataLocations), texCoords[5]);
-    TRACE_STRIDED((dataLocations), texCoords[6]);
-    TRACE_STRIDED((dataLocations), texCoords[7]);
-    TRACE_STRIDED((dataLocations), position2);
-    TRACE_STRIDED((dataLocations), normal2);
-    TRACE_STRIDED((dataLocations), tangent);
-    TRACE_STRIDED((dataLocations), binormal);
-    TRACE_STRIDED((dataLocations), tessFactor);
-    TRACE_STRIDED((dataLocations), fog);
-    TRACE_STRIDED((dataLocations), depth);
-    TRACE_STRIDED((dataLocations), sample);
-
-    return;
-
-}
-
 static void check_fbo_status(IWineD3DDevice *iface) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
 
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index a1c8652..a8bdce3 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -2440,6 +2440,38 @@ #endif
     }
 }
 
+inline void drawPrimitiveTraceDataLocations(
+    WineDirect3DVertexStridedData *dataLocations) {
+
+    /* Dump out what parts we have supplied */
+    TRACE("Strided Data:\n");
+    TRACE_STRIDED((dataLocations), position);
+    TRACE_STRIDED((dataLocations), blendWeights);
+    TRACE_STRIDED((dataLocations), blendMatrixIndices);
+    TRACE_STRIDED((dataLocations), normal);
+    TRACE_STRIDED((dataLocations), pSize);
+    TRACE_STRIDED((dataLocations), diffuse);
+    TRACE_STRIDED((dataLocations), specular);
+    TRACE_STRIDED((dataLocations), texCoords[0]);
+    TRACE_STRIDED((dataLocations), texCoords[1]);
+    TRACE_STRIDED((dataLocations), texCoords[2]);
+    TRACE_STRIDED((dataLocations), texCoords[3]);
+    TRACE_STRIDED((dataLocations), texCoords[4]);
+    TRACE_STRIDED((dataLocations), texCoords[5]);
+    TRACE_STRIDED((dataLocations), texCoords[6]);
+    TRACE_STRIDED((dataLocations), texCoords[7]);
+    TRACE_STRIDED((dataLocations), position2);
+    TRACE_STRIDED((dataLocations), normal2);
+    TRACE_STRIDED((dataLocations), tangent);
+    TRACE_STRIDED((dataLocations), binormal);
+    TRACE_STRIDED((dataLocations), tessFactor);
+    TRACE_STRIDED((dataLocations), fog);
+    TRACE_STRIDED((dataLocations), depth);
+    TRACE_STRIDED((dataLocations), sample);
+
+    return;
+}
+
 /* Helper for vertexdeclaration() */
 static inline void handleStreams(IWineD3DStateBlockImpl *stateblock, BOOL useVertexShaderFunction) {
     IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
@@ -2450,6 +2482,10 @@ static inline void handleStreams(IWineD3
         /* Note: this is a ddraw fixed-function code path */
         TRACE("================ Strided Input ===================\n");
         memcpy(dataLocations, device->up_strided, sizeof(*dataLocations));
+
+        if(TRACE_ON(d3d)) {
+            drawPrimitiveTraceDataLocations(dataLocations);
+        }
     } else if (stateblock->vertexDecl || stateblock->vertexShader) {
         /* Note: This is a fixed function or shader codepath.
          * This means it must handle both types of strided data.
@@ -2474,6 +2510,9 @@ static inline void handleStreams(IWineD3
         memset(dataLocations, 0, sizeof(*dataLocations));
         primitiveConvertToStridedData((IWineD3DDevice *) device, dataLocations,
 									   &fixup);
+        if(TRACE_ON(d3d)) {
+            drawPrimitiveTraceDataLocations(dataLocations);
+        }
      }
 
     /* Unload the old arrays before loading the new ones to get old junk out */
-- 
1.4.2.4



More information about the wine-patches mailing list