aco: fix 64-bit trunc with negative exponents on GFX6
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 6 May 2020 13:34:07 +0000 (15:34 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 11 May 2020 06:31:23 +0000 (08:31 +0200)
commit3fba0a7a6f01496344ddb93e774b2d4bc9195e8a
treeb47320cfc29a6cc854b34d78e7721f99edf25e43
parent56f955e4850035d915a2a87e2ebea7fa66ab5e19
aco: fix 64-bit trunc with negative exponents on GFX6

v_frexp_exp returns the exponent as an unsigned value.

Also, v_ashr returns either 0 or -1 depending on the sign of the
source operand, but what we want is only the sign bit.

Fixes a bunch of recent dEQP-VK.glsl.builtin.precision_double.* tests.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4921>
src/amd/compiler/aco_instruction_selection.cpp