glthread: sync instead of disabling glthread for non-VBO pointers
[mesa.git] / src / mapi / glapi / gen / gl_marshal.py
index 19deba7b3c13decad6c39247ff605fb5d966f1d4..3147b702c702e9721c8201c598a55ad30efbea5e 100644 (file)
@@ -270,6 +270,14 @@ class PrintCode(gl_XML.gl_print_base):
                     out('return;')
                 out('}')
 
+            if func.marshal_sync:
+                out('if ({0}) {{'.format(func.marshal_sync))
+                with indent():
+                    out('_mesa_glthread_finish_before(ctx, "{0}");'.format(func.name))
+                    self.print_sync_dispatch(func)
+                    out('return;')
+                out('}')
+
         with indent():
             self.print_async_dispatch(func)
         out('}')