http://bugs.winehq.org/show_bug.cgi?id=7284
Alexander Dorofeyev alexd4@inbox.lv changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #20174|0 |1 is obsolete| | Attachment #23321|0 |1 is obsolete| | Attachment #23322|0 |1 is obsolete| | Attachment #23323|0 |1 is obsolete| | Attachment #23324|0 |1 is obsolete| | Attachment #23325|0 |1 is obsolete| |
--- Comment #77 from Alexander Dorofeyev alexd4@inbox.lv 2013-10-21 11:50:45 CDT --- Created attachment 46375 --> http://bugs.winehq.org/attachment.cgi?id=46375 updated testcase rcp(0)*0
attaching updated patch with testcase, that can apply to current git it reproduces the problem (rcp(0)*0). Result on geforce 8800:
visual.c:4238: Test failed: Color is 00ffffff, expected 000000
----------
Here is a more recent app affected by the same problem:
http://bugs.winehq.org/show_bug.cgi?id=34266
Quite possibly there are more. At the moment, it seems to only affect Nvidia, but not because of a driver bug - rather, it seems that a behavior undefined in GLSL is triggered:
on native, DirectX <= 9: rcp(0)*0 == Inf*0 == 0 (DirectX >= 10 has different rules)
in GLSL: Inf*0 == undefined; in practice, appears to be NaN on nvidia vs 0 on ATI (Intel graphics probably same a ATI) at the moment, that's why people can't see this on Intel or ATI; can easily change in the future though.
With GLSL specs as they currently are, and without some kind of extension to deal with this problem, the "technically valid" solution might be something like what is suggested in bug #34266:
"dest = mix(vecN(0), a * b, equal(a, vecN(0)) || equal(b, vecN(0)))"
But Henri Verbeet said there that this is probably too costly performance-wise.