[7/8] WineD3D: Dirtify the stream sources in DrawPrimitiveUP

Stefan Dösinger stefan at codeweavers.com
Wed Jan 3 17:14:20 CST 2007


Fixes a regression in bf1942 which I have seen too late
-------------- next part --------------
From 65ca2ee61257508393647715372aa12bfa1b3f9a Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stefan_D=C3=B6singer?= <stefan at imac.local>
Date: Wed, 3 Jan 2007 20:50:53 +0100
Subject: [PATCH] WineD3D: Mark the stream sources dirty in drawPrimitiveUP

---
 dlls/wined3d/device.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a0c79c4..6ecdb19 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4741,6 +4741,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     This->stateBlock->streamStride[0] = VertexStreamZeroStride;
     This->stateBlock->streamIsUP = TRUE;
 
+    /* TODO: Only mark dirty if drawing from a different UP address */
+    IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC);
+
     drawPrimitive(iface, PrimitiveType, PrimitiveCount, -This->stateBlock->baseVertexIndex /* start vertex */, 0  /* NumVertices */,
                   0 /* indxStart*/, 0 /* indxSize*/, NULL /* indxData */, 0 /* indxMin */);
 
@@ -4748,7 +4751,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl
     This->stateBlock->streamStride[0] = 0;
     This->stateBlock->streamSource[0] = NULL;
 
-    /*stream zero settings set to null at end, as per the msdn */
+    /* stream zero settings set to null at end, as per the msdn. No need to mark dirty here, the app has to set
+     * the new stream sources or use UP drawing again 
+     */
     return WINED3D_OK;
 }
 
-- 
1.4.2.4



More information about the wine-patches mailing list