2018-06-06 12:15:33 +02:00
|
|
|
/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
|
|
|
|
*
|
|
|
|
* This file is generated from Vulkan vk.xml file covered
|
|
|
|
* by the following copyright and permission notice:
|
|
|
|
*
|
2021-02-15 11:18:48 +01:00
|
|
|
* Copyright 2015-2021 The Khronos Group Inc.
|
2018-06-06 12:15:33 +02:00
|
|
|
*
|
2020-06-21 21:18:52 +02:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
2018-06-06 12:15:33 +02:00
|
|
|
*
|
|
|
|
*/
|
2018-02-26 19:42:15 +01:00
|
|
|
|
|
|
|
#ifndef __WINE_VULKAN_DRIVER_H
|
|
|
|
#define __WINE_VULKAN_DRIVER_H
|
|
|
|
|
|
|
|
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
|
2021-01-26 13:32:24 +01:00
|
|
|
#define WINE_VULKAN_DRIVER_VERSION 10
|
2018-02-26 19:42:15 +01:00
|
|
|
|
|
|
|
struct vulkan_funcs
|
|
|
|
{
|
|
|
|
/* Vulkan global functions. These are the only calls at this point a graphics driver
|
|
|
|
* needs to provide. Other function calls will be provided indirectly by dispatch
|
|
|
|
* tables part of dispatchable Vulkan objects such as VkInstance or vkDevice.
|
|
|
|
*/
|
|
|
|
VkResult (*p_vkCreateInstance)(const VkInstanceCreateInfo *, const VkAllocationCallbacks *, VkInstance *);
|
2018-03-12 15:37:53 +01:00
|
|
|
VkResult (*p_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
|
|
|
VkResult (*p_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
2018-02-26 19:42:15 +01:00
|
|
|
void (*p_vkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
|
2018-03-12 15:37:53 +01:00
|
|
|
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
|
|
|
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
2018-02-26 19:42:15 +01:00
|
|
|
VkResult (*p_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
|
2018-07-13 10:55:35 +02:00
|
|
|
VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
|
2018-03-09 17:48:48 +01:00
|
|
|
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
|
2018-02-26 19:42:15 +01:00
|
|
|
void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *);
|
2018-07-13 10:55:35 +02:00
|
|
|
VkResult (*p_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
|
2020-04-07 01:58:40 +02:00
|
|
|
VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *);
|
2018-03-12 15:37:53 +01:00
|
|
|
VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
|
2020-04-07 01:58:40 +02:00
|
|
|
VkResult (*p_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *);
|
2018-03-12 15:37:53 +01:00
|
|
|
VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
|
|
|
|
VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *);
|
|
|
|
VkResult (*p_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *);
|
|
|
|
VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t);
|
|
|
|
VkResult (*p_vkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *);
|
|
|
|
VkResult (*p_vkQueuePresentKHR)(VkQueue, const VkPresentInfoKHR *);
|
2021-01-26 13:32:24 +01:00
|
|
|
|
|
|
|
/* winevulkan specific functions */
|
|
|
|
VkSurfaceKHR (*p_wine_get_native_surface)(VkSurfaceKHR);
|
2018-02-26 19:42:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct vulkan_funcs * CDECL __wine_get_vulkan_driver(HDC hdc, UINT version);
|
|
|
|
|
2018-07-16 15:18:23 +02:00
|
|
|
static inline void *get_vulkan_driver_device_proc_addr(
|
|
|
|
const struct vulkan_funcs *vulkan_funcs, const char *name)
|
|
|
|
{
|
|
|
|
if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
|
|
|
|
|
|
|
|
name += 2;
|
|
|
|
|
|
|
|
if (!strcmp(name, "CreateSwapchainKHR"))
|
|
|
|
return vulkan_funcs->p_vkCreateSwapchainKHR;
|
|
|
|
if (!strcmp(name, "DestroySwapchainKHR"))
|
|
|
|
return vulkan_funcs->p_vkDestroySwapchainKHR;
|
|
|
|
if (!strcmp(name, "GetDeviceGroupSurfacePresentModesKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetDeviceGroupSurfacePresentModesKHR;
|
|
|
|
if (!strcmp(name, "GetDeviceProcAddr"))
|
|
|
|
return vulkan_funcs->p_vkGetDeviceProcAddr;
|
|
|
|
if (!strcmp(name, "GetSwapchainImagesKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetSwapchainImagesKHR;
|
|
|
|
if (!strcmp(name, "QueuePresentKHR"))
|
|
|
|
return vulkan_funcs->p_vkQueuePresentKHR;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void *get_vulkan_driver_instance_proc_addr(
|
|
|
|
const struct vulkan_funcs *vulkan_funcs, VkInstance instance, const char *name)
|
|
|
|
{
|
|
|
|
if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
|
|
|
|
|
|
|
|
name += 2;
|
|
|
|
|
|
|
|
if (!strcmp(name, "CreateInstance"))
|
|
|
|
return vulkan_funcs->p_vkCreateInstance;
|
|
|
|
if (!strcmp(name, "EnumerateInstanceExtensionProperties"))
|
|
|
|
return vulkan_funcs->p_vkEnumerateInstanceExtensionProperties;
|
|
|
|
|
|
|
|
if (!instance) return NULL;
|
|
|
|
|
|
|
|
if (!strcmp(name, "CreateWin32SurfaceKHR"))
|
|
|
|
return vulkan_funcs->p_vkCreateWin32SurfaceKHR;
|
|
|
|
if (!strcmp(name, "DestroyInstance"))
|
|
|
|
return vulkan_funcs->p_vkDestroyInstance;
|
|
|
|
if (!strcmp(name, "DestroySurfaceKHR"))
|
|
|
|
return vulkan_funcs->p_vkDestroySurfaceKHR;
|
|
|
|
if (!strcmp(name, "GetInstanceProcAddr"))
|
|
|
|
return vulkan_funcs->p_vkGetInstanceProcAddr;
|
|
|
|
if (!strcmp(name, "GetPhysicalDevicePresentRectanglesKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDevicePresentRectanglesKHR;
|
2020-04-07 01:58:40 +02:00
|
|
|
if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2KHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceCapabilities2KHR;
|
2018-07-16 15:18:23 +02:00
|
|
|
if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilitiesKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
|
2020-04-07 01:58:40 +02:00
|
|
|
if (!strcmp(name, "GetPhysicalDeviceSurfaceFormats2KHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceFormats2KHR;
|
2018-07-16 15:18:23 +02:00
|
|
|
if (!strcmp(name, "GetPhysicalDeviceSurfaceFormatsKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceFormatsKHR;
|
|
|
|
if (!strcmp(name, "GetPhysicalDeviceSurfacePresentModesKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDeviceSurfacePresentModesKHR;
|
|
|
|
if (!strcmp(name, "GetPhysicalDeviceSurfaceSupportKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceSupportKHR;
|
|
|
|
if (!strcmp(name, "GetPhysicalDeviceWin32PresentationSupportKHR"))
|
|
|
|
return vulkan_funcs->p_vkGetPhysicalDeviceWin32PresentationSupportKHR;
|
|
|
|
|
|
|
|
name -= 2;
|
|
|
|
|
|
|
|
return get_vulkan_driver_device_proc_addr(vulkan_funcs, name);
|
|
|
|
}
|
|
|
|
|
2018-02-26 19:42:15 +01:00
|
|
|
#endif /* __WINE_VULKAN_DRIVER_H */
|