vulkan: Generate defines for aliases of promoted enums
authorIván Briano <ivan.briano@intel.com>
Thu, 7 Oct 2021 18:53:27 +0000 (11:53 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 11 Oct 2021 18:14:06 +0000 (18:14 +0000)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13264>

src/vulkan/util/gen_enum_to_str.py

index 4cc6370..7357b53 100644 (file)
@@ -201,8 +201,8 @@ H_DEFINE_TEMPLATE = Template(textwrap.dedent(u"""\
       % if enum.guard:
 #ifdef ${enum.guard}
       % endif
-      % for v in enum.values.keys():
-    #define ${enum.values[v]} (${hex(v)}ULL)
+      % for n, v in enum.name_to_value.items():
+    #define ${n} (${hex(v)}ULL)
       % endfor
       % if enum.guard:
 #endif