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:
|
|
|
|
*
|
2020-03-21 03:39:32 +01:00
|
|
|
* Copyright (c) 2015-2020 The Khronos Group Inc.
|
2018-06-06 12:15:33 +02:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
* ---- Exceptions to the Apache 2.0 License: ----
|
|
|
|
*
|
|
|
|
* As an exception, if you use this Software to generate code and portions of
|
|
|
|
* this Software are embedded into the generated code as a result, you may
|
|
|
|
* redistribute such product without providing attribution as would otherwise
|
|
|
|
* be required by Sections 4(a), 4(b) and 4(d) of the License.
|
|
|
|
*
|
|
|
|
* In addition, if you combine or link code generated by this Software with
|
|
|
|
* software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
|
|
|
* ("`Combined Software`") and if a court of competent jurisdiction determines
|
|
|
|
* that the patent provision (Section 3), the indemnity provision (Section 9)
|
|
|
|
* or other Section of the License conflicts with the conditions of the
|
|
|
|
* applicable GPL or LGPL license, you may retroactively and prospectively
|
|
|
|
* choose to deem waived or otherwise exclude such Section(s) of the License,
|
|
|
|
* but only in their entirety and only with respect to the Combined Software.
|
|
|
|
*
|
|
|
|
*/
|
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. */
|
2020-04-07 01:58:40 +02:00
|
|
|
#define WINE_VULKAN_DRIVER_VERSION 8
|
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 *);
|
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 */
|