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

oldstable
Henri Verbeet 2009-10-06 09:05:54 +02:00 committed by Alexandre Julliard
parent 7d0d8c0245
commit b5de2fcb1c
1 changed files with 5 additions and 0 deletions

View File

@ -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);