From 936d28e2c5f418bf30933cbad67472f1e7b068f2 Mon Sep 17 00:00:00 2001 From: Liam Middlebrook Date: Wed, 5 Feb 2020 22:36:34 -0800 Subject: [PATCH] winevulkan: Handle bitmask pointers for spec generation. Fixes a bug where pointer types for the following functions would be marked as long: vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR Signed-off-by: Liam Middlebrook Signed-off-by: James Jones Signed-off-by: Alexandre Julliard --- dlls/vulkan-1/vulkan-1.spec | 6 +++--- dlls/winevulkan/make_vulkan | 4 ++-- dlls/winevulkan/winevulkan.spec | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec index 88e4eb72f58..625e50ed704 100644 --- a/dlls/vulkan-1/vulkan-1.spec +++ b/dlls/vulkan-1/vulkan-1.spec @@ -158,9 +158,9 @@ @ stdcall vkGetBufferMemoryRequirements(ptr int64 ptr) winevulkan.wine_vkGetBufferMemoryRequirements @ stdcall vkGetBufferMemoryRequirements2(ptr ptr ptr) winevulkan.wine_vkGetBufferMemoryRequirements2 @ stdcall vkGetDescriptorSetLayoutSupport(ptr ptr ptr) winevulkan.wine_vkGetDescriptorSetLayoutSupport -@ stdcall vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long) winevulkan.wine_vkGetDeviceGroupPeerMemoryFeatures +@ stdcall vkGetDeviceGroupPeerMemoryFeatures(ptr long long long ptr) winevulkan.wine_vkGetDeviceGroupPeerMemoryFeatures @ stdcall vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr) winevulkan.wine_vkGetDeviceGroupPresentCapabilitiesKHR -@ stdcall vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long) winevulkan.wine_vkGetDeviceGroupSurfacePresentModesKHR +@ stdcall vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 ptr) winevulkan.wine_vkGetDeviceGroupSurfacePresentModesKHR @ stdcall vkGetDeviceMemoryCommitment(ptr int64 ptr) winevulkan.wine_vkGetDeviceMemoryCommitment @ stdcall vkGetDeviceProcAddr(ptr str) winevulkan.wine_vkGetDeviceProcAddr @ stdcall vkGetDeviceQueue(ptr long long ptr) winevulkan.wine_vkGetDeviceQueue @@ -198,7 +198,7 @@ @ stdcall vkGetPhysicalDeviceSparseImageFormatProperties2(ptr ptr ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSparseImageFormatProperties2 @ stdcall vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR @ stdcall vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceFormatsKHR -@ stdcall vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long) winevulkan.wine_vkGetPhysicalDeviceSurfacePresentModesKHR +@ stdcall vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr ptr) winevulkan.wine_vkGetPhysicalDeviceSurfacePresentModesKHR @ stdcall vkGetPhysicalDeviceSurfaceSupportKHR(ptr long int64 ptr) winevulkan.wine_vkGetPhysicalDeviceSurfaceSupportKHR @ stdcall vkGetPhysicalDeviceWin32PresentationSupportKHR(ptr long) winevulkan.wine_vkGetPhysicalDeviceWin32PresentationSupportKHR @ stdcall vkGetPipelineCacheData(ptr int64 ptr ptr) winevulkan.wine_vkGetPipelineCacheData diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 5eebc0f3b2b..52ef25948c8 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1491,12 +1491,12 @@ class VkParam(object): def spec(self): """ Generate spec file entry for this parameter. """ - if self.type_info["category"] in ["bitmask", "enum"]: - return "long" if self.is_pointer() and self.type == "char": return "str" if self.is_dispatchable() or self.is_pointer() or self.is_static_array(): return "ptr" + if self.type_info["category"] in ["bitmask", "enum"]: + return "long" if self.is_handle() and not self.is_dispatchable(): return "int64" if self.type == "float": diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec index 57ee94abe26..8cdf387857f 100644 --- a/dlls/winevulkan/winevulkan.spec +++ b/dlls/winevulkan/winevulkan.spec @@ -161,9 +161,9 @@ @ stdcall -private wine_vkGetBufferMemoryRequirements(ptr int64 ptr) @ stdcall -private wine_vkGetBufferMemoryRequirements2(ptr ptr ptr) @ stdcall -private wine_vkGetDescriptorSetLayoutSupport(ptr ptr ptr) -@ stdcall -private wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long) +@ stdcall -private wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long ptr) @ stdcall -private wine_vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr) -@ stdcall -private wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long) +@ stdcall -private wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 ptr) @ stdcall -private wine_vkGetDeviceMemoryCommitment(ptr int64 ptr) @ stdcall -private wine_vkGetDeviceProcAddr(ptr str) @ stdcall -private wine_vkGetDeviceQueue(ptr long long ptr) @@ -201,7 +201,7 @@ @ stdcall -private wine_vkGetPhysicalDeviceSparseImageFormatProperties2(ptr ptr ptr ptr) @ stdcall -private wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr) @ stdcall -private wine_vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr) -@ stdcall -private wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long) +@ stdcall -private wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr ptr) @ stdcall -private wine_vkGetPhysicalDeviceSurfaceSupportKHR(ptr long int64 ptr) @ stdcall -private wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(ptr long) @ stdcall -private wine_vkGetPipelineCacheData(ptr int64 ptr ptr)