Stefan Dösinger : wined3d: Unset the StreamIsUP flag in ProcessVertices.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 8 13:17:02 CDT 2007


Module: wine
Branch: master
Commit: f2e30a0a1c8cb65e1a93437200de3b191e81d526
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f2e30a0a1c8cb65e1a93437200de3b191e81d526

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Sun Apr 29 17:36:35 2007 +0200

wined3d: Unset the StreamIsUP flag in ProcessVertices.

---

 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 b581afb..1bf959f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3836,7 +3836,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
 static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IWineD3DVertexBuffer* pDestBuffer, IWineD3DVertexDeclaration* pVertexDecl, DWORD Flags) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
     WineDirect3DVertexStridedData strided;
-    BOOL vbo = FALSE;
+    BOOL vbo = FALSE, streamWasUP = This->stateBlock->streamIsUP;
     TRACE("(%p)->(%d,%d,%d,%p,%p,%d\n", This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags);
 
     if(pVertexDecl) {
@@ -3852,12 +3852,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
         LEAVE_GL();
     }
 
+    /* ProcessVertices reads from vertex buffers, which have to be assigned. DrawPrimitive and DrawPrimitiveUP
+     * control the streamIsUP flag, thus restore it afterwards.
+     */
+    This->stateBlock->streamIsUP = FALSE;
     memset(&strided, 0, sizeof(strided));
     if(This->stateBlock->vertexDecl) {
         primitiveDeclarationConvertToStridedData(iface, FALSE, &strided, &vbo);
     } else {
         primitiveConvertToStridedData(iface, &strided, &vbo);
     }
+    This->stateBlock->streamIsUP = streamWasUP;
 
     if(vbo || SrcStartIndex) {
         unsigned int i;




More information about the wine-cvs mailing list