Ok guys...

celticht32 at aol.com celticht32 at aol.com
Thu Jun 26 14:57:56 CDT 2008


Thank you so much for being patient and showing me how to do this.. with much help from everyone here is what the results are :

Patch 1 :

File : wine-1.0/dlls/wined3d/context.c

--- context.c??? 2008-06-26 13:52:57.000000000 -0400
+++ context.c.patch1??? 2008-06-26 15:19:15.000000000 -0400
@@ -145,9 +145,7 @@ static int WineD3D_ChoosePixelFormat(IWi
?
???? DepthStencilFormat = WINED3DFMT_D24S8;
?
-??? if(DepthStencilFormat) {
-??????? getDepthStencilBits(DepthStencilFormat, &depthBits, &stencilBits);
-??? }
+??? getDepthStencilBits(DepthStencilFormat, &depthBits, &stencilBits);
?
???? /* Find a pixel format which EXACTLY matches our requirements (except for depth) */
???? for(i=0; i<nCfgs; i++) {

Patch 2:

File: wine-1.0/dlls/wined3d/context.c

--- context.c??? 2008-06-26 13:52:57.000000000 -0400
+++ context.c.patch2??? 2008-06-26 15:37:25.000000000 -0400
@@ -120,7 +120,9 @@ static int WineD3D_ChoosePixelFormat(IWi
???? int i = 0;
???? int nCfgs = This->adapter->nCfgs;
???? WineD3D_PixelFormat *cfgs = This->adapter->cfgs;
-
+??? PIXELFORMATDESCRIPTOR pfd;
+??? BOOL exactDepthMatch = TRUE;
+??????????? 
???? TRACE("ColorFormat=%s, DepthStencilFormat=%s, auxBuffers=%d, numSamples=%d, pbuffer=%d, findCompatible=%d\n",
?????????? debug_d3dformat(ColorFormat), debug_d3dformat(DepthStencilFormat), auxBuffers, numSamples, pbuffer, findCompatible);
?
@@ -151,7 +153,6 @@ static int WineD3D_ChoosePixelFormat(IWi
?
???? /* Find a pixel format which EXACTLY matches our requirements (except for depth) */
???? for(i=0; i<nCfgs; i++) {
-??????? BOOL exactDepthMatch = TRUE;
???????? cfgs = &This->adapter->cfgs[i];
?
???????? /* For now only accept RGBA formats. Perhaps some day we will
@@ -180,13 +181,7 @@ static int WineD3D_ChoosePixelFormat(IWi
???????? if(cfgs->alphaSize != alphaBits)
???????????? continue;
?
-??????? /* We try to locate a format which matches our requirements exactly. In case of
-???????? * depth it is no problem to emulate 16-bit using e.g. 24-bit, so accept that. */
-??????? if(cfgs->depthSize < depthBits)
-??????????? continue;
-??????? else if(cfgs->depthSize > depthBits)
-??????????? exactDepthMatch = FALSE;
-
+??????? 
???????? /* In all cases make sure the number of stencil bits matches our requirements
????????? * even when we don't need stencil because it could affect performance EXCEPT
????????? * on cards which don't offer depth formats without stencil like the i915 drivers
@@ -198,6 +193,13 @@ static int WineD3D_ChoosePixelFormat(IWi
???????? if(cfgs->numSamples != numSamples)
???????????? continue;
?
+?????? /* We try to locate a format which matches our requirements exactly. In case of
+???????? * depth it is no problem to emulate 16-bit using e.g. 24-bit, so accept that. */
+??????? if(cfgs->depthSize < depthBits)
+??????????? continue;
+??????? else if(cfgs->depthSize > depthBits)
+??????????? exactDepthMatch = FALSE;
+
???????? /* When we have passed all the checks then we have found a format which matches our
????????? * requirements. Note that we only check for a limit number of capabilities right now,
????????? * so there can easily be a dozen of pixel formats which appear to be the 'same' but
@@ -216,12 +218,8 @@ static int WineD3D_ChoosePixelFormat(IWi
???????? }
???? }
?
-??? /* When findCompatible is set and no suitable format was found, let ChoosePixelFormat choose a pixel format in order not to crash. */
-??? if(!iPixelFormat && !findCompatible) {
-??????? ERR("Can't find a suitable iPixelFormat\n");
-??????? return FALSE;
-??? } else if(!iPixelFormat) {
-??????? PIXELFORMATDESCRIPTOR pfd;
+??? if(!iPixelFormat) {
+
?
???????? TRACE("Falling back to ChoosePixelFormat as we weren't able to find an exactly matching pixel format\n");
???????? /* PixelFormat selection */


Chris Ahrendt

P.S. THANKS everyone.. so now comments please? <G>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20080626/73448be4/attachment-0001.htm 


More information about the wine-devel mailing list