mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
wined3d: Vertex declaration recording state.
Stop SetVertexDeclaration from reference counting if a stateblock is being recorded.
This commit is contained in:
parent
13b9923165
commit
74e28a354f
@ -3727,16 +3727,21 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* iface, IW
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user