Mesa (master): gallivm: fix typo in lp_build_mul_norm
Roland Scheidegger
sroland at kemper.freedesktop.org
Sat Feb 9 00:33:03 UTC 2013
Module: Mesa
Branch: master
Commit: 49f8825c49871ca956c7ed21b096f3835311f57e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49f8825c49871ca956c7ed21b096f3835311f57e
Author: Roland Scheidegger <sroland at vmware.com>
Date: Fri Feb 1 08:34:36 2013 -0800
gallivm: fix typo in lp_build_mul_norm
The signed case didn't do what the comment indicated. Should increase rounding
precision (at the expense of performance since the former code was effectively
a no-op).
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
---
src/gallium/auxiliary/gallivm/lp_bld_arit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index d930f09..b4e9f23 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -769,7 +769,7 @@ lp_build_mul_norm(struct gallivm_state *gallivm,
half = lp_build_const_int_vec(gallivm, wide_type, 1 << (n - 1));
if (wide_type.sign) {
LLVMValueRef minus_half = LLVMBuildNeg(builder, half, "");
- LLVMValueRef sign = lp_build_shr_imm(&bld, half, wide_type.width - 1);
+ LLVMValueRef sign = lp_build_shr_imm(&bld, ab, wide_type.width - 1);
half = lp_build_select(&bld, sign, minus_half, half);
}
ab = LLVMBuildAdd(builder, ab, half, "");
More information about the mesa-commit
mailing list