Commit bb872831 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winevulkan: Remove now unnecessary vkGetPhysicalDeviceSurfaceCapabilitiesKHR driver entry.

parent 923f1d1b
......@@ -86,7 +86,6 @@ static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_
static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *);
static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *);
static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
static VkResult (*pvkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *);
......@@ -121,7 +120,6 @@ static void wine_vk_init(void)
LOAD_FUNCPTR(vkEnumerateInstanceExtensionProperties)
LOAD_FUNCPTR(vkGetDeviceProcAddr)
LOAD_FUNCPTR(vkGetInstanceProcAddr)
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormats2KHR)
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR)
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
......@@ -461,17 +459,6 @@ static void *macdrv_vkGetInstanceProcAddr(VkInstance instance, const char *name)
return pvkGetInstanceProcAddr(instance, name);
}
static VkResult macdrv_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice phys_dev,
VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *capabilities)
{
struct wine_vk_surface *mac_surface = surface_from_handle(surface);
TRACE("%p, 0x%s, %p\n", phys_dev, wine_dbgstr_longlong(surface), capabilities);
return pvkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev, mac_surface->host_surface,
capabilities);
}
static VkResult macdrv_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice phys_dev,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, uint32_t *count, VkSurfaceFormat2KHR *formats)
{
......@@ -561,7 +548,6 @@ static const struct vulkan_funcs vulkan_funcs =
macdrv_vkGetDeviceProcAddr,
macdrv_vkGetInstanceProcAddr,
NULL,
macdrv_vkGetPhysicalDeviceSurfaceCapabilitiesKHR,
macdrv_vkGetPhysicalDeviceSurfaceFormats2KHR,
macdrv_vkGetPhysicalDeviceSurfaceFormatsKHR,
macdrv_vkGetPhysicalDeviceWin32PresentationSupportKHR,
......
......@@ -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 = 15
DRIVER_VERSION = 16
# Table of functions for which we have a special implementation.
# These are regular device / instance functions for which we need
......@@ -204,7 +204,6 @@ USER_DRIVER_FUNCS = {
"vkGetDeviceProcAddr",
"vkGetInstanceProcAddr",
"vkGetPhysicalDevicePresentRectanglesKHR",
"vkGetPhysicalDeviceSurfaceCapabilitiesKHR",
"vkGetPhysicalDeviceSurfaceFormats2KHR",
"vkGetPhysicalDeviceSurfaceFormatsKHR",
"vkGetPhysicalDeviceWin32PresentationSupportKHR",
......
......@@ -1559,7 +1559,7 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea
/* Windows allows client rect to be empty, but host Vulkan often doesn't, adjust extents back to the host capabilities */
res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device->host_physical_device,
surface->driver_surface, &capabilities);
surface->host_surface, &capabilities);
if (res != VK_SUCCESS) return res;
create_info_host.imageExtent.width = max(create_info_host.imageExtent.width, capabilities.minImageExtent.width);
......@@ -1867,7 +1867,7 @@ VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice device_
if (!NtUserIsWindow(surface->hwnd)) return VK_ERROR_SURFACE_LOST_KHR;
res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device->host_physical_device,
surface->driver_surface, capabilities);
surface->host_surface, capabilities);
if (res == VK_SUCCESS) adjust_surface_capabilities(instance, surface, capabilities);
return res;
}
......
......@@ -61,7 +61,6 @@ static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_
static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *);
static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *);
static VkResult (*pvkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
static VkBool32 (*pvkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice, uint32_t, struct wl_display *);
......@@ -548,18 +547,6 @@ static VkResult wayland_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice
count, rects);
}
static VkResult wayland_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice phys_dev,
VkSurfaceKHR surface,
VkSurfaceCapabilitiesKHR *capabilities)
{
struct wine_vk_surface *wine_vk_surface = wine_vk_surface_from_handle(surface);
TRACE("%p, 0x%s, %p\n", phys_dev, wine_dbgstr_longlong(surface), capabilities);
return pvkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev, wine_vk_surface->host_surface,
capabilities);
}
static VkResult wayland_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice phys_dev,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info,
uint32_t *count,
......@@ -676,7 +663,6 @@ static void wine_vk_init(void)
LOAD_FUNCPTR(vkGetDeviceProcAddr);
LOAD_FUNCPTR(vkGetInstanceProcAddr);
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilitiesKHR);
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDeviceSurfaceFormats2KHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceWaylandPresentationSupportKHR);
......@@ -704,7 +690,6 @@ static const struct vulkan_funcs vulkan_funcs =
.p_vkGetDeviceProcAddr = wayland_vkGetDeviceProcAddr,
.p_vkGetInstanceProcAddr = wayland_vkGetInstanceProcAddr,
.p_vkGetPhysicalDevicePresentRectanglesKHR = wayland_vkGetPhysicalDevicePresentRectanglesKHR,
.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = wayland_vkGetPhysicalDeviceSurfaceCapabilitiesKHR,
.p_vkGetPhysicalDeviceSurfaceFormats2KHR = wayland_vkGetPhysicalDeviceSurfaceFormats2KHR,
.p_vkGetPhysicalDeviceSurfaceFormatsKHR = wayland_vkGetPhysicalDeviceSurfaceFormatsKHR,
.p_vkGetPhysicalDeviceWin32PresentationSupportKHR = wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR,
......
......@@ -84,7 +84,6 @@ static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_
static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *);
static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *);
static VkResult (*pvkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
static VkBool32 (*pvkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice, uint32_t, Display *, VisualID);
......@@ -122,7 +121,6 @@ static void wine_vk_init(void)
LOAD_FUNCPTR(vkEnumerateInstanceExtensionProperties);
LOAD_FUNCPTR(vkGetDeviceProcAddr);
LOAD_FUNCPTR(vkGetInstanceProcAddr);
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilitiesKHR);
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDeviceSurfaceFormats2KHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR);
......@@ -507,19 +505,6 @@ static VkResult X11DRV_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice
return pvkGetPhysicalDevicePresentRectanglesKHR( phys_dev, x11_surface->host_surface, count, rects );
}
static VkResult X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice phys_dev,
VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *capabilities)
{
struct wine_vk_surface *x11_surface = surface_from_handle(surface);
TRACE("%p, 0x%s, %p\n", phys_dev, wine_dbgstr_longlong(surface), capabilities);
if (!x11_surface->hwnd)
return VK_ERROR_SURFACE_LOST_KHR;
return pvkGetPhysicalDeviceSurfaceCapabilitiesKHR( phys_dev, x11_surface->host_surface, capabilities );
}
static VkResult X11DRV_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice phys_dev,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, uint32_t *count, VkSurfaceFormat2KHR *formats)
{
......@@ -634,7 +619,6 @@ static const struct vulkan_funcs vulkan_funcs =
X11DRV_vkGetDeviceProcAddr,
X11DRV_vkGetInstanceProcAddr,
X11DRV_vkGetPhysicalDevicePresentRectanglesKHR,
X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR,
X11DRV_vkGetPhysicalDeviceSurfaceFormats2KHR,
X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR,
X11DRV_vkGetPhysicalDeviceWin32PresentationSupportKHR,
......
......@@ -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 15
#define WINE_VULKAN_DRIVER_VERSION 16
struct vulkan_funcs
{
......@@ -31,7 +31,6 @@ struct vulkan_funcs
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *);
VkResult (*p_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
VkResult (*p_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *);
VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t);
......@@ -87,8 +86,6 @@ static inline void *get_vulkan_driver_instance_proc_addr(
return vulkan_funcs->p_vkGetInstanceProcAddr;
if (!strcmp(name, "GetPhysicalDevicePresentRectanglesKHR"))
return vulkan_funcs->p_vkGetPhysicalDevicePresentRectanglesKHR;
if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilitiesKHR"))
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
if (!strcmp(name, "GetPhysicalDeviceSurfaceFormats2KHR"))
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceFormats2KHR;
if (!strcmp(name, "GetPhysicalDeviceSurfaceFormatsKHR"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment