[PATCH 2/5] wined3d: Capture on a recorded stateblock doesn't record the vertexdeclaration in d3d9.

Henri Verbeet hverbeet at codeweavers.com
Tue Oct 13 03:38:01 CDT 2009


This came up while writing the stateblock tests for device resources. It's a
pretty weird bug, but it's consistent across different implementations and
refrast. Perhaps this is a leftover of the vertex shader and vertex
declaration being tied together in d3d8.
---
 dlls/wined3d/stateblock.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 258fea0..e574d3a 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -765,7 +765,9 @@ static HRESULT  WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
             This->IndexFmt = targetStateBlock->IndexFmt;
         }
 
-        if(This->changed.vertexDecl && This->vertexDecl != targetStateBlock->vertexDecl){
+        if (This->changed.vertexDecl && This->vertexDecl != targetStateBlock->vertexDecl
+                && ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion != 9)
+        {
             TRACE("Updating vertex declaration from %p to %p\n", This->vertexDecl, targetStateBlock->vertexDecl);
 
             if (targetStateBlock->vertexDecl) IWineD3DVertexDeclaration_AddRef(targetStateBlock->vertexDecl);
-- 
1.6.4.4




More information about the wine-patches mailing list