Signed-off-by: Liam Middlebrook lmiddlebrook@nvidia.com Signed-off-by: Daniel Koch dkoch@nvidia.com --- dlls/winevulkan/make_vulkan | 3 --- 1 file changed, 3 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index ccbb74e626..482d9805cb 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2659,9 +2659,6 @@ class VkRegistry(object): elif type_info["category"] == "bitmask": mark_bitmask_dependencies(type_info["data"], self.types)
- if func.is_alias(): - func.alias.required = True - def _parse_commands(self, root): """ Parse command section containing the Vulkan function calls. """ funcs = {}
Signed-off-by: Liam Middlebrook lmiddlebrook@nvidia.com Signed-off-by: Daniel Koch dkoch@nvidia.com --- dlls/winevulkan/make_vulkan | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 482d9805cb..bbfec495ba 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2779,7 +2779,9 @@ class VkRegistry(object): """ Parse extensions section and pull in any types and commands for this extension. """ extensions = [] exts = root.findall("./extensions/extension") - for ext in exts: + deferred_exts = [] + + def process_ext(ext, deferred=False): ext_name = ext.attrib["name"]
# Set extension name on any functions calls part of this extension as we @@ -2792,29 +2794,34 @@ class VkRegistry(object): # Some extensions are not ready or have numbers reserved as a place holder. if ext.attrib["supported"] == "disabled": LOGGER.debug("Skipping disabled extension: {0}".format(ext_name)) - continue + return + + # Defer extensions with 'sortorder' as they are order-dependent for spec-parsing. + if not deferred and "sortorder" in ext.attrib: + deferred_exts.append(ext) + return
# Disable highly experimental extensions as the APIs are unstable and can # change between minor Vulkan revisions until API is final and becomes KHR # or NV. if "KHX" in ext_name or "NVX" in ext_name: LOGGER.debug("Skipping experimental extension: {0}".format(ext_name)) - continue + return
platform = ext.attrib.get("platform") if platform and platform != "win32": LOGGER.debug("Skipping extensions {0} for platform {1}".format(ext_name, platform)) - continue; + return
if not self._is_extension_supported(ext_name): LOGGER.debug("Skipping blacklisted extension: {0}".format(ext_name)) - continue + return elif "requires" in ext.attrib: # Check if this extension builds on top of another blacklisted # extension. requires = ext.attrib["requires"].split(",") if len(set(requires).intersection(BLACKLISTED_EXTENSIONS)) > 0: - continue + return
LOGGER.debug("Loading extension: {0}".format(ext_name))
@@ -2843,10 +2850,22 @@ class VkRegistry(object): cmd_name = command.attrib["name"] self._mark_command_required(cmd_name)
+ # Store a list with extensions. ext_info = {"name" : ext_name, "type" : ext.attrib["type"]} extensions.append(ext_info)
+ + # Process extensions, allowing for sortorder to defer extension processing + for ext in exts: + process_ext(ext) + + deferred_exts.sort(key=lambda ext: ext.attrib["sortorder"]) + + # Respect sortorder + for ext in deferred_exts: + process_ext(ext, deferred=True) + # Sort in alphabetical order. self.extensions = sorted(extensions, key=lambda ext: ext["name"])
Signed-off-by: Liam Middlebrook lmiddlebrook@nvidia.com Signed-off-by: Daniel Koch dkoch@nvidia.com --- dlls/winevulkan/make_vulkan | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index bbfec495ba..d855057072 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2731,10 +2731,27 @@ class VkRegistry(object):
self.enums = OrderedDict(sorted(enums.items()))
- def _process_require_enum(self, enum_elem, ext=None): + def _process_require_enum(self, enum_elem, ext=None, only_aliased=False): if "extends" in enum_elem.keys(): enum = self.types[enum_elem.attrib["extends"]]["data"]
+ # Need to define VkEnumValues which were aliased to by another value. This is necessary + # from VK spec version 1.2.135 where the provisional VK_KHR_ray_tracing extension was + # added which altered VK_NV_ray_tracing's VkEnumValues to alias to the provisional + # extension. + aliased = False + for _, t in self.types.items(): + if t["category"] != "enum": + continue + if not t["data"]: + continue + for value in t["data"].values: + if value.alias == enum_elem.attrib["name"]: + aliased = True + + if only_aliased and not aliased: + return + if "bitpos" in enum_elem.keys(): # We need to add an extra value to an existing enum type. # E.g. VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG to VkFormatFeatureFlagBits. @@ -2763,6 +2780,10 @@ class VkRegistry(object): enum.add(VkEnumValue(enum_elem.attrib["name"], alias=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. + if only_aliased: + return + self.consts.append(VkConstant(enum_elem.attrib["name"], enum_elem.attrib["value"]))
@staticmethod @@ -2808,6 +2829,13 @@ class VkRegistry(object): LOGGER.debug("Skipping experimental extension: {0}".format(ext_name)) return
+ # Extensions can define VkEnumValues which alias to provisional extensions. Pre-process + # extensions to define any required VkEnumValues before the platform check below. + for require in ext.findall("require"): + # Extensions can add enum values to Core / extension enums, so add these. + for enum_elem in require.findall("enum"): + self._process_require_enum(enum_elem, ext, only_aliased=True) + platform = ext.attrib.get("platform") if platform and platform != "win32": LOGGER.debug("Skipping extensions {0} for platform {1}".format(ext_name, platform))
Signed-off-by: Liam Middlebrook lmiddlebrook@nvidia.com Signed-off-by: Daniel Koch dkoch@nvidia.com --- dlls/winevulkan/make_vulkan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index d855057072..9cc5335c5d 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -64,7 +64,7 @@ from enum import Enum LOGGER = logging.Logger("vulkan") LOGGER.addHandler(logging.StreamHandler())
-VK_XML_VERSION = "1.2.134" +VK_XML_VERSION = "1.2.138" WINE_VK_VERSION = (1, 2)
# Filenames to create.