mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
vulkan: enum generator: sort enums by names
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
parent
0ac7b84672
commit
935b42d9bc
1 changed files with 2 additions and 1 deletions
|
|
@ -185,13 +185,14 @@ def main():
|
|||
efactory = EnumFactory(VkEnum)
|
||||
for filename in args.xml_files:
|
||||
parse_xml(efactory, filename)
|
||||
enums = sorted(efactory.registry.values(), key=lambda e: e.name)
|
||||
|
||||
for template, file_ in [(C_TEMPLATE, os.path.join(args.outdir, 'vk_enum_to_str.c')),
|
||||
(H_TEMPLATE, os.path.join(args.outdir, 'vk_enum_to_str.h'))]:
|
||||
with open(file_, 'wb') as f:
|
||||
f.write(template.render(
|
||||
file=os.path.basename(__file__),
|
||||
enums=efactory.registry.values(),
|
||||
enums=enums,
|
||||
copyright=COPYRIGHT,
|
||||
FOREIGN_ENUM_VALUES=FOREIGN_ENUM_VALUES))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue