=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: winevulkan: Correctly recognize commands belonging to multiple extensions.

Alexandre Julliard julliard at winehq.org
Mon Jun 11 13:10:51 CDT 2018


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Mon Jun 11 12:32:49 2018 +0200

winevulkan: Correctly recognize commands belonging to multiple extensions.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/vulkan-1/vulkan-1.spec     |  4 ++++
 dlls/winevulkan/make_vulkan     | 17 +++++++----------
 dlls/winevulkan/winevulkan.spec |  4 ++++
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 0a4e85e..860b4c8 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -34,6 +34,7 @@
 # but only in their entirety and only with respect to the Combined Software.
 #
 
+@ stub vkAcquireNextImage2KHR
 @ stdcall vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr) winevulkan.wine_vkAcquireNextImageKHR
 @ stdcall vkAllocateCommandBuffers(ptr ptr ptr) winevulkan.wine_vkAllocateCommandBuffers
 @ stdcall vkAllocateDescriptorSets(ptr ptr ptr) winevulkan.wine_vkAllocateDescriptorSets
@@ -158,6 +159,8 @@
 @ stub vkGetBufferMemoryRequirements2
 @ stub vkGetDescriptorSetLayoutSupport
 @ stub vkGetDeviceGroupPeerMemoryFeatures
+@ stub vkGetDeviceGroupPresentCapabilitiesKHR
+@ stub 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
@@ -186,6 +189,7 @@
 @ stub vkGetPhysicalDeviceImageFormatProperties2
 @ stdcall vkGetPhysicalDeviceMemoryProperties(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceMemoryProperties
 @ stub vkGetPhysicalDeviceMemoryProperties2
+@ stub vkGetPhysicalDevicePresentRectanglesKHR
 @ stdcall vkGetPhysicalDeviceProperties(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceProperties
 @ stub vkGetPhysicalDeviceProperties2
 @ stdcall vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr) winevulkan.wine_vkGetPhysicalDeviceQueueFamilyProperties
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index ea64c05..47a216e 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -113,7 +113,7 @@ BLACKLISTED_EXTENSIONS = [
     "VK_KHR_external_semaphore_capabilities",
     "VK_KHR_shared_presentable_image", # Needs WSI work.
     "VK_KHR_win32_keyed_mutex",
-    "VK_NV_external_memory_win32"
+    "VK_NV_external_memory_win32",
 ]
 
 # The Vulkan loader provides entry-points for core functionality and important
@@ -123,7 +123,7 @@ CORE_EXTENSIONS = [
     "VK_KHR_display_swapchain",
     "VK_KHR_surface",
     "VK_KHR_swapchain",
-    "VK_KHR_win32_surface"
+    "VK_KHR_win32_surface",
 ]
 
 # Functions part of our winevulkan graphics driver interface.
@@ -377,8 +377,8 @@ class VkEnumValue(object):
 
 
 class VkFunction(object):
-    def __init__(self, _type=None, name=None, params=[], extension=None, alias=False):
-        self.extension = extension
+    def __init__(self, _type=None, name=None, params=[], extensions=[], alias=False):
+        self.extensions = []
         self.name = name
         self.type = _type
         self.params = params
@@ -448,13 +448,10 @@ class VkFunction(object):
         Core API as well as several KHR WSI extensions.
         """
 
-        if self.extension is None:
-            return True
-
-        if self.extension in CORE_EXTENSIONS:
+        if not self.extensions:
             return True
 
-        return False
+        return any(ext in self.extensions for ext in CORE_EXTENSIONS)
 
     def is_device_func(self):
         # If none of the other, it must be a device function
@@ -2452,7 +2449,7 @@ class VkRegistry(object):
             commands = ext.findall("require/command")
             for command in commands:
                 cmd_name = command.attrib["name"]
-                self.funcs[cmd_name].extension = ext_name
+                self.funcs[cmd_name].extensions.append(ext_name)
 
             # Some extensions are not ready or have numbers reserved as a place holder.
             if ext.attrib["supported"] == "disabled":
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index b923c64..f825079 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -36,6 +36,7 @@
 
 @ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
 @ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
+@ stub vkAcquireNextImage2KHR
 @ stdcall wine_vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr)
 @ stdcall wine_vkAllocateCommandBuffers(ptr ptr ptr)
 @ stdcall wine_vkAllocateDescriptorSets(ptr ptr ptr)
@@ -159,6 +160,8 @@
 @ stub vkGetBufferMemoryRequirements2
 @ stub vkGetDescriptorSetLayoutSupport
 @ stub vkGetDeviceGroupPeerMemoryFeatures
+@ stub vkGetDeviceGroupPresentCapabilitiesKHR
+@ stub vkGetDeviceGroupSurfacePresentModesKHR
 @ stdcall wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
 @ stdcall wine_vkGetDeviceProcAddr(ptr str)
 @ stdcall wine_vkGetDeviceQueue(ptr long long ptr)
@@ -187,6 +190,7 @@
 @ stub vkGetPhysicalDeviceImageFormatProperties2
 @ stdcall wine_vkGetPhysicalDeviceMemoryProperties(ptr ptr)
 @ stub vkGetPhysicalDeviceMemoryProperties2
+@ stub vkGetPhysicalDevicePresentRectanglesKHR
 @ stdcall wine_vkGetPhysicalDeviceProperties(ptr ptr)
 @ stub vkGetPhysicalDeviceProperties2
 @ stdcall wine_vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr)




More information about the wine-cvs mailing list