wined3d [try 2]: SetDepthStencilSurface is always called when AutoDepethStencilBuffer is enabled

Stefan Dösinger stefan at
Sat Mar 28 08:58:28 CDT 2009

Am Samstag, 28. März 2009 14:39:15 schrieb David Adam:

> +         hrc = IWineD3DDeviceImpl_CreateSurface(iface,
> ...
> +                 This->parent);
It's not that easy unfortunately.

You're using the d3d9 (or d3d8) device as parent for the depth stencil, which 
isn't correct. This would mean that GetDepthStencilSurface returns an 
IDirect3DDevice9 instead of an IDirect3DSurface9, which will obviously lead 
to troubles.

You'll have to use a callback function similarly to the CreateDevice callback 
to tell d3d8 / d3d9 to create one of their surface structures and call 
wined3d to create a wined3d surface.

More information about the wine-patches mailing list