Henri Verbeet : wined3d: Keep references to the textures initially captured by CreateStateBlock() as well.

Alexandre Julliard julliard at winehq.org
Tue Oct 6 10:35:50 CDT 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Oct  6 09:05:54 2009 +0200

wined3d: Keep references to the textures initially captured by CreateStateBlock() as well.

---

 dlls/wined3d/stateblock.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index ef33a2a..01783c5 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1648,6 +1648,11 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
             if (stateblock->streamSource[i]) IWineD3DBuffer_AddRef(stateblock->streamSource[i]);
         }
 
+        for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i)
+        {
+            if (stateblock->textures[i]) IWineD3DBaseTexture_AddRef(stateblock->textures[i]);
+        }
+
         if (stateblock->pIndexData) IWineD3DBuffer_AddRef(stateblock->pIndexData);
         if (stateblock->vertexShader) IWineD3DVertexShader_AddRef(stateblock->vertexShader);
         if (stateblock->pixelShader) IWineD3DPixelShader_AddRef(stateblock->pixelShader);




More information about the wine-cvs mailing list