summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-03-06 08:55:39 +0000
committerIan Romanick <idr@us.ibm.com>2005-03-06 08:55:39 +0000
commit0bd5373d94c9b74a7b724d74e2b2bc94c8d5bd77 (patch)
tree4406c35e6d6c9b02a70bfc42728d2e49eae24aad /src/mesa
parent9d05d3dd308c4655673a710d0c10f09cac9c0d83 (diff)
Actually *use* the count_scale value associated with a parameter.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/glapi/gl_XML.py14
1 files changed, 11 insertions, 3 deletions
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: