From 64b769a1027a224808ce46aa8e1d82a19186acce Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 1 Dec 2023 02:25:21 -0500 Subject: glthread: add a string table of function names for printing glthread batches Reviewed-by: Timothy Arceri Part-of: --- src/mapi/glapi/gen/gl_unmarshal_table.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/mapi') diff --git a/src/mapi/glapi/gen/gl_unmarshal_table.py b/src/mapi/glapi/gen/gl_unmarshal_table.py index 06003a9bf6b..1cd04a6d834 100644 --- a/src/mapi/glapi/gen/gl_unmarshal_table.py +++ b/src/mapi/glapi/gen/gl_unmarshal_table.py @@ -65,12 +65,21 @@ class PrintCode(gl_XML.gl_print_base): out('const _mesa_unmarshal_func _mesa_unmarshal_dispatch[NUM_DISPATCH_CMD] = {') with indent(): for func in api.functionIterateAll(): - flavor = func.marshal_flavor() - if flavor in ('skip', 'sync'): + if func.marshal_flavor() in ('skip', 'sync'): continue out('[DISPATCH_CMD_{0}] = (_mesa_unmarshal_func)_mesa_unmarshal_{0},'.format(func.name)) out('};') + # Print the string table of function names. + out('') + out('const char *_mesa_unmarshal_func_name[NUM_DISPATCH_CMD] = {') + with indent(): + for func in api.functionIterateAll(): + if func.marshal_flavor() in ('skip', 'sync'): + continue + out('[DISPATCH_CMD_{0}] = "{0}",'.format(func.name)) + out('};') + def show_usage(): print('Usage: %s [file_name]' % sys.argv[0]) -- cgit v1.2.3