[PATCH 1/6] wined3d: Clear resources that we aren't recording in stateblock_init().
Henri Verbeet
hverbeet at codeweavers.com
Fri Oct 9 02:58:46 CDT 2009
---
dlls/wined3d/stateblock.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 8bbde2f..7d6f831 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1674,6 +1674,13 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
{
stateblock->streamSource[i] = NULL;
}
+
+ for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i)
+ {
+ stateblock->textures[i] = NULL;
+ }
+
+ stateblock->vertexDecl = NULL;
stateblock->pIndexData = NULL;
stateblock->vertexShader = NULL;
}
@@ -1700,8 +1707,14 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
if (stateblock->streamSource[i]) IWineD3DBuffer_AddRef(stateblock->streamSource[i]);
}
+ for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i)
+ {
+ stateblock->textures[i] = NULL;
+ }
+
if (stateblock->vertexShader) IWineD3DVertexShader_AddRef(stateblock->vertexShader);
+ stateblock->vertexDecl = NULL;
stateblock->pIndexData = NULL;
stateblock->pixelShader = NULL;
}
--
1.6.0.6
More information about the wine-patches
mailing list