<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GLSL] "Multiplication by zero" optimization for floating point expression should be skipped"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107089#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GLSL] "Multiplication by zero" optimization for floating point expression should be skipped"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107089">bug 107089</a>
from <span class="vcard"><a class="email" href="mailto:imirkin@alum.mit.edu" title="Ilia Mirkin <imirkin@alum.mit.edu>"> <span class="fn">Ilia Mirkin</span></a>
</span></b>
<pre>GLSL's approach to NaN is pretty weak.
<a href="https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shader_precision.txt">https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shader_precision.txt</a>
"""
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>