[Mesa-dev] [Bug 107089] [GLSL] "Multiplication by zero" optimization for floating point expression should be skipped

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 2 18:41:21 UTC 2018


--- Comment #2 from Roland Scheidegger <sroland at vmware.com> ---
(In reply to Ilia Mirkin from comment #1)
> So NaN * 0 -> 0 appears to be a valid transformation. I haven't gone back
> and checked what's in the core specs, but I doubt it's any different.
For this particular shader, it's actually -Inf * 0.0 -> NaN that is checked.
The optimization though looks unsafe to me. Although sure enough glsl allows
this crazyness (I mean why does it even have a isnan function if you're not
required to generate NaNs...), but some (newer) apps might expect ieee754
behavior (or they might expect d3d10 behavior, which is the same wrt NaNs).

You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180702/9c5b78b7/attachment.html>

More information about the mesa-dev mailing list