When running `wine LaunchGTAIV.exe` with latest mesa, it blinks once, and then disappears with:
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 325
Current serial number in output stream: 330
Bisection got me to the commit below. Reverting it locally fixes the problem.
Author: Hal Gentz <firstname.lastname@example.org>
Date: Sun Mar 24 16:52:39 2019 -0600
glx: Fix synthetic error generation in __glXSendError
To quote Uli Schlachter, who understands this stuff more than I do:
> The function __glXSendError() in mesa's src/glx/glx_error.c invents an X11
> protocol error out of thin air. For the sequence number it uses dpy->request.
> This is the sequence number of the last request that was sent. _XError() will
> then update dpy->last_request_read based on the sequence number of the error
> that just "came in".
> If now another something comes in with a sequence number less than
> dpy->last_request_read, since sequence numbers are monotonically increasing,
> widen() will incorrectly add 1<<32 to the sequence number and things might go
> downhill afterwards.
`__glXSendErrorForXcb` was also patched, as that's the function that
`glXCreateContextAttribsARB` actually uses.
Fixes: ad503c41 'apple: Initial import of libGL for OSX from AppleSGLX svn repository'
Reviewed-by: Adam Jackson <email@example.com>
Reviewed-by: Ian Romanick <firstname.lastname@example.org>
Signed-off-by: Hal Gentz <email@example.com>
Note: I couldn't reproduce it with other games with or without wine, but I only have a few of them though.
*** This bug has been marked as a duplicate of bug 110632 ***