nir/algebraic: mark float optimizations returning one parameter as inexact
authorAndres Gomez <agomez@igalia.com>
Tue, 23 Apr 2019 13:54:24 +0000 (15:54 +0200)
committerAndres Gomez <agomez@igalia.com>
Tue, 17 Sep 2019 20:39:18 +0000 (23:39 +0300)
commit3f782cdd2591259e120b76aa4891c305cc1e8cb6
treed8f3ef39222c86048f1e4c675798d1b3c4025603
parent5e22f3e29a21eb4623759b517619543f3553caea
nir/algebraic: mark float optimizations returning one parameter as inexact

With the arrival of VK_KHR_shader_float_controls algebraic
optimizations for float types of the form (('fop', a, b), a) become
inexact depending on the execution mode.

For example, if we have activated SHADER_DENORM_FLUSH_TO_ZERO, in case
of a denorm value for the "a" parameter, we cannot return it still as
a denorm, it needs to be flushed to zero. Therefore, we mark now all
those operations as inexact.

Suggested-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_opt_algebraic.py