winevulkan: Remove vkEnumerateInstanceVersion() from Vulkan driver functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d1d9d5495d
commit
5be428f560
|
@ -130,7 +130,7 @@ CORE_EXTENSIONS = [
|
||||||
# Functions part of our winevulkan graphics driver interface.
|
# Functions part of our winevulkan graphics driver interface.
|
||||||
# DRIVER_VERSION should be bumped on any change to driver interface
|
# DRIVER_VERSION should be bumped on any change to driver interface
|
||||||
# in FUNCTION_OVERRIDES
|
# in FUNCTION_OVERRIDES
|
||||||
DRIVER_VERSION = 5
|
DRIVER_VERSION = 6
|
||||||
|
|
||||||
# Table of functions for which we have a special implementation.
|
# Table of functions for which we have a special implementation.
|
||||||
# These are regular device / instance functions for which we need
|
# These are regular device / instance functions for which we need
|
||||||
|
@ -144,7 +144,7 @@ FUNCTION_OVERRIDES = {
|
||||||
# Global functions
|
# Global functions
|
||||||
"vkCreateInstance" : {"dispatch" : False, "driver" : True, "thunk" : False},
|
"vkCreateInstance" : {"dispatch" : False, "driver" : True, "thunk" : False},
|
||||||
"vkEnumerateInstanceExtensionProperties" : {"dispatch" : False, "driver" : True, "thunk" : False},
|
"vkEnumerateInstanceExtensionProperties" : {"dispatch" : False, "driver" : True, "thunk" : False},
|
||||||
"vkEnumerateInstanceVersion": {"dispatch" : False, "driver" : True, "thunk" : False},
|
"vkEnumerateInstanceVersion": {"dispatch" : False, "driver" : False, "thunk" : False},
|
||||||
"vkGetInstanceProcAddr": {"dispatch" : False, "driver" : True, "thunk" : False},
|
"vkGetInstanceProcAddr": {"dispatch" : False, "driver" : True, "thunk" : False},
|
||||||
|
|
||||||
# Instance functions
|
# Instance functions
|
||||||
|
|
|
@ -58,6 +58,7 @@ static void *wine_vk_find_struct_(void *s, VkStructureType t)
|
||||||
static void *wine_vk_get_global_proc_addr(const char *name);
|
static void *wine_vk_get_global_proc_addr(const char *name);
|
||||||
|
|
||||||
static const struct vulkan_funcs *vk_funcs;
|
static const struct vulkan_funcs *vk_funcs;
|
||||||
|
static VkResult (*p_vkEnumerateInstanceVersion)(uint32_t *version);
|
||||||
|
|
||||||
static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev)
|
static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev)
|
||||||
{
|
{
|
||||||
|
@ -322,6 +323,8 @@ static BOOL wine_vk_init(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p_vkEnumerateInstanceVersion = vk_funcs->p_vkGetInstanceProcAddr(NULL, "vkEnumerateInstanceVersion");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -849,7 +852,16 @@ VkResult WINAPI wine_vkEnumerateInstanceVersion(uint32_t *version)
|
||||||
|
|
||||||
TRACE("%p\n", version);
|
TRACE("%p\n", version);
|
||||||
|
|
||||||
res = vk_funcs->p_vkEnumerateInstanceVersion(version);
|
if (p_vkEnumerateInstanceVersion)
|
||||||
|
{
|
||||||
|
res = p_vkEnumerateInstanceVersion(version);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*version = VK_API_VERSION_1_0;
|
||||||
|
res = VK_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("API version %u.%u.%u.\n",
|
TRACE("API version %u.%u.%u.\n",
|
||||||
VK_VERSION_MAJOR(*version), VK_VERSION_MINOR(*version), VK_VERSION_PATCH(*version));
|
VK_VERSION_MAJOR(*version), VK_VERSION_MINOR(*version), VK_VERSION_PATCH(*version));
|
||||||
*version = min(WINE_VK_VERSION, *version);
|
*version = min(WINE_VK_VERSION, *version);
|
||||||
|
@ -1117,6 +1129,8 @@ VkResult WINAPI wine_vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance,
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved)
|
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved)
|
||||||
{
|
{
|
||||||
|
TRACE("%p, %u, %p\n", hinst, reason, reserved);
|
||||||
|
|
||||||
switch (reason)
|
switch (reason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
|
|
@ -82,7 +82,6 @@ static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
|
||||||
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||||
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
||||||
static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
|
static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
|
||||||
static VkResult (*pvkEnumerateInstanceVersion)(uint32_t *);
|
|
||||||
static VkResult (*pvkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
|
static VkResult (*pvkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
|
||||||
static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *);
|
static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *);
|
||||||
static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *);
|
static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *);
|
||||||
|
@ -132,7 +131,6 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
|
||||||
LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR)
|
LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR)
|
||||||
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
|
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
|
||||||
LOAD_FUNCPTR(vkQueuePresentKHR)
|
LOAD_FUNCPTR(vkQueuePresentKHR)
|
||||||
LOAD_OPTIONAL_FUNCPTR(vkEnumerateInstanceVersion)
|
|
||||||
LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR)
|
LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR)
|
||||||
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR)
|
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR)
|
||||||
#undef LOAD_FUNCPTR
|
#undef LOAD_FUNCPTR
|
||||||
|
@ -426,19 +424,6 @@ static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *layer_
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VkResult X11DRV_vkEnumerateInstanceVersion(uint32_t *version)
|
|
||||||
{
|
|
||||||
TRACE("%p\n", version);
|
|
||||||
|
|
||||||
if (!pvkEnumerateInstanceVersion)
|
|
||||||
{
|
|
||||||
*version = VK_API_VERSION_1_0;
|
|
||||||
return VK_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pvkEnumerateInstanceVersion(version);
|
|
||||||
}
|
|
||||||
|
|
||||||
static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device,
|
static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device,
|
||||||
VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *flags)
|
VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *flags)
|
||||||
{
|
{
|
||||||
|
@ -555,7 +540,6 @@ static const struct vulkan_funcs vulkan_funcs =
|
||||||
X11DRV_vkDestroySurfaceKHR,
|
X11DRV_vkDestroySurfaceKHR,
|
||||||
X11DRV_vkDestroySwapchainKHR,
|
X11DRV_vkDestroySwapchainKHR,
|
||||||
X11DRV_vkEnumerateInstanceExtensionProperties,
|
X11DRV_vkEnumerateInstanceExtensionProperties,
|
||||||
X11DRV_vkEnumerateInstanceVersion,
|
|
||||||
X11DRV_vkGetDeviceGroupSurfacePresentModesKHR,
|
X11DRV_vkGetDeviceGroupSurfacePresentModesKHR,
|
||||||
X11DRV_vkGetDeviceProcAddr,
|
X11DRV_vkGetDeviceProcAddr,
|
||||||
X11DRV_vkGetInstanceProcAddr,
|
X11DRV_vkGetInstanceProcAddr,
|
||||||
|
@ -612,8 +596,6 @@ static void *get_vulkan_driver_instance_proc_addr(const struct vulkan_funcs *vul
|
||||||
return vulkan_funcs->p_vkCreateInstance;
|
return vulkan_funcs->p_vkCreateInstance;
|
||||||
if (!strcmp(name, "EnumerateInstanceExtensionProperties"))
|
if (!strcmp(name, "EnumerateInstanceExtensionProperties"))
|
||||||
return vulkan_funcs->p_vkEnumerateInstanceExtensionProperties;
|
return vulkan_funcs->p_vkEnumerateInstanceExtensionProperties;
|
||||||
if (!strcmp(name, "EnumerateInstanceVersion"))
|
|
||||||
return vulkan_funcs->p_vkEnumerateInstanceVersion;
|
|
||||||
|
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#define __WINE_VULKAN_DRIVER_H
|
#define __WINE_VULKAN_DRIVER_H
|
||||||
|
|
||||||
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
|
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
|
||||||
#define WINE_VULKAN_DRIVER_VERSION 5
|
#define WINE_VULKAN_DRIVER_VERSION 6
|
||||||
|
|
||||||
struct vulkan_funcs
|
struct vulkan_funcs
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,6 @@ struct vulkan_funcs
|
||||||
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||||
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
|
||||||
VkResult (*p_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
|
VkResult (*p_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
|
||||||
VkResult (*p_vkEnumerateInstanceVersion)(uint32_t *);
|
|
||||||
VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
|
VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
|
||||||
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
|
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
|
||||||
void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *);
|
void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *);
|
||||||
|
|
Loading…
Reference in New Issue