http://bugs.winehq.org/show_bug.cgi?id=26967
--- Comment #6 from machete aeneas@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