http://bugs.winehq.org/show_bug.cgi?id=27169
Summary: Crysis 1&2 crash on nvidia 540m card with X error BadMatch if using fbo Product: Wine Version: 1.3.20 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: opengl AssignedTo: wine-bugs@winehq.org ReportedBy: rockorequin@hotmail.com
Created an attachment (id=34710) --> (http://bugs.winehq.org/attachment.cgi?id=34710) log with +opengl, +d3d showing crash
Both Crysis 1 and 2 crash at startup with this error when running on an nvidia 540M:
X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 136 (GLX) Minor opcode of failed request: 26 (X_GLXMakeContextCurrent)
The crash happens after the game resizes the screen but before the very first 'Crytek' splash screen is shown, ie within the first few seconds.
If I set OffScreenRendering to backbuffer, they do not crash but the graphics rendering is too poor to play.
Crysis Warhead works fine with the default fbo, and so do the other applications I've tried.
The crash doesn't happen with an older nvidia 8600M card.
http://bugs.winehq.org/show_bug.cgi?id=27169
--- Comment #1 from rocko rockorequin@hotmail.com 2011-05-14 21:08:38 CDT --- Created an attachment (id=34711) --> (http://bugs.winehq.org/attachment.cgi?id=34711) log with +opengl, +d3d showing no crash when backbuffer is set
http://bugs.winehq.org/show_bug.cgi?id=27169
--- Comment #2 from rocko rockorequin@hotmail.com 2011-05-14 21:09:50 CDT --- Created an attachment (id=34712) --> (http://bugs.winehq.org/attachment.cgi?id=34712) log with fbo on an nvidia 8600m card (does not crash)
http://bugs.winehq.org/show_bug.cgi?id=27169
--- Comment #3 from rocko rockorequin@hotmail.com 2011-05-14 21:11:50 CDT --- Just in case it's relevant, I've patched wine to correctly recognise the 540M card as per http://bugs.winehq.org/show_bug.cgi?id=27159.
http://bugs.winehq.org/show_bug.cgi?id=27169
--- Comment #4 from rocko rockorequin@hotmail.com 2011-06-11 18:22:15 CDT --- I've tracked the problem to changing the pixel format dlls/wined3d/context.c#context_set_pixel_format (called from context_create()), where the code:
/* By default WGL doesn't allow pixel format adjustments but we need it * here. For this reason there's a Wine specific wglSetPixelFormat() * which allows us to set the pixel format multiple times. Only use it * when really needed. */ if (gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH]) { if (!GL_EXTCALL(wglSetPixelFormatWINE(dc, format, NULL))) {
is being executed. ifdef'ing it out fixes the BadMatch X_GLXMakeContextCurrent error.
gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH] is being set to non-zero on both the Intel and nvidia GPUs but on the nvidia it causes the subsequent BadMatch error.
http://bugs.winehq.org/show_bug.cgi?id=27169
--- Comment #5 from rocko rockorequin@hotmail.com 2011-06-11 18:46:44 CDT --- So it looks like X11DRV_WineGL_LoadExtensions always adds the WGL_WINE_PIXEL_FORMAT_PASSTHROUGH extension, irrespective of the video card.
The main difference with the nvidia 540M is that it's an optimus setup, so I'm running the GLX commands via VirtualGL. Could this be causing the failure to change pixel formats? ie it's not a video card issue?
http://bugs.winehq.org/show_bug.cgi?id=27169
Roderick Colenbrander thunderbird2k@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thunderbird2k@gmail.com
--- Comment #6 from Roderick Colenbrander thunderbird2k@gmail.com 2011-06-25 16:55:14 CDT --- It is very likely to be a VitualGL bug. There is a lot of voodoo it does and it doesn't handle all the recent GL / GLX extensions correctly. Can't easily say what is going wrong in VirtualGL, but likely an issue with GLX context / GLX pbuffer recreation in there.
http://bugs.winehq.org/show_bug.cgi?id=27169
Roderick Colenbrander thunderbird2k@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX
--- Comment #7 from Roderick Colenbrander thunderbird2k@gmail.com 2011-07-11 16:38:01 CDT --- Marking as WONTFIX, because of VirtualGL bug.
http://bugs.winehq.org/show_bug.cgi?id=27169
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED CC| |nerv@dawncrow.de
--- Comment #8 from André H. nerv@dawncrow.de 2011-07-23 08:37:53 CDT --- Closing wontfix.
http://bugs.winehq.org/show_bug.cgi?id=27169
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|WONTFIX |INVALID
--- Comment #9 from Henri Verbeet hverbeet@gmail.com 2011-07-23 13:36:47 CDT --- If it's a bug in VirtualGL it's INVALID, not WONTFIX.