[03/15] vulkan: enum generator: sort enums by names

Submitted by Lionel Landwerlin on Sept. 15, 2017, 2:10 p.m.

Details

Message ID 20170915141107.2058-4-lionel.g.landwerlin@intel.com
State New
Headers show
Series "anv: implement KHR_sampler_ycbcr_conversion" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Lionel Landwerlin Sept. 15, 2017, 2:10 p.m.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 src/vulkan/util/gen_enum_to_str.py | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

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: