Stefan Dösinger : wined3d: Prefer aux buffer matches over alpha matches.
Alexandre Julliard
julliard at winehq.org
Thu Aug 21 10:02:46 CDT 2008
Module: wine
Branch: master
Commit: 77204574d19b1969ca0810c7522e6bee5a0c4026
URL: http://source.winehq.org/git/wine.git/?a=commit;h=77204574d19b1969ca0810c7522e6bee5a0c4026
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Thu Aug 14 16:47:19 2008 -0500
wined3d: Prefer aux buffer matches over alpha matches.
Half Life 2 uses D3DFMT_X8R8G8B8 for the back buffer, but macos
supports aux buffers only on D3DFMT_A8R8G8B8. I think having aux
buffers is more important right now than having a precise alpha
match.
---
dlls/wined3d/context.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 68ec2a7..739ddb2 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -129,17 +129,19 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF
BOOL exact_alpha;
BOOL exact_color;
} matches[] = {
- /* First, try without aux buffers - this is the most common cause
- * for not finding a pixel format. Also some drivers(the open source ones)
+ /* First, try without alpha match buffers. MacOS supports aux buffers only
+ * on A8R8G8B8, and we prefer better offscreen rendering over an alpha match.
+ * Then try without aux buffers - this is the most common cause for not
+ * finding a pixel format. Also some drivers(the open source ones)
* only offer 32 bit ARB pixel formats. First try without an exact alpha
* match, then try without an exact alpha and color match.
*/
- { TRUE, TRUE, TRUE },
{ FALSE, TRUE, TRUE },
- { TRUE, FALSE, TRUE },
- { TRUE, FALSE, FALSE },
+ { TRUE, TRUE, TRUE },
{ FALSE, FALSE, TRUE },
{ FALSE, FALSE, FALSE },
+ { TRUE, FALSE, TRUE },
+ { TRUE, FALSE, FALSE },
};
int i = 0;
More information about the wine-cvs
mailing list