wined3d: Do not keep internal references on pixel shaders.
This commit is contained in:
parent
7123d617a4
commit
467fa4e702
|
@ -3531,13 +3531,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, I
|
||||||
TRACE("Recording... not performing anything\n");
|
TRACE("Recording... not performing anything\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != pShader) {
|
|
||||||
IWineD3DPixelShader_AddRef(pShader);
|
|
||||||
}
|
|
||||||
if (NULL != oldShader) {
|
|
||||||
IWineD3DPixelShader_Release(oldShader);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (This->isRecordingState) {
|
if (This->isRecordingState) {
|
||||||
TRACE("Recording... not performing anything\n");
|
TRACE("Recording... not performing anything\n");
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
|
|
|
@ -246,10 +246,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
|
||||||
This->pIndexData = NULL;
|
This->pIndexData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != This->pixelShader) {
|
|
||||||
IWineD3DPixelShader_Release(This->pixelShader);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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]) {
|
||||||
|
@ -414,13 +410,6 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
|
||||||
if (This->pixelShader != targetStateBlock->pixelShader) {
|
if (This->pixelShader != targetStateBlock->pixelShader) {
|
||||||
TRACE("Updating pixel shader from %p to %p\n", This->pixelShader, targetStateBlock->pixelShader);
|
TRACE("Updating pixel shader from %p to %p\n", This->pixelShader, targetStateBlock->pixelShader);
|
||||||
|
|
||||||
if (targetStateBlock->pixelShader) {
|
|
||||||
IWineD3DPixelShader_AddRef(targetStateBlock->pixelShader);
|
|
||||||
}
|
|
||||||
if (This->pixelShader) {
|
|
||||||
IWineD3DPixelShader_Release(This->pixelShader);
|
|
||||||
}
|
|
||||||
|
|
||||||
This->pixelShader = targetStateBlock->pixelShader;
|
This->pixelShader = targetStateBlock->pixelShader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue