summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glX_XML.py
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-02-09 03:11:23 +0000
committerIan Romanick <idr@us.ibm.com>2005-02-09 03:11:23 +0000
commitd863424032deb7c6bcb3a0b906be29b573f18c2d (patch)
tree863b81c16a1e496c22cd52dcbf6492ef42a626d0 /src/mesa/glapi/glX_XML.py
parent799bc13da22e05b6554695988b16f2a79abea9d0 (diff)
Generate GLX protocol for pixel single commands.
Diffstat (limited to 'src/mesa/glapi/glX_XML.py')
-rw-r--r--src/mesa/glapi/glX_XML.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py
index 3e749790d8..3f6f841d78 100644
--- a/src/mesa/glapi/glX_XML.py
+++ b/src/mesa/glapi/glX_XML.py
@@ -304,6 +304,8 @@ class glXFunction(gl_XML.glFunction):
self.output = None
self.can_be_large = 0
self.reply_always_array = 0
+ self.dimensions_in_reply = 0
+ self.img_reset = None
self.server_handcode = 0
self.client_handcode = 0
@@ -324,6 +326,7 @@ class glXFunction(gl_XML.glFunction):
self.glx_rop = int(attrs.get('rop', "0"))
self.glx_sop = int(attrs.get('sop', "0"))
self.glx_vendorpriv = int(attrs.get('vendorpriv', "0"))
+ self.img_reset = attrs.get('img_reset', None)
# The 'handcode' attribute can be one of 'true',
# 'false', 'client', or 'server'.
@@ -365,6 +368,10 @@ class glXFunction(gl_XML.glFunction):
else:
self.reply_always_array = 0
+ if attrs.get('dimensions_in_reply', "false") == "true":
+ self.dimensions_in_reply = 1
+ else:
+ self.dimensions_in_reply = 0
else:
gl_XML.glFunction.startElement(self, name, attrs)
@@ -433,7 +440,7 @@ class glXFunction(gl_XML.glFunction):
pixel commends is zero. The offset for pixel commands depends
on the number of dimensions of the pixel data."""
- if self.image:
+ if self.image and not self.image.is_output:
[dim, junk, junk, junk, junk] = self.dimensions()
# The base size is the size of the pixel pack info
@@ -457,12 +464,12 @@ class glXFunction(gl_XML.glFunction):
size = self.offset_of_first_parameter()
for p in gl_XML.glFunction.parameterIterator(self):
- if not p.is_output:
+ if not p.is_output and p.name != self.img_reset:
size += p.size()
if self.pad_after(p):
size += 4
- if self.image and self.image.img_null_flag:
+ if self.image and (self.image.img_null_flag or self.image.is_output):
size += 4
return size