From 1354e3535a24accc688da39c01c966e7dbaae3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Fri, 13 Jul 2018 10:55:41 +0200 Subject: [PATCH] vulkan-1: Forward all functions directly to winevulkan. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Alexandre Julliard --- dlls/vulkan-1/vulkan-1.spec | 8 +++--- dlls/vulkan-1/vulkan.c | 50 ------------------------------------- dlls/winevulkan/make_vulkan | 7 +----- 3 files changed, 5 insertions(+), 60 deletions(-) diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec index c518343a17c..2e0597930da 100644 --- a/dlls/vulkan-1/vulkan-1.spec +++ b/dlls/vulkan-1/vulkan-1.spec @@ -146,9 +146,9 @@ @ stdcall vkEndCommandBuffer(ptr) winevulkan.wine_vkEndCommandBuffer @ stdcall vkEnumerateDeviceExtensionProperties(ptr str ptr ptr) winevulkan.wine_vkEnumerateDeviceExtensionProperties @ stdcall vkEnumerateDeviceLayerProperties(ptr ptr ptr) winevulkan.wine_vkEnumerateDeviceLayerProperties -@ stdcall vkEnumerateInstanceExtensionProperties(str ptr ptr) -@ stdcall vkEnumerateInstanceLayerProperties(ptr ptr) -@ stdcall vkEnumerateInstanceVersion(ptr) +@ stdcall vkEnumerateInstanceExtensionProperties(str ptr ptr) winevulkan.wine_vkEnumerateInstanceExtensionProperties +@ stdcall vkEnumerateInstanceLayerProperties(ptr ptr) winevulkan.wine_vkEnumerateInstanceLayerProperties +@ stdcall vkEnumerateInstanceVersion(ptr) winevulkan.wine_vkEnumerateInstanceVersion @ stdcall vkEnumeratePhysicalDeviceGroups(ptr ptr ptr) winevulkan.wine_vkEnumeratePhysicalDeviceGroups @ stdcall vkEnumeratePhysicalDevices(ptr ptr ptr) winevulkan.wine_vkEnumeratePhysicalDevices @ stdcall vkFlushMappedMemoryRanges(ptr long ptr) winevulkan.wine_vkFlushMappedMemoryRanges @@ -175,7 +175,7 @@ @ stdcall vkGetImageSparseMemoryRequirements(ptr int64 ptr ptr) winevulkan.wine_vkGetImageSparseMemoryRequirements @ stdcall vkGetImageSparseMemoryRequirements2(ptr ptr ptr ptr) winevulkan.wine_vkGetImageSparseMemoryRequirements2 @ stdcall vkGetImageSubresourceLayout(ptr int64 ptr ptr) winevulkan.wine_vkGetImageSubresourceLayout -@ stdcall vkGetInstanceProcAddr(ptr str) +@ stdcall vkGetInstanceProcAddr(ptr str) winevulkan.wine_vkGetInstanceProcAddr @ stub vkGetPhysicalDeviceDisplayPlanePropertiesKHR @ stub vkGetPhysicalDeviceDisplayPropertiesKHR @ stub vkGetPhysicalDeviceExternalBufferProperties diff --git a/dlls/vulkan-1/vulkan.c b/dlls/vulkan-1/vulkan.c index abac9e14f26..d3b35603a17 100644 --- a/dlls/vulkan-1/vulkan.c +++ b/dlls/vulkan-1/vulkan.c @@ -23,59 +23,9 @@ #include "winbase.h" #include "wine/debug.h" -#define VK_NO_PROTOTYPES -#include "wine/vulkan.h" WINE_DEFAULT_DEBUG_CHANNEL(vulkan); -VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *, uint32_t *, VkExtensionProperties *); -VkResult WINAPI wine_vkEnumerateInstanceVersion(uint32_t *); -PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance, const char *); - -VkResult WINAPI vkEnumerateInstanceExtensionProperties(const char *layer_name, - uint32_t *count, VkExtensionProperties *properties) -{ - TRACE("%p, %p, %p\n", layer_name, count, properties); - - if (layer_name) - return VK_ERROR_LAYER_NOT_PRESENT; - - return wine_vkEnumerateInstanceExtensionProperties(NULL, count, properties); -} - -VkResult WINAPI vkEnumerateInstanceVersion(uint32_t *version) -{ - TRACE("%p\n", version); - - return wine_vkEnumerateInstanceVersion(version); -} - -VkResult WINAPI vkEnumerateInstanceLayerProperties(uint32_t *count, - VkLayerProperties *properties) -{ - TRACE("%p, %p\n", count, properties); - - /* We don't support any layers. */ - *count = 0; - return VK_SUCCESS; -} - -PFN_vkVoidFunction WINAPI vkGetInstanceProcAddr(VkInstance instance, const char *name) -{ - TRACE("%p, %s\n", instance, debugstr_a(name)); - - if (!strcmp(name, "vkEnumerateInstanceExtensionProperties")) - return (PFN_vkVoidFunction)vkEnumerateInstanceExtensionProperties; - - if (!strcmp(name, "vkEnumerateInstanceLayerProperties")) - return (PFN_vkVoidFunction)vkEnumerateInstanceLayerProperties; - - if (!strcmp(name, "vkGetInstanceProcAddr")) - return (PFN_vkVoidFunction)vkGetInstanceProcAddr; - - return wine_vkGetInstanceProcAddr(instance, name); -} - BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved) { TRACE("%p, %u, %p\n", hinst, reason, reserved); diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 83c9507917c..7773f34c8a3 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2276,12 +2276,7 @@ class VkGenerator(object): # We support all Core functions except for VK_KHR_display* APIs. # Create stubs for unsupported Core functions. if func.is_required(): - # Global functions need a custom implementation, except for - # vkCreateInstance, which we can just forward. - if func.is_global_func() and func.name != "vkCreateInstance": - f.write(func.spec()) - else: - f.write(func.spec(symbol="winevulkan.wine_" + func.name)) + f.write(func.spec(symbol="winevulkan.wine_" + func.name)) else: f.write("@ stub {0}\n".format(func.name))