wined3d: Do not keep internal references on vertex shaders.
This commit is contained in:
parent
15f91b4ad3
commit
7123d617a4
|
@ -3270,13 +3270,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface,
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != pShader) {
|
|
||||||
IWineD3DVertexShader_AddRef(pShader);
|
|
||||||
}
|
|
||||||
if (NULL != oldShader) {
|
|
||||||
IWineD3DVertexShader_Release(oldShader);
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("(%p) : setting pShader(%p)\n", This, pShader);
|
TRACE("(%p) : setting pShader(%p)\n", This, pShader);
|
||||||
|
|
||||||
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VSHADER);
|
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VSHADER);
|
||||||
|
|
|
@ -250,10 +250,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
|
||||||
IWineD3DPixelShader_Release(This->pixelShader);
|
IWineD3DPixelShader_Release(This->pixelShader);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != This->vertexShader) {
|
|
||||||
IWineD3DVertexShader_Release(This->vertexShader);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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]) {
|
||||||
|
@ -337,13 +333,6 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
|
||||||
if (This->vertexShader != targetStateBlock->vertexShader) {
|
if (This->vertexShader != targetStateBlock->vertexShader) {
|
||||||
TRACE("Updating vertex shader from %p to %p\n", This->vertexShader, targetStateBlock->vertexShader);
|
TRACE("Updating vertex shader from %p to %p\n", This->vertexShader, targetStateBlock->vertexShader);
|
||||||
|
|
||||||
if (targetStateBlock->vertexShader) {
|
|
||||||
IWineD3DVertexShader_AddRef(targetStateBlock->vertexShader);
|
|
||||||
}
|
|
||||||
if (This->vertexShader) {
|
|
||||||
IWineD3DVertexShader_Release(This->vertexShader);
|
|
||||||
}
|
|
||||||
|
|
||||||
This->vertexShader = targetStateBlock->vertexShader;
|
This->vertexShader = targetStateBlock->vertexShader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue