Commit 77204574 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

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.
parent 08f4b87f
...@@ -129,17 +129,19 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF ...@@ -129,17 +129,19 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc, WINED3DF
BOOL exact_alpha; BOOL exact_alpha;
BOOL exact_color; BOOL exact_color;
} matches[] = { } matches[] = {
/* First, try without aux buffers - this is the most common cause /* First, try without alpha match buffers. MacOS supports aux buffers only
* for not finding a pixel format. Also some drivers(the open source ones) * 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 * only offer 32 bit ARB pixel formats. First try without an exact alpha
* match, then try without an exact alpha and color match. * match, then try without an exact alpha and color match.
*/ */
{ TRUE, TRUE, TRUE },
{ FALSE, TRUE, TRUE }, { FALSE, TRUE, TRUE },
{ TRUE, FALSE, TRUE }, { TRUE, TRUE, TRUE },
{ TRUE, FALSE, FALSE },
{ FALSE, FALSE, TRUE }, { FALSE, FALSE, TRUE },
{ FALSE, FALSE, FALSE }, { FALSE, FALSE, FALSE },
{ TRUE, FALSE, TRUE },
{ TRUE, FALSE, FALSE },
}; };
int i = 0; int i = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment