scripts: Fix codegen with hard-coded enum indices
authorMike Schuchardt <mikes@lunarg.com>
Tue, 28 Sep 2021 16:45:09 +0000 (09:45 -0700)
committerMike Schuchardt <mikes@lunarg.com>
Tue, 28 Sep 2021 22:29:55 +0000 (15:29 -0700)
commitcde128728af6983a49692051b1cf73ce8723dd9b
tree5a66b060fab7d15b01487e6ee03ae25f48af08d6
parentbd6c95c544a28893289f1ae51cf57f6e466c9562
scripts: Fix codegen with hard-coded enum indices

Currently some of the generators use a fixed child index to locate
extension enums, which will break if comment blocks are added near the
top of an extension definition. This change makes the enum lookup more
robust by searching for the expected enum name instead of using a
hard-coded offset.
scripts/mock_icd_generator.py
scripts/vulkan_tools_helper_file_generator.py