Commit 15f91b4a authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Do not keep internal references to the vertex declaration.

parent fdb62cba
......@@ -3239,12 +3239,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* if
return WINED3D_OK;
}
if (NULL != pDecl) {
IWineD3DVertexDeclaration_AddRef(pDecl);
}
if (NULL != oldDecl) {
IWineD3DVertexDeclaration_Release(oldDecl);
}
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL);
return WINED3D_OK;
}
......
......@@ -254,10 +254,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
IWineD3DVertexShader_Release(This->vertexShader);
}
if (NULL != This->vertexDecl) {
IWineD3DVertexDeclaration_Release(This->vertexDecl);
}
/* NOTE: according to MSDN: The application is responsible for making sure the texture references are cleared down */
for (counter = 0; counter < GL_LIMITS(sampler_stages); counter++) {
if (This->textures[counter]) {
......@@ -502,13 +498,6 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if(This->set.vertexDecl && This->vertexDecl != targetStateBlock->vertexDecl){
TRACE("Updating vertex declaration from %p to %p\n", This->vertexDecl, targetStateBlock->vertexDecl);
if (targetStateBlock->vertexDecl) {
IWineD3DVertexDeclaration_AddRef(targetStateBlock->vertexDecl);
}
if (This->vertexDecl) {
IWineD3DVertexDeclaration_Release(This->vertexDecl);
}
This->vertexDecl = targetStateBlock->vertexDecl;
}
......
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