diff options
author | Marek Olšák <[email protected]> | 2020-02-19 17:20:21 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-06 01:06:14 +0000 |
commit | c920572f603b5e0ac062501593a4ed6b53bc8f40 (patch) | |
tree | 7097831a033b81260f1de3e7fdd5694a2234c985 /src/mapi/glapi | |
parent | 9dbf5ec9f7844dda9d2473a3168e3f8b0009a66d (diff) |
glthread: simplify repeated function sequences in marshal_generated.c
Reviewed-by: Timothy Arceri <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
Diffstat (limited to 'src/mapi/glapi')
-rw-r--r-- | src/mapi/glapi/gen/gl_marshal.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mapi/glapi/gen/gl_marshal.py b/src/mapi/glapi/gen/gl_marshal.py index c12a086942b..5f4787cc3cc 100644 --- a/src/mapi/glapi/gen/gl_marshal.py +++ b/src/mapi/glapi/gen/gl_marshal.py @@ -87,7 +87,6 @@ class PrintCode(gl_XML.gl_print_base): out('return {0};'.format(call)) def print_sync_dispatch(self, func): - out('debug_print_sync_fallback("{0}");'.format(func.name)) self.print_sync_call(func) def print_sync_body(self, func): @@ -97,8 +96,7 @@ class PrintCode(gl_XML.gl_print_base): out('{') with indent(): out('GET_CURRENT_CONTEXT(ctx);') - out('_mesa_glthread_finish(ctx);') - out('debug_print_sync("{0}");'.format(func.name)) + out('_mesa_glthread_finish_before(ctx, "{0}");'.format(func.name)) self.print_sync_call(func) out('}') out('') @@ -247,8 +245,7 @@ class PrintCode(gl_XML.gl_print_base): if func.marshal_fail: out('if ({0}) {{'.format(func.marshal_fail)) with indent(): - out('_mesa_glthread_finish(ctx);') - out('_mesa_glthread_restore_dispatch(ctx, __func__);') + out('_mesa_glthread_disable(ctx, "{0}");'.format(func.name)) self.print_sync_dispatch(func) out('return;') out('}') @@ -264,7 +261,7 @@ class PrintCode(gl_XML.gl_print_base): if need_fallback_sync: out('fallback_to_sync:') with indent(): - out('_mesa_glthread_finish(ctx);') + out('_mesa_glthread_finish_before(ctx, "{0}");'.format(func.name)) self.print_sync_dispatch(func) else: with indent(): |