wined3d: Do not keep internal references to the vertex declaration.
This commit is contained in:
parent
fdb62cbaeb
commit
15f91b4ad3
|
@ -3239,12 +3239,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* if
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != pDecl) {
|
|
||||||
IWineD3DVertexDeclaration_AddRef(pDecl);
|
|
||||||
}
|
|
||||||
if (NULL != oldDecl) {
|
|
||||||
IWineD3DVertexDeclaration_Release(oldDecl);
|
|
||||||
}
|
|
||||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL);
|
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL);
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,10 +254,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
|
||||||
IWineD3DVertexShader_Release(This->vertexShader);
|
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 */
|
/* 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++) {
|
for (counter = 0; counter < GL_LIMITS(sampler_stages); counter++) {
|
||||||
if (This->textures[counter]) {
|
if (This->textures[counter]) {
|
||||||
|
@ -502,13 +498,6 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
|
||||||
if(This->set.vertexDecl && This->vertexDecl != targetStateBlock->vertexDecl){
|
if(This->set.vertexDecl && This->vertexDecl != targetStateBlock->vertexDecl){
|
||||||
TRACE("Updating vertex declaration from %p to %p\n", 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;
|
This->vertexDecl = targetStateBlock->vertexDecl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue