[PATCH] winevulkan: Mark members of required structs as required recursively.

Derek Lesho dlesho at codeweavers.com
Wed Oct 30 16:12:36 CDT 2019


This should remove the need for Liam's workaround.

Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
---
 dlls/winevulkan/make_vulkan | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 4f1c03cc7c..3b80005c58 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2718,6 +2718,16 @@ class VkRegistry(object):
         elif "value" in enum_elem.keys():
             self.consts.append(VkConstant(enum_elem.attrib["name"], enum_elem.attrib["value"]))
 
+    @staticmethod
+    def _require_type(type_info):
+        if type_info.is_alias():
+            type_info = type_info.alias
+        type_info.required = True
+        if type(type_info) == VkStruct:
+            for member in type_info.members:
+                if "data" in member.type_info:
+                  VkRegistry._require_type(member.type_info["data"])
+
     def _parse_extensions(self, root):
         """ Parse extensions section and pull in any types and commands for this extensioin. """
         extensions = []
@@ -2771,10 +2781,7 @@ class VkRegistry(object):
 
                 for t in require.findall("type"):
                     type_info = self.types[t.attrib["name"]]["data"]
-                    if type_info.is_alias():
-                        type_info = type_info.alias
-                    type_info.required = True
-
+                    self._require_type(type_info)
                 feature = require.attrib.get("feature")
                 if feature and not self._is_feature_supported(feature):
                     continue
-- 
2.23.0




More information about the wine-devel mailing list