summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glX_proto_send.py
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-01-24 20:59:32 +0000
committerIan Romanick <idr@us.ibm.com>2005-01-24 20:59:32 +0000
commit0246b2a5c0f45788a5c418d62ccf5a3a72d16d4a (patch)
tree88cc1e47e7c582c6abb3aa523a1ba2fbc6370c90 /src/mesa/glapi/glX_proto_send.py
parent7f958e9e11badab294339c8b83e7b2e58f7dfe21 (diff)
Since only one of the places that used glXFunction::command_payload_length
actually used both values, it was refactored into command_fixed_length and command_variable_length. glXFunction::offset_of_first_parameter was also added.
Diffstat (limited to 'src/mesa/glapi/glX_proto_send.py')
-rw-r--r--src/mesa/glapi/glX_proto_send.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py
index 32d8d6082e..922531d0c8 100644
--- a/src/mesa/glapi/glX_proto_send.py
+++ b/src/mesa/glapi/glX_proto_send.py
@@ -470,18 +470,13 @@ generic_%u_byte( GLint rop, const void * ptr )
indent += " "
[dim, width, height, depth, extent] = pixel_func.dimensions()
-
- if dim < 3:
- adjust = 20 + 4
- else:
- adjust = 36 + 4
-
+ adjust = pixel_func.offset_of_first_parameter() + 4
print '%s emit_header(gc->pc, opcode, cmdlen);' % (indent)
offset = self.pixel_emit_args(pixel_func, "gc->pc", indent, adjust, dim, 0)
- [s, junk] = pixel_func.command_payload_length()
+ s = pixel_func.command_fixed_length()
pixHeaderPtr = "gc->pc + 4"
pcPtr = "gc->pc + %u" % (s + 4)
@@ -559,18 +554,13 @@ generic_%u_byte( GLint rop, const void * ptr )
indent += " "
[dim, width, height, depth, extent] = f.dimensions()
-
- if dim < 3:
- adjust = 20 + 4
- else:
- adjust = 36 + 4
-
+ adjust = f.offset_of_first_parameter() + 4
print '%s emit_header(gc->pc, %s, cmdlen);' % (indent, f.opcode_real_name())
offset = self.pixel_emit_args(f, "gc->pc", indent, adjust, dim, 0)
- [s, junk] = f.command_payload_length()
+ s = f.command_fixed_length()
pixHeaderPtr = "gc->pc + 4"
pcPtr = "gc->pc + %u" % (s + 4)
@@ -623,7 +613,7 @@ generic_%u_byte( GLint rop, const void * ptr )
if f.variable_length_parameter() == None and len(f.fn_parameters) == 1:
p = f.fn_parameters[0]
if p.is_pointer:
- [cmdlen, size_string] = f.command_payload_length()
+ cmdlen = f.command_fixed_length()
if cmdlen in self.generic_sizes:
self.common_func_print_just_header(f)
print ' generic_%u_byte( %s, %s );' % (cmdlen, f.opcode_real_name(), p.name)