Re: wined3d [try3]: SetDepthStencilSurface is always called when AutoDepthStencil is enabled
2009/3/29 David Adam <david.adam.cnrs(a)gmail.com>:
+ hrc = IWineD3DDeviceParent_CreateDepthStencilSurface(This->device_parent, + NULL, + pPresentationParameters->BackBufferWidth, + pPresentationParameters->BackBufferHeight, + pPresentationParameters->AutoDepthStencilFormat, + pPresentationParameters->MultiSampleType, + pPresentationParameters->MultiSampleQuality, + FALSE, + &This->auto_depth_stencil_buffer); Even though I don't think any implementation of IWineD3DDeviceParent_CreateDepthStencilSurface actually uses the second parameter, you should pass "This->parent" rather than NULL there.
+ if (SUCCEEDED(hrc)) + IWineD3DDevice_SetDepthStencilSurface(iface, This->auto_depth_stencil_buffer); This is redundant, the code a couple of lines down will also set the depth stencil.
+ else { + ERR("Failed to create the auto depth stencil\n");ยท + return WINED3DERR_INVALIDCALL; + } You're leaking the swapchain here. Also, not trying to be picky, but could you please fix the indentation?
participants (1)
-
Henri Verbeet