summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld_const.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-08-07 09:28:58 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:24 +0100
commitd52dce0ffbb165146d7b6812ff5152cbeff29a3a (patch)
treec138aec3f8fdb71f2ebf47de8fab14862ccb23fc /src/gallium/drivers/llvmpipe/lp_bld_const.c
parente6ebebc4853c98aa387b2c39a886a0c1173e93fb (diff)
llvmpipe: Fix floating point const scale factor.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_const.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_const.c4
1 files changed, 3 insertions, 1 deletions
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;