Georg Lehmann : winevulkan: Prevent infinite recursion in make_vulkan.

Alexandre Julliard julliard at winehq.org
Wed May 11 16:10:25 CDT 2022


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

Author: Georg Lehmann <dadschoorse at gmail.com>
Date:   Tue May 10 19:54:35 2022 +0200

winevulkan: Prevent infinite recursion in make_vulkan.

Signed-off-by: Georg Lehmann <dadschoorse at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winevulkan/make_vulkan | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index c26951d06b9..4348201810b 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2043,6 +2043,8 @@ class VkStruct(Sequence):
         """
 
         for m in self.members:
+            if self.name == m.type:
+                continue
             if m.needs_alignment():
                 return True
         return False
@@ -2057,6 +2059,8 @@ class VkStruct(Sequence):
             return True
 
         for m in self.members:
+            if self.name == m.type:
+                continue
             if m.needs_conversion():
                 return True
         return False
@@ -2065,6 +2069,8 @@ class VkStruct(Sequence):
         """ Returns if struct members need unwrapping of handle. """
 
         for m in self.members:
+            if self.name == m.type:
+                continue
             if m.needs_unwrapping():
                 return True
         return False
@@ -2073,11 +2079,11 @@ class VkStruct(Sequence):
         """ Check if any struct member needs some memory freeing."""
 
         for m in self.members:
+            if self.name == m.type:
+                continue
             if m.needs_free():
                 return True
 
-            continue
-
         return False
 
     def needs_struct_extensions_conversion(self):
@@ -3350,7 +3356,7 @@ class VkRegistry(object):
                 if "data" in type_info:
                     types[m.type]["data"].required = True
 
-                if type_info["category"] == "struct":
+                if type_info["category"] == "struct" and struct.name != m.type:
                     # Yay, recurse
                     mark_struct_dependencies(type_info["data"], types)
                 elif type_info["category"] == "funcpointer":




More information about the wine-cvs mailing list