mesa: add EXT_dsa + EXT_gpu_shader4 functions
[mesa.git] / src / mapi / glapi / gen / glX_proto_recv.py
index cf5b59c124ac3aca8afd3867e4bdb521a6060987..946f011818b01d6ed5f3b777197f12a6337eb73b 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 
 # (C) Copyright IBM Corporation 2005
 # All Rights Reserved.
@@ -55,15 +54,15 @@ class PrintGlxDispatch_h(gl_XML.gl_print_base):
             if not func.ignore and not func.vectorequiv:
                 if func.glx_rop:
                     print 'extern _X_HIDDEN void __glXDisp_%s(GLbyte * pc);' % (func.name)
-                    print 'extern _X_HIDDEN void __glXDispSwap_%s(GLbyte * pc);' % (func.name)
+                    print 'extern _X_HIDDEN _X_COLD void __glXDispSwap_%s(GLbyte * pc);' % (func.name)
                 elif func.glx_sop or func.glx_vendorpriv:
                     print 'extern _X_HIDDEN int __glXDisp_%s(struct __GLXclientStateRec *, GLbyte *);' % (func.name)
-                    print 'extern _X_HIDDEN int __glXDispSwap_%s(struct __GLXclientStateRec *, GLbyte *);' % (func.name)
+                    print 'extern _X_HIDDEN _X_COLD int __glXDispSwap_%s(struct __GLXclientStateRec *, GLbyte *);' % (func.name)
 
                     if func.glx_sop and func.glx_vendorpriv:
                         n = func.glx_vendorpriv_names[0]
                         print 'extern _X_HIDDEN int __glXDisp_%s(struct __GLXclientStateRec *, GLbyte *);' % (n)
-                        print 'extern _X_HIDDEN int __glXDispSwap_%s(struct __GLXclientStateRec *, GLbyte *);' % (n)
+                        print 'extern _X_HIDDEN _X_COLD int __glXDispSwap_%s(struct __GLXclientStateRec *, GLbyte *);' % (n)
 
         return
 
@@ -89,8 +88,6 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
         print '#include "indirect_util.h"'
         print '#include "singlesize.h"'
         print ''
-        print '#define __GLX_PAD(x)  (((x) + 3) & ~3)'
-        print ''
         print 'typedef struct {'
         print '    __GLX_PIXEL_3D_HDR;'
         print '} __GLXpixel3DHeader;'
@@ -173,11 +170,11 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
                 if t.glx_name not in already_done:
                     real_name = self.real_types[t_size]
 
-                    print 'static %s' % (t_name)
-                    print 'bswap_%s( const void * src )' % (t.glx_name)
+                    print 'static _X_UNUSED %s' % (t_name)
+                    print 'bswap_%s(const void * src)' % (t.glx_name)
                     print '{'
                     print '    union { %s dst; %s ret; } x;' % (real_name, t_name)
-                    print '    x.dst = bswap_%u( *(%s *) src );' % (t_size * 8, real_name)
+                    print '    x.dst = bswap_%u(*(%s *) src);' % (t_size * 8, real_name)
                     print '    return x.ret;'
                     print '}'
                     print ''
@@ -185,12 +182,12 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
 
         for bits in [16, 32, 64]:
             print 'static void *'
-            print 'bswap_%u_array( uint%u_t * src, unsigned count )' % (bits, bits)
+            print 'bswap_%u_array(uint%u_t * src, unsigned count)' % (bits, bits)
             print '{'
             print '    unsigned  i;'
             print ''
-            print '    for ( i = 0 ; i < count ; i++ ) {'
-            print '        uint%u_t temp = bswap_%u( src[i] );' % (bits, bits)
+            print '    for (i = 0 ; i < count ; i++) {'
+            print '        uint%u_t temp = bswap_%u(src[i]);' % (bits, bits)
             print '        src[i] = temp;'
             print '    }'
             print ''