diff options
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r-- | src/mesa/glapi/glX_proto_send.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py index 1b6a5f3890..0fa0f7e870 100644 --- a/src/mesa/glapi/glX_proto_send.py +++ b/src/mesa/glapi/glX_proto_send.py @@ -511,7 +511,7 @@ generic_%u_byte( GLint rop, const void * ptr ) return - def common_func_print_just_start(self, f): + def common_func_print_just_start(self, f, name): print ' __GLXcontext * const gc = __glXGetCurrentContext();' # The only reason that single and vendor private commands need @@ -529,7 +529,7 @@ generic_%u_byte( GLint rop, const void * ptr ) if not f.glx_rop: for p in f.parameterIterateOutputs(): - if p.is_image(): + if p.is_image() and (p.img_format != "GL_COLOR_INDEX" or p.img_type != "GL_BITMAP"): print ' const __GLXattribute * const state = gc->client_state_private;' break @@ -545,7 +545,11 @@ generic_%u_byte( GLint rop, const void * ptr ) print ' %s retval = (%s) 0;' % (f.return_type, f.return_type) + if name != None and name not in f.glx_vendorpriv_names: + print '#ifndef USE_XCB' self.emit_packet_size_calculation(f, 0) + if name != None and name not in f.glx_vendorpriv_names: + print '#endif' condition_list = [] for p in f.parameterIterateCounters(): @@ -567,7 +571,7 @@ generic_%u_byte( GLint rop, const void * ptr ) def printSingleFunction(self, f, name): - self.common_func_print_just_start(f) + self.common_func_print_just_start(f, name) if self.debug: print ' printf( "Enter %%s...\\n", "gl%s" );' % (f.name) @@ -739,7 +743,7 @@ generic_%u_byte( GLint rop, const void * ptr ) return - if self.common_func_print_just_start(f): + if self.common_func_print_just_start(f, None): trailer = " }" else: trailer = None @@ -791,7 +795,7 @@ generic_%u_byte( GLint rop, const void * ptr ) print ' generic_%u_byte( %s, %s );' % (cmdlen, f.opcode_real_name(), p.name) return - if self.common_func_print_just_start(f): + if self.common_func_print_just_start(f, None): trailer = " }" else: trailer = None |