Oliver Stieber : wined3d: Vertex declaration recording state.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Dec 16 07:31:18 CST 2005
Module: wine
Branch: refs/heads/master
Commit: 74e28a354f40bc1b03003056554883fb0c29b1de
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=74e28a354f40bc1b03003056554883fb0c29b1de
Author: Oliver Stieber <oliver_stieber at yahoo.co.uk>
Date: Fri Dec 16 12:38:24 2005 +0100
wined3d: Vertex declaration recording state.
Stop SetVertexDeclaration from reference counting if a stateblock is
being recorded.
---
dlls/wined3d/device.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0ca6031..ba2bb8d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3727,16 +3727,21 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVer
TRACE("(%p) : pDecl=%p\n", This, pDecl);
- /* TODO: what about recording stateblocks? */
+ This->updateStateBlock->vertexDecl = pDecl;
+ This->updateStateBlock->changed.vertexDecl = TRUE;
+ This->updateStateBlock->set.vertexDecl = TRUE;
+
+ if (This->isRecordingState) {
+ TRACE("Recording... not performing anything\n");
+ return D3D_OK;
+ }
+
if (NULL != pDecl) {
IWineD3DVertexDeclaration_AddRef(pDecl);
}
if (NULL != This->updateStateBlock->vertexDecl) {
IWineD3DVertexDeclaration_Release(This->updateStateBlock->vertexDecl);
}
- This->updateStateBlock->vertexDecl = pDecl;
- This->updateStateBlock->changed.vertexDecl = TRUE;
- This->updateStateBlock->set.vertexDecl = TRUE;
return D3D_OK;
}
More information about the wine-cvs
mailing list