vulkan-1: Forward all functions directly to winevulkan.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-07-13 10:55:41 +02:00 committed by Alexandre Julliard
parent b75a117822
commit 1354e3535a
3 changed files with 5 additions and 60 deletions

View File

@ -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

View File

@ -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);

View File

@ -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))