http://bugs.winehq.org/show_bug.cgi?id=24207
Summary: Nvidia drivers and stupid fpu Product: Wine Version: 1.3.1 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: thunder_8888@mail.ru
At all, it's not a wine bug, but bug of nvidia driver and bad code of windows programm. When i start some games from tasofro, shows black window and game hang up. It's bug appears only on Nvidia drivers, because they use not safe code in libGLcore. During glXCreateContext it does this: leal 0x2ac(%esp),%esi leal 0x2b0(%esp),%ecx ... 195230: movl 0x2a8(%esp),%eax 195237: movl %eax,0x2a4(%esp) 19523e: flds 0x2a8(%esp) 195245: fmul %st(1),%st 195247: fstps 0x2a8(%esp) 19524e: flds 0x2b0(%esp) 195255: flds 0x2a8(%esp) 19525c: faddp %st,%st(1) 19525e: fstps 0x2ac(%esp) 195265: movl 0x0(%esi),%edx 195267: movl 0x0(%ecx),%eax 195269: cmpl %eax,%edx 19526b: jnz 195230
While this exact code is called on every context creation, it clearly doesn't cause anything problematic for most non-Tasofro apps. This is because of the FPU rounding mode. In the default setting, it will always converge because the two values are constants. However, Tasofro sets the FPU Control Word to 0A7F at some point, which means it always rounds up rather than rounds to nearest. This means that the value will never converge. So it just gets stuck in an infinite loop. (If i patch exe for rounding mode - game starts normally)
Well, i think wine may reset rounding mode before call glXCreateContext
http://bugs.winehq.org/show_bug.cgi?id=24207
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz
--- Comment #1 from Wylda wylda@volny.cz 2010-08-30 04:05:51 CDT ---
Hmmm. Isn't it better to fill bug at nVidia, than thinking of work arounds?
Your first line qualify this bug report as INVALID, but the last one keeps me waiting to some devs comment.
http://bugs.winehq.org/show_bug.cgi?id=24207
--- Comment #2 from thunder_8888@mail.ru 2010-08-30 13:59:08 CDT --- Game use for setting round mode up: call __controlfp_s
http://bugs.winehq.org/show_bug.cgi?id=24207
thunder_8888@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #3 from thunder_8888@mail.ru 2010-09-05 22:22:46 CDT --- Same problem, duplicate.
*** This bug has been marked as a duplicate of bug 13490 ***
http://bugs.winehq.org/show_bug.cgi?id=24207
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Jeff Zaroyko jeffz@jeffz.name 2010-09-06 01:22:04 CDT --- Closing duplicate.