Liam Middlebrook : winevulkan: Handle bitmask pointers for spec generation.

Alexandre Julliard julliard at winehq.org
Thu Feb 6 15:44:16 CST 2020


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

Author: Liam Middlebrook <lmiddlebrook at nvidia.com>
Date:   Wed Feb  5 22:36:34 2020 -0800

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 <lmiddlebrook at nvidia.com>
Signed-off-by: James Jones <jajones at nvidia.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 88e4eb72f5..625e50ed70 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 5eebc0f3b2..52ef25948c 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 57ee94abe2..8cdf387857 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)




More information about the wine-cvs mailing list