[PATCH 1/2] winevulkan: Skip commands which are declared but not defined.

Liam Middlebrook lmiddlebrook at nvidia.com
Mon Jan 25 09:16:34 CST 2021


Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>
Signed-off-by: Piers Daniell <pdaniell at nvidia.com>
---
 dlls/winevulkan/make_vulkan | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 40978a8fc7a..f4c5065ccd9 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2936,7 +2936,13 @@ class VkRegistry(object):
             commands = ext.findall("require/command")
             for command in commands:
                 cmd_name = command.attrib["name"]
-                self.funcs[cmd_name].extensions.append(ext_name)
+                # Need to verify that the command is defined, and otherwise skip it.
+                # vkCreateScreenSurfaceQNX is declared in <extensions> but not defined in
+                # <commands>. A command without a definition cannot be enabled, so it's valid for
+                # the XML file to handle this, but because of the manner in which we parse the XML
+                # file we pre-populate from <commands> before we check if a command is enabled.
+                if cmd_name in self.funcs:
+                    self.funcs[cmd_name].extensions.append(ext_name)
 
             # Some extensions are not ready or have numbers reserved as a place holder.
             if ext.attrib["supported"] == "disabled":
-- 
2.29.2




More information about the wine-devel mailing list