summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 8e8fcccf56..d696763317 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;