Liam Middlebrook : winevulkan: Don't add alias structs to struct-extensions list.

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


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

Author: Liam Middlebrook <lmiddlebrook at nvidia.com>
Date:   Wed Oct 30 13:00:00 2019 -0700

winevulkan: Don't add alias structs to struct-extensions list.

This resolves compilation errors relating to duplicate case values for
alias structures when building against spec version 1.1.106. An example
of one of these errors has been included below:
	vulkan_thunks.c: In function ‘convert_VkDeviceCreateInfo_struct_chain’:
	vulkan_thunks.c:1997:9: error: duplicate case value
	         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES:
	         ^~~~
	vulkan_thunks.c:1377:9: note: previously used here
	         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES:
         ^~~~

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

---

 dlls/winevulkan/make_vulkan | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 3b80005c58..92be0941ed 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2962,6 +2962,13 @@ class VkRegistry(object):
         for struct in structs:
             struct.set_type_info(self.types)
 
+            # Alias structures have enum values equivalent to those of the
+            # structure which they are aliased against. we need to ignore alias
+            # structs when populating the struct extensions list, otherwise we
+            # will create duplicate case entries.
+            if struct.alias:
+                continue
+
             for structextend in struct.structextends:
                 s = self.types[structextend]["data"]
                 s.struct_extensions.append(struct)




More information about the wine-cvs mailing list