From 63aa9b505a2439399af3e6ed47c5a0b1b791fba8 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Thu, 22 Apr 2010 13:00:48 -0400 Subject: gallivm: make sure we return the correct type when approximating log's --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3