diff options
author | Ian Romanick <[email protected]> | 2004-12-03 20:24:50 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-12-03 20:24:50 +0000 |
commit | 47719fda0c2fba13c81e84e33523d5489263182e (patch) | |
tree | cde86f032955659190fab60add3265dcd8b8111d /src | |
parent | cbc527cd17f587242944158319e32187458e1651 (diff) |
Fix a minor bug in glXEnumFunction::PrintUsingTable. Add some comments.
Add the (currently unused) utility funciton glXFunction::opcode_real_value.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/glapi/glX_proto_send.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py index 452cd7f4d61..c85184d0512 100644 --- a/src/mesa/glapi/glX_proto_send.py +++ b/src/mesa/glapi/glX_proto_send.py @@ -162,7 +162,7 @@ class glXEnumFunction: masked_enums = {} masked_count = {} - for i in range(0, mask): + for i in range(0, mask + 1): masked_enums[i] = "0"; masked_count[i] = 0; @@ -381,6 +381,15 @@ class glXFunction(gl_XML.glFunction): return "%u%s" % (size, size_string) + def opcode_real_value(self): + if self.glx_vendorpriv != 0: + if self.needs_reply(): + return 17 + else: + return 16 + else: + return self.opcode_value() + def opcode_value(self): if self.glx_rop != 0: return self.glx_rop @@ -691,6 +700,13 @@ generic_%u_byte( GLint rop, const void * ptr ) def printRenderFunction(self, f): + # There is a class of GL functions that take a single pointer + # as a parameter. This pointer points to a fixed-size chunk + # 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. + if f.variable_length_parameter() == None and len(f.fn_parameters) == 1: p = f.fn_parameters[0] if p.is_pointer: |