Reviewed-by: Marek Olšák <marek.ol...@amd.com> Marek
On Tue, Jun 6, 2017 at 7:08 AM, Timothy Arceri <tarc...@itsqueeze.com> wrote: > 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); > --- > src/mapi/glapi/gen/gl_marshal.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mapi/glapi/gen/gl_marshal.py > b/src/mapi/glapi/gen/gl_marshal.py > index 51475e1..f52b9b7 100644 > --- a/src/mapi/glapi/gen/gl_marshal.py > +++ b/src/mapi/glapi/gen/gl_marshal.py > @@ -83,21 +83,20 @@ class PrintCode(gl_XML.gl_print_base): > > def print_sync_call(self, func): > call = 'CALL_{0}(ctx->CurrentServerDispatch, ({1}))'.format( > func.name, func.get_called_parameter_string()) > if func.return_type == 'void': > out('{0};'.format(call)) > else: > 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) > > def print_sync_body(self, func): > out('/* {0}: marshalled synchronously */'.format(func.name)) > out('static {0} GLAPIENTRY'.format(func.return_type)) > out('_mesa_marshal_{0}({1})'.format(func.name, > func.get_parameter_string())) > out('{') > with indent(): > out('GET_CURRENT_CONTEXT(ctx);') > @@ -252,20 +251,21 @@ class PrintCode(gl_XML.gl_print_base): > out('if (cmd_size <= MARSHAL_MAX_CMD_SIZE) {') > with indent(): > self.print_async_dispatch(func) > out('return;') > out('}') > > out('') > if need_fallback_sync: > out('fallback_to_sync:') > with indent(): > + out('_mesa_glthread_finish(ctx);') > self.print_sync_dispatch(func) > > out('}') > > def print_async_body(self, func): > out('/* {0}: marshalled asynchronously */'.format(func.name)) > self.print_async_struct(func) > self.print_async_unmarshal(func) > self.print_async_marshal(func) > out('') > -- > 2.9.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev