util: Fix the maximum value computation for SSCALED channels.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 6 Mar 2010 12:49:14 +0000 (12:49 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 6 Mar 2010 12:49:14 +0000 (12:49 +0000)
src/gallium/auxiliary/util/u_format_parse.py

index 80bae6fc955c0641c85bb78ef41d8168ddfa41be..f74dc5e88a41b7b82d8cb734f7df77db872d82fe 100755 (executable)
@@ -78,7 +78,7 @@ class Channel:
         if self.type == UNSIGNED:
             return (1 << self.size) - 1
         if self.type == SIGNED:
-            return self.size - 1
+            return (1 << (self.size - 1)) - 1
         assert False
     
     def min(self):