From d352b852a985a4e886af4704e34640d422d48577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 27 Nov 2023 15:44:22 +0100 Subject: [PATCH] winevulkan: Remove now unnecessary vkGetDeviceGroupSurfacePresentModesKHR driver entry. --- dlls/winemac.drv/vulkan.c | 1 - dlls/winevulkan/make_vulkan | 3 +-- dlls/winevulkan/vulkan_thunks.c | 4 ++-- dlls/winewayland.drv/vulkan.c | 14 -------------- dlls/winex11.drv/vulkan.c | 13 ------------- include/wine/vulkan_driver.h | 5 +---- 6 files changed, 4 insertions(+), 36 deletions(-) diff --git a/dlls/winemac.drv/vulkan.c b/dlls/winemac.drv/vulkan.c index fe53bf15ee7..434d11542aa 100644 --- a/dlls/winemac.drv/vulkan.c +++ b/dlls/winemac.drv/vulkan.c @@ -572,7 +572,6 @@ static const struct vulkan_funcs vulkan_funcs = macdrv_vkDestroySurfaceKHR, macdrv_vkDestroySwapchainKHR, macdrv_vkEnumerateInstanceExtensionProperties, - NULL, macdrv_vkGetDeviceProcAddr, macdrv_vkGetInstanceProcAddr, NULL, diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 420c67ab000..e4a734c284b 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -160,7 +160,7 @@ PERF_CRITICAL_FUNCTIONS = [ # Functions part of our winevulkan graphics driver interface. # DRIVER_VERSION should be bumped on any change to driver interface # in FUNCTION_OVERRIDES -DRIVER_VERSION = 13 +DRIVER_VERSION = 14 # Table of functions for which we have a special implementation. # These are regular device / instance functions for which we need @@ -201,7 +201,6 @@ USER_DRIVER_FUNCS = { "vkDestroySurfaceKHR", "vkDestroySwapchainKHR", "vkEnumerateInstanceExtensionProperties", - "vkGetDeviceGroupSurfacePresentModesKHR", "vkGetDeviceProcAddr", "vkGetInstanceProcAddr", "vkGetPhysicalDevicePresentRectanglesKHR", diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 2b90c99a7f9..9cb270c9dea 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -39391,7 +39391,7 @@ static NTSTATUS thunk64_vkGetDeviceGroupSurfacePresentModesKHR(void *args) TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->surface), params->pModes); - params->result = wine_device_from_handle(params->device)->funcs.p_vkGetDeviceGroupSurfacePresentModesKHR(wine_device_from_handle(params->device)->host_device, wine_surface_from_handle(params->surface)->driver_surface, params->pModes); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetDeviceGroupSurfacePresentModesKHR(wine_device_from_handle(params->device)->host_device, wine_surface_from_handle(params->surface)->host_surface, params->pModes); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -39408,7 +39408,7 @@ static NTSTATUS thunk32_vkGetDeviceGroupSurfacePresentModesKHR(void *args) TRACE("%#x, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->surface), params->pModes); - params->result = wine_device_from_handle((VkDevice)UlongToPtr(params->device))->funcs.p_vkGetDeviceGroupSurfacePresentModesKHR(wine_device_from_handle((VkDevice)UlongToPtr(params->device))->host_device, wine_surface_from_handle(params->surface)->driver_surface, (VkDeviceGroupPresentModeFlagsKHR *)UlongToPtr(params->pModes)); + params->result = wine_device_from_handle((VkDevice)UlongToPtr(params->device))->funcs.p_vkGetDeviceGroupSurfacePresentModesKHR(wine_device_from_handle((VkDevice)UlongToPtr(params->device))->host_device, wine_surface_from_handle(params->surface)->host_surface, (VkDeviceGroupPresentModeFlagsKHR *)UlongToPtr(params->pModes)); return STATUS_SUCCESS; } diff --git a/dlls/winewayland.drv/vulkan.c b/dlls/winewayland.drv/vulkan.c index 5693294804c..c9bb8acceed 100644 --- a/dlls/winewayland.drv/vulkan.c +++ b/dlls/winewayland.drv/vulkan.c @@ -58,7 +58,6 @@ static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *); static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *); static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *); static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *); -static VkResult (*pvkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *); static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *); static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *); static VkResult (*pvkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *); @@ -545,17 +544,6 @@ static VkResult wayland_vkEnumerateInstanceExtensionProperties(const char *layer return res; } -static VkResult wayland_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, - VkSurfaceKHR surface, - VkDeviceGroupPresentModeFlagsKHR *flags) -{ - struct wine_vk_surface *wine_vk_surface = wine_vk_surface_from_handle(surface); - - TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(surface), flags); - - return pvkGetDeviceGroupSurfacePresentModesKHR(device, wine_vk_surface->host_surface, flags); -} - static void *wayland_vkGetDeviceProcAddr(VkDevice device, const char *name) { void *proc_addr; @@ -770,7 +758,6 @@ static void wine_vk_init(void) LOAD_FUNCPTR(vkDestroySurfaceKHR); LOAD_FUNCPTR(vkDestroySwapchainKHR); LOAD_FUNCPTR(vkEnumerateInstanceExtensionProperties); - LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR); LOAD_FUNCPTR(vkGetDeviceProcAddr); LOAD_FUNCPTR(vkGetInstanceProcAddr); LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR); @@ -800,7 +787,6 @@ static const struct vulkan_funcs vulkan_funcs = .p_vkDestroySurfaceKHR = wayland_vkDestroySurfaceKHR, .p_vkDestroySwapchainKHR = wayland_vkDestroySwapchainKHR, .p_vkEnumerateInstanceExtensionProperties = wayland_vkEnumerateInstanceExtensionProperties, - .p_vkGetDeviceGroupSurfacePresentModesKHR = wayland_vkGetDeviceGroupSurfacePresentModesKHR, .p_vkGetDeviceProcAddr = wayland_vkGetDeviceProcAddr, .p_vkGetInstanceProcAddr = wayland_vkGetInstanceProcAddr, .p_vkGetPhysicalDevicePresentRectanglesKHR = wayland_vkGetPhysicalDevicePresentRectanglesKHR, diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index ba10a4a2ffc..576c0788fc1 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -81,7 +81,6 @@ static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *); static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *); static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *); static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *); -static VkResult (*pvkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *); static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *); static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *); static VkResult (*pvkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *); @@ -131,7 +130,6 @@ static void wine_vk_init(void) LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR); LOAD_FUNCPTR(vkGetSwapchainImagesKHR); LOAD_FUNCPTR(vkQueuePresentKHR); - LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR); LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR); #undef LOAD_FUNCPTR #undef LOAD_OPTIONAL_FUNCPTR @@ -454,16 +452,6 @@ static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *layer_ return res; } -static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, - VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *flags) -{ - struct wine_vk_surface *x11_surface = surface_from_handle(surface); - - TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(surface), flags); - - return pvkGetDeviceGroupSurfacePresentModesKHR( device, x11_surface->host_surface, flags ); -} - static const char *wine_vk_host_fn_name( const char *name ) { if (!strcmp(name, "vkCreateWin32SurfaceKHR")) @@ -664,7 +652,6 @@ static const struct vulkan_funcs vulkan_funcs = X11DRV_vkDestroySurfaceKHR, X11DRV_vkDestroySwapchainKHR, X11DRV_vkEnumerateInstanceExtensionProperties, - X11DRV_vkGetDeviceGroupSurfacePresentModesKHR, X11DRV_vkGetDeviceProcAddr, X11DRV_vkGetInstanceProcAddr, X11DRV_vkGetPhysicalDevicePresentRectanglesKHR, diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h index 6307d37fdf6..7e2e2e5ea70 100644 --- a/include/wine/vulkan_driver.h +++ b/include/wine/vulkan_driver.h @@ -13,7 +13,7 @@ #define __WINE_VULKAN_DRIVER_H /* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */ -#define WINE_VULKAN_DRIVER_VERSION 13 +#define WINE_VULKAN_DRIVER_VERSION 14 struct vulkan_funcs { @@ -28,7 +28,6 @@ struct vulkan_funcs void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *); void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *); VkResult (*p_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *); - VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *); void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *); void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *); VkResult (*p_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *); @@ -55,8 +54,6 @@ static inline void *get_vulkan_driver_device_proc_addr( 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"))