Stefan Dösinger : wined3d: Do not keep internal references on index buffers.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 8 14:44:17 CST 2007


Module: wine
Branch: master
Commit: 478d22f74221c13d17e359760c146aae829ad00f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=478d22f74221c13d17e359760c146aae829ad00f

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Sat Jan  6 18:26:49 2007 +0100

wined3d: Do not keep internal references on index buffers.

---

 dlls/wined3d/device.c     |   11 -----------
 dlls/wined3d/stateblock.c |    6 ------
 2 files changed, 0 insertions(+), 17 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e43a2e6..5957c52 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2999,13 +2999,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         return WINED3D_OK;
     }
 
-    if (NULL != pIndexData) {
-        IWineD3DIndexBuffer_AddRef(pIndexData);
-    }
-    if (NULL != oldIdxs) {
-        IWineD3DIndexBuffer_Release(oldIdxs);
-    }
-
     /* So far only the base vertex index is tracked */
     if(BaseVertexIndex != oldBaseIndex) {
         IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC);
@@ -4770,10 +4763,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         idxStride = 4;
     }
 
-    if (This->stateBlock->pIndexData) {
-        IWineD3DIndexBuffer_Release(This->stateBlock->pIndexData);
-    }
-
     /* Note in the following, it's not this type, but that's the purpose of streamIsUP */
     This->stateBlock->streamSource[0] = (IWineD3DVertexBuffer *)pVertexStreamZeroData;
     This->stateBlock->streamIsUP = TRUE;
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 0b3f6e8..dba9e8a 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -233,12 +233,6 @@ static ULONG  WINAPI IWineD3DStateBlockI
             int counter;
             FIXME("Releasing primary stateblock\n");
 
-            /* free any index data */
-            if (This->pIndexData) {
-                IWineD3DIndexBuffer_Release(This->pIndexData);
-                This->pIndexData = NULL;
-            }
-
             /* 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]) {




More information about the wine-cvs mailing list