[Bug 26967] New: Water is black in StarCraft II with ARB shaders
http://bugs.winehq.org/show_bug.cgi?id=26967 Summary: Water is black in StarCraft II with ARB shaders Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs(a)winehq.org ReportedBy: stefandoesinger(a)gmx.at As expected patch db8d681a5b088b3b0dd58c6952086891f6bbb4f5 broke water rendering in StarCraft 2 with ARB shaders. The water is now black again. This can be reproduced with e.g. the Agria Valley map on highest graphics. I think especially the shaders are important here. As far as I remember the important thing in SC2 is that the result of RCP(0.0) * 0.0 gives 0.0. Reverting the patch fixes SC2. I'll give GLSL a try. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 Stefan Dösinger <stefandoesinger(a)gmx.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matteo.mystral(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #1 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2011-04-29 18:07:43 CDT --- GLSL is broken too -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 Stefan Dösinger <stefandoesinger(a)gmx.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Water is black in StarCraft |Water is black in StarCraft |II with ARB shaders |II -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |austinenglish(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 machete <aeneas(a)q-mail.me> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aeneas(a)q-mail.me --- Comment #2 from machete <aeneas(a)q-mail.me> 2011-05-27 08:46:37 CDT --- I can confirm this. maybe http://bugs.winehq.org/show_bug.cgi?id=27059 is a duplicate? Neither GLSL nor ARB work for me. I'm on a Nvidia GTX 260 with 270.41.19 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #3 from machete <aeneas(a)q-mail.me> 2011-05-27 08:48:37 CDT --- (In reply to comment #0)
As expected patch db8d681a5b088b3b0dd58c6952086891f6bbb4f5 broke water rendering in StarCraft 2 with ARB shaders. The water is now black again.
This can be reproduced with e.g. the Agria Valley map on highest graphics. I think especially the shaders are important here. As far as I remember the important thing in SC2 is that the result of RCP(0.0) * 0.0 gives 0.0.
Reverting the patch fixes SC2. I'll give GLSL a try.
btw: is there a way to revert that patch? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #4 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2011-05-27 09:08:41 CDT --- 27059 looks like a duplicate. You can revert the patch in your repo, but you'll probably have to do it manually. The underlying problem is a multiplication of 0.0 times Infinite. IEEE 754 mandates that this returns NaN. The game expects 0. Unfortunately we can't realistically catch this in the shader, there are way too many MULs, DP3s, DP4s and other instructions that multiply two numbers. The performance impact would be way too high. The only working solution would be to lobby for an opengl extension, e.g. a "#pragma d3d_floating_point_rules" in GLSL. Alternatively we could hope that some future GPUs or Windows drivers start returning NaN and games get fixed. This happened in the past with other floating point specialities like RCP 0.0. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #5 from machete <aeneas(a)q-mail.me> 2011-05-27 11:08:36 CDT --- (In reply to comment #4)
27059 looks like a duplicate. You can revert the patch in your repo, but you'll probably have to do it manually.
The underlying problem is a multiplication of 0.0 times Infinite. IEEE 754 mandates that this returns NaN. The game expects 0.
Unfortunately we can't realistically catch this in the shader, there are way too many MULs, DP3s, DP4s and other instructions that multiply two numbers. The performance impact would be way too high. The only working solution would be to lobby for an opengl extension, e.g. a "#pragma d3d_floating_point_rules" in GLSL.
Alternatively we could hope that some future GPUs or Windows drivers start returning NaN and games get fixed. This happened in the past with other floating point specialities like RCP 0.0.
BTW how old is this patch because I remember that since the release of sc2 this was a problem at least the one described in the bug report above. Unfortunately I have very little knowledge and experience with OpenGL, but is the d3d_floating_point_rules something wine developers could do or has this to be implemented in ogl? What did patch db8d681a5b088b3b0dd58c6952086891f6bbb4f5 actually fix? Or, if I revert to that patch will something else get broken, like the performance? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #6 from machete <aeneas(a)q-mail.me> 2011-05-27 11:32:45 CDT --- (In reply to comment #5)
(In reply to comment #4)
27059 looks like a duplicate. You can revert the patch in your repo, but you'll probably have to do it manually.
The underlying problem is a multiplication of 0.0 times Infinite. IEEE 754 mandates that this returns NaN. The game expects 0.
Unfortunately we can't realistically catch this in the shader, there are way too many MULs, DP3s, DP4s and other instructions that multiply two numbers. The performance impact would be way too high. The only working solution would be to lobby for an opengl extension, e.g. a "#pragma d3d_floating_point_rules" in GLSL.
Alternatively we could hope that some future GPUs or Windows drivers start returning NaN and games get fixed. This happened in the past with other floating point specialities like RCP 0.0.
BTW how old is this patch because I remember that since the release of sc2 this was a problem at least the one described in the bug report above.
Unfortunately I have very little knowledge and experience with OpenGL, but is the d3d_floating_point_rules something wine developers could do or has this to be implemented in ogl?
What did patch db8d681a5b088b3b0dd58c6952086891f6bbb4f5 actually fix? Or, if I revert to that patch will something else get broken, like the performance?
I see that the patch was applied like a week ago, I had the problems mentioned in http://bugs.winehq.org/show_bug.cgi?id=27059 long before that so it seems as if this is not a duplicate -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #7 from machete <aeneas(a)q-mail.me> 2011-05-27 13:54:20 CDT --- Created an attachment (id=34926) --> (http://bugs.winehq.org/attachment.cgi?id=34926) ingame shaders not working in 1.3.15 please excuse my "post spamming", I hope that this is not a problem. I can confirm that patch db8d681a5b088b3b0dd58c6952086891f6bbb4f5 shows problems with the water (pre patch db8d681a5b088b3b0dd58c6952086891f6bbb4f5 does not) but http://bugs.winehq.org/show_bug.cgi?id=27059 is NOT a duplicate because those shaders mentioned there do not work in 1.3.20 (which has patch db8d681a5b088b3b0dd58c6952086891f6bbb4f5) as well as in 1.3.15 (pre patch xxx). Actually in 1.3.20 an effect (destroying a nexus / landing a nuke -> see attachement) does work which does not in 1.3.15 but I can not say if this has something to do with the mentioned patch. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #8 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2011-05-27 16:04:36 CDT --- db8d681a5b088b3b0dd58c6952086891f6bbb4f5 was applied more than a month ago(*April* 21, not May). It fixed bug 26780 and tests show that it is correct. Supporting d3d floating point rules is something the driver vendors have to implement. To get that we have to lobby Nvidia and AMD to do so. What makes our job harder is that the d3d behavior isn't specified either, it is driver specific too. We don't have a test for 0.0 * Inf yet, but we do have tests for RCP 0.0 (1 / 0.0), which returns Inf on some GPUs(rather new ones) and a very high, but finite value on others(older GPUs). In the past other games had issues with this, for example Source 2007 based ones. Valve fixed the Source engine eventually, most likely when they ported it to OSX. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #9 from machete <aeneas(a)q-mail.me> 2011-05-28 11:18:19 CDT --- Thank you a lot for the time you put into explaining this to me :) So it will be some time until this will get fixed? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #10 from machete <aeneas(a)q-mail.me> 2011-07-28 05:48:44 CDT --- Seems to be fixed..works fine with the current wine version (1.3.25svn i believe) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #11 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2011-07-28 08:54:26 CDT --- I don't think we fixed this. It must have been a driver update, or you changed your GPU. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #12 from machete <aeneas(a)q-mail.me> 2011-07-28 09:13:38 CDT --- I recently changed my GPU but it didn't work then as well. so it seems like an driver update -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 --- Comment #13 from machete <aeneas(a)q-mail.me> 2011-07-28 09:15:40 CDT --- Jep, it definately is a driver update because shaders which didn't work in .18 work now in .18! running: nvidia 275.19 drivers -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |dank(a)kegel.com Resolution| |INVALID --- Comment #14 from Dan Kegel <dank(a)kegel.com> 2011-07-28 09:45:42 CDT --- woot! Closing invalid, then. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=26967 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #15 from Austin English <austinenglish(a)gmail.com> 2011-08-02 11:02:29 CDT --- Closing. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org