llvmpipe: Fix floating point const scale factor.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 7 Aug 2009 08:28:58 +0000 (09:28 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:24 +0000 (09:21 +0100)
src/gallium/drivers/llvmpipe/lp_bld_const.c

index d36a61023426c93508cc260c10022431c4fd8441..73dc9678de8aa8a9af790df11020b7b5149d3054 100644 (file)
@@ -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;