summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-04-22 13:00:48 -0400
committerZack Rusin <[email protected]>2010-04-22 13:57:18 -0400
commit63aa9b505a2439399af3e6ed47c5a0b1b791fba8 (patch)
tree91e1acce88d0d3e89050e295062fe55fdf24ccdf /src
parent8bee4c7718a3bd57e3d99f0913d9081cd13fe5fd (diff)
gallivm: make sure we return the correct type when approximating log's
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_arit.c4
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 8e8fcccf564..d6967633172 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;