summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi/gl_XML.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/glapi/gl_XML.py')
-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 03aa982ac28..3f87a5712a3 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: