EverQuest2.exe and context.c

Stefan Dösinger stefan at codeweavers.com
Wed Jul 23 00:19:22 CDT 2008

> why not remove this  and go ahead and call ChoosePixelFormat?
> If ChoosePixelFormat fails then we say we can't find  a suitable pixel
> format? This removes one problem when EverQuest2.exe runs where I get
> 2-3 calls to WineD3D_ChoosePixelFormat
Roderick has written this code, and he is on vacation right now.

One of our rules is not to do any change to the code that happens to fix an
app without doubt-free understanding of what the problem is. (Sometimes we
have to make exceptions, e.g. with random graphics driver bugs)

As far as I understand it, findCompatible is set when an onscreen drawable
is created(drawing to a window), and it is FALSE if a pbuffer is created(one
form of offscreen rendering). pbuffers aren't created at device creation or
reset time, so something seems odd that removing the !findCompatible fixes a
startup crash(unless the app instantly tries to do offscreen rendering and
you have offscreenRenderingMode = pbuffer)

The reason for not accepting compatible formats with pbuffers is(among
others maybe) that rendering on a different format and then copying it to a
texture can cause serious performance problems. So the !findCompatible in
this code looks correct to me, but maybe the caller sets the flag
incorrectly. Also it seems strange that this patch fixes a problem that is
caused by recursive Reset() calls.

I sent a patch to make the pixel format check less picky(especially
regarding AUX buffers). I lost your reply to it, and Alexandre didn't apply
it yet, I think due to your unanswered concern about it. Does that patch fix
the problem with the game?

The patch I mean is this:

More information about the wine-devel mailing list