DDraw: Implement depth filling through blit. (re-resubmit) try3

Stefan Dösinger stefan at codeweavers.com
Mon Dec 18 03:58:19 CST 2006

Am Sonntag 17 Dezember 2006 23:24 schrieb greg87 at online.de:
> Original Author:
> Elie Morisse
> lachienne at wanadoo.fr
> Updated by:
> Gregor Münch
> greg87 at online.de
> This is modified version of this patch:
> http://www.winehq.org/pipermail/wine-patches/2006-September/030815.html
> With the help from Stefan Dösinger I altered 2 lines. Full credit
> belongs to Elie Morisse
> fixes: http://bugs.winehq.org/show_bug.cgi?id=4306
A small issue: The indentions in IWineD3DSurfaceImpl_BltZ look a bit strange.

--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -1787,7 +1787,7 @@ IDirectDrawImpl_CreateNewSurface(IDirect
         Usage |= WINED3DUSAGE_OVERLAY;
-    if(This->depthstencil)
+    if(This->depthstencil || (pDDSD->ddsCaps.dwCaps & DDSCAPS_ZBUFFER))

Perhaps you can get rid of This->depthstencil by setting the DDSCAPS_ZBUFFER 
flag instead on the requested surface desc in the auto depth stencil creation 
callback. Mind you, this auto depth stencil creation isn't used nowadays any 
more, it was needed earlier to prevent wined3d from crashing. You can remove 
the function body and replace it by an ERR entirely I think, it shouldn't be 
called if everything works correctly in wined3d.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061218/f18a662b/attachment.pgp

More information about the wine-patches mailing list