llvmpipe: Allow floating types without sign.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 8 Aug 2009 21:51:11 +0000 (22:51 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:26 +0000 (09:21 +0100)
With the meaning that all values are assumed to be positive.

src/gallium/drivers/llvmpipe/lp_bld_type.c
src/gallium/drivers/llvmpipe/lp_bld_type.h

index fd6ff99e2e6f2c3703fbf3dd8dd0578e853aecd7..8e0026fd973b21c126909c2a07bcb292c02cdfd2 100644 (file)
 #include "util/u_debug.h"
 
 #include "lp_bld_type.h"
+#include "lp_bld_const.h"
 
 
 LLVMTypeRef
 lp_build_elem_type(union lp_type type)
 {
    if (type.floating) {
-      assert(type.sign);
       switch(type.width) {
       case 32:
          return LLVMFloatType();
index c56dd3b20e856bac0eba7496b4c6fb06a50fe714..3ce566be641ebf2d922d20e29b6ca76ec894545b 100644 (file)
@@ -73,7 +73,8 @@ union lp_type {
       /** 
        * Whether it can represent negative values or not.
        *
-       * Floating point values should always have this bit set.
+       * If this is not set for floating point, it means that all values are
+       * assumed to be positive.
        */
       unsigned sign:1;