i965/fs: Fix nir_op_fsign of absolute value.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 24 Jan 2017 20:26:54 +0000 (12:26 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 31 Jan 2017 18:32:43 +0000 (10:32 -0800)
commit69042a5be4664c7928a21bd23e4f6795bfb19f60
tree3252b6a3bd9ac89788aee548fbba05bcb5b4046f
parent7ec3af3f8ff6584542f029c28abc2bcae1402259
i965/fs: Fix nir_op_fsign of absolute value.

This does point at the front-end emitting silly code that could have
been optimized out, but the current fsign implementation would emit
bogus IR if abs was set for the argument (because it would apply the
abs modifier on an unsigned integer type), and we shouldn't rely on
the upper layer's optimization passes for correctness.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp