[11/20] WineD3D: Do not keep internal references on pixel shaders
Stefan Dösinger
stefan at codeweavers.com
Sat Jan 6 11:25:47 CST 2007
-------------- next part --------------
From fb69e2b8f766b7e3ec58359f144250c0cc1a46d7 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Sat, 6 Jan 2007 16:48:02 +0100
Subject: [PATCH] WineD3D: Do not keep internal references on pixel shaders
---
dlls/wined3d/device.c | 7 -------
dlls/wined3d/stateblock.c | 11 -----------
2 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index acc3bbb..1a71afa 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3531,13 +3531,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl
TRACE("Recording... not performing anything\n");
}
- if (NULL != pShader) {
- IWineD3DPixelShader_AddRef(pShader);
- }
- if (NULL != oldShader) {
- IWineD3DPixelShader_Release(oldShader);
- }
-
if (This->isRecordingState) {
TRACE("Recording... not performing anything\n");
return WINED3D_OK;
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 5e36c5d..439f0d2 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -246,10 +246,6 @@ static ULONG WINAPI IWineD3DStateBlockI
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 */
for (counter = 0; counter < GL_LIMITS(sampler_stages); counter++) {
if (This->textures[counter]) {
@@ -414,13 +410,6 @@ static HRESULT WINAPI IWineD3DStateBloc
if (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;
}
--
1.4.2.4
More information about the wine-patches
mailing list