diff options
author | Ian Romanick <[email protected]> | 2004-12-21 21:26:36 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-12-21 21:26:36 +0000 |
commit | 1d27084043855d2609b54d3435f0bd85e39762e2 (patch) | |
tree | c125fec1fd916feb80433d7c65a03fc7d5df8de4 /src/mesa/glapi/glX_proto_send.py | |
parent | b756990b8407d67a15cf7f63683d50dd7f9e3a4e (diff) |
Added some comments and fixed typeos. Slightly refactored the way
function parameters are iterated. There are no changes in the generated
code.
Diffstat (limited to 'src/mesa/glapi/glX_proto_send.py')
-rw-r--r-- | src/mesa/glapi/glX_proto_send.py | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py index 2b688ace156..418f140df45 100644 --- a/src/mesa/glapi/glX_proto_send.py +++ b/src/mesa/glapi/glX_proto_send.py @@ -153,8 +153,6 @@ generic_%u_byte( GLint rop, const void * ptr ) def common_emit_one_arg(self, p, offset, pc, indent, adjust): - if p.is_output: return - t = p.p_type if p.is_array(): src_ptr = p.name @@ -165,23 +163,16 @@ generic_%u_byte( GLint rop, const void * ptr ) % (indent, pc, offset + adjust, src_ptr, p.size_string() ) def common_emit_args(self, f, pc, indent, adjust, skip_vla): - # First emit all of the fixed-length 8-byte (i.e., GLdouble) - # parameters. - offset = 0 if skip_vla: - r = [0, 1] + r = 1 else: - r = [0, 1, 2] - - for order in r: - for p in f: - if p.is_output or p.order != order: continue - - self.common_emit_one_arg(p, offset, pc, indent, adjust) - offset += p.size() + r = 2 + for p in f.parameterIterator(1, r): + self.common_emit_one_arg(p, offset, pc, indent, adjust) + offset += p.size() return offset @@ -274,7 +265,7 @@ generic_%u_byte( GLint rop, const void * ptr ) # of data, and the protocol for this functions is very # regular. Since they are so regular and there are so many # of them, special case them with generic functions. On - # x86, this save about 26KB in the libGL.so binary. + # x86, this saves about 26KB in the libGL.so binary. if f.variable_length_parameter() == None and len(f.fn_parameters) == 1: p = f.fn_parameters[0] |