Roderick Colenbrander : wined3d: Request a WGL depth stencil capable pixel format by default until we have proper SetDepthStencilSurface support .

Alexandre Julliard julliard at winehq.org
Mon May 19 16:25:43 CDT 2008


Module: wine
Branch: master
Commit: bd5c02e24504470e0853096a2ef50120b4050b50
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bd5c02e24504470e0853096a2ef50120b4050b50

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Sun May 18 17:41:56 2008 +0000

wined3d: Request a WGL depth stencil capable pixel format by default until we have proper SetDepthStencilSurface support.

---

 dlls/wined3d/context.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 14d8fce..0811f12 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -126,6 +126,22 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF
         return 0;
     }
 
+    /* In WGL both color, depth and stencil are features of a pixel format. In case of D3D they are separate.
+     * You are able to add a depth + stencil surface at a later stage when you need it.
+     * In order to support this properly in WineD3D we need the ability to recreate the opengl context and
+     * drawable when this is required. This is very tricky as we need to reapply ALL opengl states for the new
+     * context, need torecreate shaders, textures and other resources.
+     *
+     * The context manager already takes care of the state problem and for the other tasks code from Reset
+     * can be used. These changes are way to risky during the 1.0 code freeze which is taking place right now.
+     * Likely a lot of other new bugs will be exposed. For that reason request a depth stencil surface all the
+     * time. It can cause a slight performance hit but fixes a lot of regressions. A fixme reminds of that this
+     * issue needs to be fixed. */
+    if(DepthStencilFormat != WINED3DFMT_D24S8)
+        FIXME("Add OpenGL context recreation support to SetDepthStencilSurface\n");
+
+    DepthStencilFormat = WINED3DFMT_D24S8;
+
     if(DepthStencilFormat) {
         getDepthStencilBits(DepthStencilFormat, &depthBits, &stencilBits);
     }




More information about the wine-cvs mailing list