Mesa (master): gallivm: make sure we return the correct type when approximating log's
Zack Rusin
zack at kemper.freedesktop.org
Thu Apr 22 17:52:24 UTC 2010
Module: Mesa
Branch: master
Commit: 63aa9b505a2439399af3e6ed47c5a0b1b791fba8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=63aa9b505a2439399af3e6ed47c5a0b1b791fba8
Author: Zack Rusin <zackr at vmware.com>
Date: Thu Apr 22 13:00:48 2010 -0400
gallivm: make sure we return the correct type when approximating log's
---
src/gallium/auxiliary/gallivm/lp_bld_arit.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index 8e8fccc..d696763 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -1502,8 +1502,10 @@ lp_build_log2_approx(struct lp_build_context *bld,
res = LLVMBuildAdd(bld->builder, logmant, logexp, "");
}
- if(p_exp)
+ if(p_exp) {
+ exp = LLVMConstBitCast(exp, vec_type);
*p_exp = exp;
+ }
if(p_floor_log2)
*p_floor_log2 = logexp;
More information about the mesa-commit
mailing list