[PATCH] WineD3D: Prefer aux buffer matches over alpha matches=0A=

Stefan Doesinger stefan at codeweavers.com
Thu Aug 14 16:47:19 CDT 2008


=0A=
Half Life 2 uses D3DFMT_X8R8G8B8 for the back buffer, but macos=0A=
supports aux buffers only on D3DFMT_A8R8G8B8. I think having aux=0A=
buffers is more important right now than having a precise alpha=0A=
match.=0A=
---=0A=
 dlls/wined3d/context.c |   12 +++++++-----=0A=
 1 files changed, 7 insertions(+), 5 deletions(-)=0A=
=0A=
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c=0A=
index 68ec2a7..739ddb2 100644=0A=
--- a/dlls/wined3d/context.c=0A=
+++ b/dlls/wined3d/context.c=0A=
@@ -129,17 +129,19 @@ static int =
WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF=0A=
         BOOL exact_alpha;=0A=
         BOOL exact_color;=0A=
     } matches[] =3D {=0A=
-        /* First, try without aux buffers - this is the most common =
cause=0A=
-         * for not finding a pixel format. Also some drivers(the open =
source ones)=0A=
+        /* First, try without alpha match buffers. MacOS supports aux =
buffers only=0A=
+         * on A8R8G8B8, and we prefer better offscreen rendering over =
an alpha match.=0A=
+         * Then try without aux buffers - this is the most common cause =
for not=0A=
+         * finding a pixel format. Also some drivers(the open source =
ones)=0A=
          * only offer 32 bit ARB pixel formats. First try without an =
exact alpha=0A=
          * match, then try without an exact alpha and color match.=0A=
          */=0A=
-        { TRUE,  TRUE,  TRUE  },=0A=
         { FALSE, TRUE,  TRUE  },=0A=
-        { TRUE,  FALSE, TRUE  },=0A=
-        { TRUE,  FALSE, FALSE },=0A=
+        { TRUE,  TRUE,  TRUE  },=0A=
         { FALSE, FALSE, TRUE  },=0A=
         { FALSE, FALSE, FALSE },=0A=
+        { TRUE,  FALSE, TRUE  },=0A=
+        { TRUE,  FALSE, FALSE },=0A=
     };=0A=
 =0A=
     int i =3D 0;=0A=
-- =0A=
1.5.4.5=0A=
=0A=

------=_NextPart_000_0061_01C902BC.A175AA00--




More information about the wine-patches mailing list