Commit 74e28a35 authored by Oliver Stieber's avatar Oliver Stieber Committed by Alexandre Julliard

wined3d: Vertex declaration recording state.

Stop SetVertexDeclaration from reference counting if a stateblock is being recorded.
parent 13b99231
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment