nir/spirv/glsl450: Use fabs not iabs in ldexp.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Jan 2016 20:09:29 +0000 (12:09 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Jan 2016 20:18:02 +0000 (12:18 -0800)
This was just wrong.

src/glsl/nir/nir_opt_algebraic.py

index 188c5b1b0432ec303b85225b4c9275838c69bab6..a46cbf711acbacef3c3bf9734b840512fd608859 100644 (file)
@@ -305,7 +305,7 @@ def ldexp_to_arith(x, exp):
    exp_width = 8
 
    # Extract the biased exponent from <x>.
-   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