Derek Lesho : winevulkan: Mark members of required structs as required recursively.

Alexandre Julliard julliard at winehq.org
Mon Nov 11 16:20:21 CST 2019


Module: wine
Branch: master
Commit: 410f5623e706b5b9b914c3934c8070872bc1d3c0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=410f5623e706b5b9b914c3934c8070872bc1d3c0

Author: Derek Lesho <dlesho at codeweavers.com>
Date:   Wed Oct 30 16:12:36 2019 -0500

winevulkan: Mark members of required structs as required recursively.

Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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




More information about the wine-cvs mailing list