From: Zack Rusin Date: Thu, 22 Apr 2010 17:00:48 +0000 (-0400) Subject: gallivm: make sure we return the correct type when approximating log's X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63aa9b505a2439399af3e6ed47c5a0b1b791fba8;p=mesa.git gallivm: make sure we return the correct type when approximating log's --- 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;