[Mesa-dev] [PATCH 2/5] vulkan: enum generator: sort enums by names

Lionel Landwerlin lionel.g.landwerlin at intel.com
Wed Jun 28 16:18:37 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 ab77ccc7c49..bf001b14582 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.13.2



More information about the mesa-dev mailing list