[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 15:29:35 UTC 2018


--- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> ---
GLSL's approach to NaN is pretty weak.


    The following rules apply to both single and double precision operations:  
    Dividing by 0 results in the appropriately signed IEEE Inf.  Any
    value input into a shader or potentially generated by an operation in a
    can be flushed to 0.  In general, correct signedness of 0 is not required. 
    rounding mode cannot be set and is undefined.  Support for signaling NaNs
    not required and exceptions are never raised.  Operations and built-in
    that operate on a NaN are not required to return a NaN as the result.

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.

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

More information about the mesa-dev mailing list