glthread: autogenerate prototypes for custom-marshalled functions
[mesa.git] / src / mapi / glapi / gen / gl_marshal_h.py
index 94926b99a0f7cd5064152c76d799c924430c2a46..8a23b146e0e7a80a3d77a76b42492db647825e88 100644 (file)
@@ -63,6 +63,15 @@ class PrintCode(gl_XML.gl_print_base):
             print('   DISPATCH_CMD_{0},'.format(func.name))
         print('   NUM_DISPATCH_CMD,')
         print('};')
+        print('')
+
+        for func in api.functionIterateAll():
+            flavor = func.marshal_flavor()
+            if flavor == 'custom':
+                print('struct marshal_cmd_{0};'.format(func.name))
+                print(('void _mesa_unmarshal_{0}(struct gl_context *ctx, '
+                       'const struct marshal_cmd_{0} *cmd);').format(func.name))
+                print('void GLAPIENTRY _mesa_marshal_{0}({1});'.format(func.name, func.get_parameter_string()))
 
 
 def show_usage():