summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-09-15 15:10:55 +0100
committerJason Ekstrand <[email protected]>2017-09-22 07:47:34 -0700
commit935b42d9bc92db11a1b0d471c6de368b49a1604c (patch)
tree70ac76d39266b2d206cb2a58dde8efdf41fb79af /src/vulkan
parent0ac7b84672e094cb11922b6bd62b7e5e8ced52a8 (diff)
vulkan: enum generator: sort enums by names
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/util/gen_enum_to_str.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py
index aa7001ef13f..c615ed08c48 100644
--- a/src/vulkan/util/gen_enum_to_str.py
+++ b/src/vulkan/util/gen_enum_to_str.py
@@ -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))