winevulkan: Support aliased constants.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Georg Lehmann 2021-10-05 15:40:36 +02:00 committed by Alexandre Julliard
parent 1554fc44c7
commit 9a65f82232
1 changed files with 7 additions and 1 deletions

View File

@ -3445,11 +3445,17 @@ class VkRegistry(object):
enum.create_alias(enum_elem.attrib["name"], enum_elem.attrib["alias"])
elif "value" in enum_elem.keys():
# Constants are not aliased, no need to add them here, they'll get added later on.
# Constant with an explicit value
if only_aliased:
return
self.consts.append(VkConstant(enum_elem.attrib["name"], enum_elem.attrib["value"]))
elif "alias" in enum_elem.keys():
# Aliased constant
if not only_aliased:
return
self.consts.append(VkConstant(enum_elem.attrib["name"], enum_elem.attrib["alias"]))
@staticmethod
def _require_type(type_info):