From 0bd5373d94c9b74a7b724d74e2b2bc94c8d5bd77 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 6 Mar 2005 08:55:39 +0000 Subject: Actually *use* the count_scale value associated with a parameter. --- src/mesa/glapi/gl_XML.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/mesa/glapi/gl_XML.py') diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py index 03aa982ac2..3f87a5712a 100644 --- a/src/mesa/glapi/gl_XML.py +++ b/src/mesa/glapi/gl_XML.py @@ -175,6 +175,8 @@ class glParameter( glItem ): self.p_count = 0 self.counter = c + self.count_scale = int(attrs.get('count_scale', "1")) + if attrs.get('counter', "false") == "true": self.is_counter = 1 else: @@ -296,7 +298,7 @@ class glParameter( glItem ): elif self.p_count == 0: return self.p_type.size else: - return self.p_type.size * self.p_count + return self.p_type.size * self.p_count * self.count_scale def size_string(self): s = self.size() @@ -310,11 +312,17 @@ class glParameter( glItem ): if b_prod == 0: b_prod = 1 if not self.count_parameter_list and self.counter != None: - a_prod = self.counter + if self.count_scale > 1: + a_prod = '(%s * %u)' % (self.counter, self.count_scale) + else: + a_prod = self.counter elif self.count_parameter_list and self.counter == None: pass elif self.count_parameter_list and self.counter != None: - b_prod = self.counter + if self.count_scale > 1: + b_prod = '(%s * %u)' % (self.counter, self.count_scale) + else: + b_prod = self.counter elif self.width: return "compsize" else: -- cgit v1.2.3