[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
https://bugs.freedesktop.org/show_bug.cgi?id=107089
--- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> ---
GLSL's approach to NaN is pretty weak.
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shader_precision.txt
"""
The following rules apply to both single and double precision operations:
Dividing by 0 results in the appropriately signed IEEE Inf. Any
denormalized
value input into a shader or potentially generated by an operation in a
shader
can be flushed to 0. In general, correct signedness of 0 is not required.
The
rounding mode cannot be set and is undefined. Support for signaling NaNs
is
not required and exceptions are never raised. Operations and built-in
functions
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