From: Ian Romanick Date: Fri, 3 Dec 2004 20:24:50 +0000 (+0000) Subject: Fix a minor bug in glXEnumFunction::PrintUsingTable. Add some comments. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47719fda0c2fba13c81e84e33523d5489263182e;p=mesa.git Fix a minor bug in glXEnumFunction::PrintUsingTable. Add some comments. Add the (currently unused) utility funciton glXFunction::opcode_real_value. --- 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: