glthread: remove extra _mesa_glthread_finish() from generated code
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 6 Jun 2017 05:08:16 +0000 (15:08 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 7 Jun 2017 04:53:38 +0000 (14:53 +1000)
The other user of print_sync_dispatch() was ending up with code that
looked like:

      _mesa_glthread_finish(ctx);
      _mesa_glthread_restore_dispatch(ctx);
      _mesa_glthread_finish(ctx);

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mapi/glapi/gen/gl_marshal.py

index 51475e17adffd0071394f1b954280ac2175e2ee4..f52b9b7b810499512ab76e8d2e7e1654a5057814 100644 (file)
@@ -90,7 +90,6 @@ class PrintCode(gl_XML.gl_print_base):
             out('return {0};'.format(call))
 
     def print_sync_dispatch(self, func):
-        out('_mesa_glthread_finish(ctx);')
         out('debug_print_sync_fallback("{0}");'.format(func.name))
         self.print_sync_call(func)
 
@@ -259,6 +258,7 @@ class PrintCode(gl_XML.gl_print_base):
         if need_fallback_sync:
             out('fallback_to_sync:')
         with indent():
+            out('_mesa_glthread_finish(ctx);')
             self.print_sync_dispatch(func)
 
         out('}')