diff options
author | Jose Fonseca <[email protected]> | 2015-03-18 14:19:10 +0000 |
---|---|---|
committer | Jose Fonseca <[email protected]> | 2015-03-18 21:51:40 +0000 |
commit | a56f1a8b32a2cafdd4e46c0d48a1a252d0e3c0ae (patch) | |
tree | cbf82fe92241dc89e96e9452eeb4c40f2ed7af66 /src/gallium/auxiliary/gallivm | |
parent | 1d30fd85dd2a240d4ccafc9a9eca55a129306cf5 (diff) |
gallivm: Use INFINITY directly.
Already done below.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_arit.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index cd05f111f19..0d4eaeaa78f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -2564,16 +2564,9 @@ lp_build_rsqrt(struct lp_build_context *bld, * All numbers smaller than FLT_MIN will result in +infinity * (rsqrtps treats all denormals as zero). */ - /* - * Certain non-c99 compilers don't know INFINITY and might not support - * hacks to evaluate it at compile time neither. - */ - const unsigned posinf_int = 0x7F800000; LLVMValueRef cmp; LLVMValueRef flt_min = lp_build_const_vec(bld->gallivm, type, FLT_MIN); - LLVMValueRef inf = lp_build_const_int_vec(bld->gallivm, type, posinf_int); - - inf = LLVMBuildBitCast(builder, inf, lp_build_vec_type(bld->gallivm, type), ""); + LLVMValueRef inf = lp_build_const_vec(bld->gallivm, type, INFINITY); for (i = 0; i < num_iterations; ++i) { res = lp_build_rsqrt_refine(bld, a, res); |