From f342ceca3852d5b9607d1f375be26de9304a11f6 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 6 Mar 2010 12:49:14 +0000 Subject: util: Fix the maximum value computation for SSCALED channels. --- src/gallium/auxiliary/util/u_format_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_format_parse.py b/src/gallium/auxiliary/util/u_format_parse.py index 80bae6fc95..f74dc5e88a 100755 --- a/src/gallium/auxiliary/util/u_format_parse.py +++ b/src/gallium/auxiliary/util/u_format_parse.py @@ -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): -- cgit v1.2.3