[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: wined3d [try3]: SetDepthStencilSurface is always called when
From:       Henri Verbeet <hverbeet () gmail ! com>
Date:       2009-03-29 19:29:26
Message-ID: d658b69e0903291229u4808bf62ma16a2b853ffe9bef () mail ! gmail ! com
[Download RAW message or body]

2009/3/29 David Adam <david.adam.cnrs@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?



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic