diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b13854b083d..83541146c9b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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; } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 33d42ad0784..ca280278cf6 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -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; }