From: José Fonseca Date: Fri, 7 Aug 2009 08:28:58 +0000 (+0100) Subject: llvmpipe: Fix floating point const scale factor. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d52dce0ffbb165146d7b6812ff5152cbeff29a3a;p=mesa.git llvmpipe: Fix floating point const scale factor. --- diff --git a/src/gallium/drivers/llvmpipe/lp_bld_const.c b/src/gallium/drivers/llvmpipe/lp_bld_const.c index d36a6102342..73dc9678de8 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_const.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_const.c @@ -48,7 +48,9 @@ unsigned lp_const_shift(union lp_type type) { - if(type.fixed) + if(type.floating) + return 0; + else if(type.fixed) return type.width/2; else if(type.norm) return type.sign ? type.width - 1 : type.width;