[WINED3D 2] Fix render state bugs
Ivan Gyurdiev
ivg231 at gmail.com
Fri Jul 14 12:26:49 CDT 2006
> Bug: Do not always create a depth-stencil buffer (thereby forcing
> ZENABLE state to TRUE always). Dereference
> pPresentationParameters->EnableAutoDepthStencil pointer.
I see this one broke Uninit3D, because it always attempts to free the
depthStencilBuffer, even when there isn't one.
As a result tests fail. Please re-try with the attached patch.
-------------- next part --------------
---
dlls/wined3d/device.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index a92681c..2179cc9 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2118,12 +2118,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl
TRACE("Setting rendertarget to NULL\n");
This->renderTarget = NULL;
- IWineD3DSurface_GetParent(This->depthStencilBuffer, &stencilBufferParent);
- IUnknown_Release(stencilBufferParent); /* once for the get parent */
- if(IUnknown_Release(stencilBufferParent) >0){ /* the second time for when it was created */
- FIXME("(%p) Something's still holding the depthStencilBuffer\n",This);
+ if (This->depthStencilBuffer) {
+ IWineD3DSurface_GetParent(This->depthStencilBuffer, &stencilBufferParent);
+ IUnknown_Release(stencilBufferParent); /* once for the get parent */
+ if(IUnknown_Release(stencilBufferParent) >0){ /* the second time for when it was created */
+ FIXME("(%p) Something's still holding the depthStencilBuffer\n",This);
+ }
+ This->depthStencilBuffer = NULL;
}
- This->depthStencilBuffer = NULL;
for(i=0; i < This->NumberOfSwapChains; i++) {
TRACE("Releasing the implicit swapchain %d\n", i);
--
1.4.0
More information about the wine-patches
mailing list