[Mesa-dev] [PATCH 03/15] vulkan: enum generator: sort enums by names

Lionel Landwerlin lionel.g.landwerlin at intel.com
Fri Sep 15 14:10:55 UTC 2017


Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/vulkan/util/gen_enum_to_str.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py
index 99ddd3cd1e6..d09e256965f 100644
--- a/src/vulkan/util/gen_enum_to_str.py
+++ b/src/vulkan/util/gen_enum_to_str.py
@@ -167,6 +167,7 @@ def main():
     args = parser.parse_args()
 
     enums = xml_parser(args.xml)
+    enums.sort(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:
-- 
2.14.1



More information about the mesa-dev mailing list