Signed-off-by: Liam Middlebrook lmiddlebrook@nvidia.com Signed-off-by: James Jones jajones@nvidia.com --- dlls/winevulkan/make_vulkan | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index a4ebb2c7e9..c88626951f 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1571,6 +1571,7 @@ class VkStruct(Sequence): self.union = union self.type_info = None # To be set later. self.struct_extensions = [] + self.aliased_by = []
def __getitem__(self, i): return self.members[i] @@ -1581,7 +1582,10 @@ class VkStruct(Sequence): @staticmethod def from_alias(struct, alias): name = struct.attrib.get("name") - return VkStruct(name, alias.members, alias.returnedonly, alias.structextends, alias=alias) + aliasee = VkStruct(name, alias.members, alias.returnedonly, alias.structextends, alias=alias) + + alias.add_aliased_by(aliasee) + return aliasee
@staticmethod def from_xml(struct): @@ -1665,6 +1669,8 @@ class VkStruct(Sequence): conv (bool, optional): enable struct conversion if the struct needs it. postfix (str, optional): text to append to end of struct name, useful for struct renaming. """ + if self.is_alias(): + return ""
if self.union: text = "typedef union {0}".format(self.name) @@ -1687,12 +1693,21 @@ class VkStruct(Sequence): if postfix is not None: text += "}} {0}{1};\n\n".format(self.name, postfix) else: - text += "}} {0};\n\n".format(self.name) + text += "}} {0};\n".format(self.name) + + for aliasee in self.aliased_by: + text += "typedef {0} {1};\n".format(self.name, aliasee.name) + + text += "\n" + return text
def is_alias(self): return bool(self.alias)
+ def add_aliased_by(self, aliasee): + self.aliased_by.append(aliasee) + def needs_alignment(self): """ Check if structure needs alignment for 64-bit data. Various structures need alignment on 64-bit variables due
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68034
Your paranoid android.
=== debiant (build log) ===
../../../wine/dlls/winevulkan/vulkan_thunks.h:1215:134: error: unknown type name ‘VkMemoryRequirements2KHR_host’; did you mean ‘VkMemoryRequirements2_host’? ../../../wine/dlls/winevulkan/vulkan.c:591:19: error: ‘struct vulkan_device_funcs’ has no member named ‘p_vkGetAccelerationStructureMemoryRequirementsNV’; did you mean ‘p_vkBindAccelerationStructureMemoryNV’? ../../../wine/dlls/winevulkan/vulkan.c:592:23: error: ‘struct vulkan_device_funcs’ has no member named ‘p_vkGetAccelerationStructureMemoryRequirementsNV’; did you mean ‘p_vkBindAccelerationStructureMemoryNV’? Task: The win32 Wine build failed
=== debiant (build log) ===
../../../wine/dlls/winevulkan/vulkan_thunks.h:1215:134: error: unknown type name ‘VkMemoryRequirements2KHR_host’; did you mean ‘VkMemoryRequirements2_host’? ../../../wine/dlls/winevulkan/vulkan.c:591:19: error: ‘struct vulkan_device_funcs’ has no member named ‘p_vkGetAccelerationStructureMemoryRequirementsNV’; did you mean ‘p_vkBindAccelerationStructureMemoryNV’? ../../../wine/dlls/winevulkan/vulkan.c:592:23: error: ‘struct vulkan_device_funcs’ has no member named ‘p_vkGetAccelerationStructureMemoryRequirementsNV’; did you mean ‘p_vkBindAccelerationStructureMemoryNV’? Task: The wow32 Wine build failed