Commit 478d22f7 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Do not keep internal references on index buffers.

parent 3581d8e8
...@@ -2999,13 +2999,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWine ...@@ -2999,13 +2999,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWine
return WINED3D_OK; return WINED3D_OK;
} }
if (NULL != pIndexData) {
IWineD3DIndexBuffer_AddRef(pIndexData);
}
if (NULL != oldIdxs) {
IWineD3DIndexBuffer_Release(oldIdxs);
}
/* So far only the base vertex index is tracked */ /* So far only the base vertex index is tracked */
if(BaseVertexIndex != oldBaseIndex) { if(BaseVertexIndex != oldBaseIndex) {
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC);
...@@ -4770,10 +4763,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice * ...@@ -4770,10 +4763,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
idxStride = 4; 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 */ /* Note in the following, it's not this type, but that's the purpose of streamIsUP */
This->stateBlock->streamSource[0] = (IWineD3DVertexBuffer *)pVertexStreamZeroData; This->stateBlock->streamSource[0] = (IWineD3DVertexBuffer *)pVertexStreamZeroData;
This->stateBlock->streamIsUP = TRUE; This->stateBlock->streamIsUP = TRUE;
......
...@@ -233,12 +233,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) { ...@@ -233,12 +233,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
int counter; int counter;
FIXME("Releasing primary stateblock\n"); 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 */ /* 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++) { for (counter = 0; counter < GL_LIMITS(sampler_stages); counter++) {
if (This->textures[counter]) { if (This->textures[counter]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment