Module: wine Branch: master Commit: 442beb1dcfc766077d9cadbaa940aa7db4449737 URL: http://source.winehq.org/git/wine.git/?a=commit;h=442beb1dcfc766077d9cadbaa9...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Oct 9 09:58:46 2009 +0200
wined3d: Clear resources that we aren't recording in stateblock_init().
---
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; }