From: José Fonseca Date: Tue, 15 Dec 2009 12:13:43 +0000 (+0000) Subject: llvmpipe: Fix bad SI -> FP conversion into lp_build_log2_approx. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=846e38f1c33c3b2e46227886da57beda27b82f0c;p=mesa.git llvmpipe: Fix bad SI -> FP conversion into lp_build_log2_approx. It should be a bitcast as the integer value is actually an encoded FP already. --- diff --git a/src/gallium/drivers/llvmpipe/lp_bld_arit.c b/src/gallium/drivers/llvmpipe/lp_bld_arit.c index 9c59677a741..4fd459e593e 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_arit.c @@ -1285,7 +1285,7 @@ lp_build_log2_approx(struct lp_build_context *bld, /* mant = (float) mantissa(x) */ mant = LLVMBuildAnd(bld->builder, i, mantmask, ""); mant = LLVMBuildOr(bld->builder, mant, one, ""); - mant = LLVMBuildSIToFP(bld->builder, mant, vec_type, ""); + mant = LLVMBuildBitCast(bld->builder, mant, vec_type, ""); logmant = lp_build_polynomial(bld, mant, lp_build_log2_polynomial, Elements(lp_build_log2_polynomial));