include: Add IFACEMETHOD macros.
[wine.git] / include / wine / vulkan_driver.h
blob7ddba4739f49a6063e382667b6a5784bfffb642f
1 /*
2 * Copyright 2017-2018 Roderick Colenbrander
3 * Copyright 2022 Jacek Caban for CodeWeavers
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_VULKAN_DRIVER_H
21 #define __WINE_VULKAN_DRIVER_H
23 /* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
24 #define WINE_VULKAN_DRIVER_VERSION 34
26 struct vulkan_funcs
28 /* Vulkan global functions. These are the only calls at this point a graphics driver
29 * needs to provide. Other function calls will be provided indirectly by dispatch
30 * tables part of dispatchable Vulkan objects such as VkInstance or vkDevice.
32 VkResult (*p_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
33 void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
34 void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
35 void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *);
36 VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t);
37 VkResult (*p_vkQueuePresentKHR)(VkQueue, const VkPresentInfoKHR *, VkSurfaceKHR *surfaces);
39 /* winevulkan specific functions */
40 const char *(*p_get_host_surface_extension)(void);
41 VkSurfaceKHR (*p_wine_get_host_surface)(VkSurfaceKHR);
44 /* interface between win32u and the user drivers */
45 struct vulkan_driver_funcs
47 VkResult (*p_vulkan_surface_create)(HWND, VkInstance, VkSurfaceKHR *, void **);
48 void (*p_vulkan_surface_destroy)(HWND, void *);
49 void (*p_vulkan_surface_detach)(HWND, void *);
50 void (*p_vulkan_surface_presented)(HWND, VkResult);
52 VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t);
53 const char *(*p_get_host_surface_extension)(void);
56 #endif /* __WINE_VULKAN_DRIVER_H */