mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-15 22:30:20 +01:00
glthread: don't generate the sync fallback if the call size is not variable
marshal_generated.c is 12% smaller. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3948>
This commit is contained in:
parent
a19c9290f4
commit
d93f4faefb
1 changed files with 15 additions and 11 deletions
|
|
@ -254,19 +254,23 @@ class PrintCode(gl_XML.gl_print_base):
|
|||
out('return;')
|
||||
out('}')
|
||||
|
||||
out('if (cmd_size <= MARSHAL_MAX_CMD_SIZE) {')
|
||||
if len(func.variable_params) > 0:
|
||||
with indent():
|
||||
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)
|
||||
else:
|
||||
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)
|
||||
|
||||
assert not need_fallback_sync
|
||||
out('}')
|
||||
|
||||
def print_async_body(self, func):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue