diff options
author | Marek Olšák <marek.olsak@amd.com> | 2023-12-01 02:25:21 -0500 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-12-08 04:25:52 +0000 |
commit | 64b769a1027a224808ce46aa8e1d82a19186acce (patch) | |
tree | e5bd3272a711e4df0802dba806890a2c9efde6e2 /src/mapi | |
parent | adfab9794eaa58e42f43d939554844b049bd3673 (diff) |
glthread: add a string table of function names
for printing glthread batches
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26548>
Diffstat (limited to 'src/mapi')
-rw-r--r-- | src/mapi/glapi/gen/gl_unmarshal_table.py | 13 |
1 files changed, 11 insertions, 2 deletions
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]) |