From b76e4458f90ee887ea3c3108e7807099b70df057 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 20 Jan 2016 12:09:29 -0800 Subject: [PATCH] nir/spirv/glsl450: Use fabs not iabs in ldexp. This was just wrong. --- src/glsl/nir/nir_opt_algebraic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index 188c5b1b043..a46cbf711ac 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -305,7 +305,7 @@ def ldexp_to_arith(x, exp): exp_width = 8 # Extract the biased exponent from . - extracted_biased_exp = ('ushr', ('iabs', x), exp_shift) + extracted_biased_exp = ('ushr', ('fabs', x), exp_shift) resulting_biased_exp = ('iadd', extracted_biased_exp, exp) # Test if result is ±0.0, subnormal, or underflow by checking if the -- 2.30.2