winevulkan: Skip extensions that require a skipped extension.

Needed to skip VK_NV_acquire_winrt_display in the next version bump.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Georg Lehmann 2021-01-15 11:50:04 +01:00 committed by Alexandre Julliard
parent 7464d1042a
commit eb9f3dd3ad

View file

@ -91,7 +91,6 @@ UNSUPPORTED_EXTENSIONS = [
# Device extensions
"VK_AMD_display_native_hdr",
"VK_EXT_display_control", # Requires VK_EXT_display_surface_counter
"VK_EXT_full_screen_exclusive",
"VK_EXT_hdr_metadata", # Needs WSI work.
"VK_EXT_pipeline_creation_feedback",
@ -2893,6 +2892,7 @@ class VkRegistry(object):
extensions = []
exts = root.findall("./extensions/extension")
deferred_exts = []
skipped_exts = UNSUPPORTED_EXTENSIONS.copy()
def process_ext(ext, deferred=False):
ext_name = ext.attrib["name"]
@ -2907,6 +2907,7 @@ 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))
skipped_exts.append(ext_name)
return
# Defer extensions with 'sortorder' as they are order-dependent for spec-parsing.
@ -2919,6 +2920,7 @@ class VkRegistry(object):
# or NV.
if "KHX" in ext_name or "NVX" in ext_name:
LOGGER.debug("Skipping experimental extension: {0}".format(ext_name))
skipped_exts.append(ext_name)
return
# Extensions can define VkEnumValues which alias to provisional extensions. Pre-process
@ -2931,15 +2933,18 @@ class VkRegistry(object):
platform = ext.attrib.get("platform")
if platform and platform != "win32":
LOGGER.debug("Skipping extensions {0} for platform {1}".format(ext_name, platform))
skipped_exts.append(ext_name)
return
if not self._is_extension_supported(ext_name):
LOGGER.debug("Skipping unsupported extension: {0}".format(ext_name))
skipped_exts.append(ext_name)
return
elif "requires" in ext.attrib:
# Check if this extension builds on top of another unsupported extension.
requires = ext.attrib["requires"].split(",")
if len(set(requires).intersection(UNSUPPORTED_EXTENSIONS)) > 0:
if len(set(requires).intersection(skipped_exts)) > 0:
skipped_exts.append(ext_name)
return
LOGGER.debug("Loading extension: {0}".format(ext_name))