[Mesa-dev] [PATCH 2/3] lp_bld_arit: Fix lp_build_sgn.

Olivier Galibert galibert at pobox.com
Tue May 8 23:26:06 PDT 2012


Signed-off-by: Olivier Galibert <galibert at pobox.com>
---
 src/gallium/auxiliary/gallivm/lp_bld_arit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index 4ba4aa5..77497ad 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -926,7 +926,7 @@ lp_build_sgn(struct lp_build_context *bld,
    }
    else
    {
-      LLVMValueRef minus_one = lp_build_const_vec(bld->gallivm, type, -1.0);
+      LLVMValueRef minus_one = lp_build_const_int_vec(bld->gallivm, type, -1);
       cond = lp_build_cmp(bld, PIPE_FUNC_GREATER, a, bld->zero);
       res = lp_build_select(bld, cond, bld->one, minus_one);
    }
-- 
1.7.10.280.gaa39



More information about the mesa-dev mailing list