+ out('(void) cmd;')
+
+ if func.marshal_call_after:
+ out(func.marshal_call_after);
+
+ # Uncomment this if you want to call _mesa_glthread_finish for debugging
+ #out('_mesa_glthread_finish(ctx);')
+
+ def get_type_size(self, str):
+ if str.find('*') != -1:
+ return 8;
+
+ mapping = {
+ 'GLboolean': 1,
+ 'GLbyte': 1,
+ 'GLubyte': 1,
+ 'GLenum': 2, # uses GLenum16
+ 'GLshort': 2,
+ 'GLushort': 2,
+ 'GLint': 4,
+ 'GLuint': 4,
+ 'GLbitfield': 4,
+ 'GLsizei': 4,
+ 'GLfloat': 4,
+ 'GLclampf': 4,
+ 'GLfixed': 4,
+ 'GLclampx': 4,
+ 'GLhandleARB': 4,
+ 'int': 4,
+ 'float': 4,
+ 'GLdouble': 8,
+ 'GLclampd': 8,
+ 'GLintptr': 8,
+ 'GLsizeiptr': 8,
+ 'GLint64': 8,
+ 'GLuint64': 8,
+ 'GLuint64EXT': 8,
+ 'GLsync': 8,
+ }
+ val = mapping.get(str, 9999)
+ if val == 9999:
+ print('Unhandled type in gl_marshal.py.get_type_size: ' + str, file=sys.stderr)
+ return val