Commit 03f5fcd9 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

winewayland.drv: Implement vkGetPhysicalDeviceWin32PresentationSupportKHR.

This is a simple passthrough implementation to the corresponding Vulkan Wayland extension.
parent c35be65d
...@@ -66,6 +66,7 @@ static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, cons ...@@ -66,6 +66,7 @@ static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, cons
static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
static VkResult (*pvkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *); static VkResult (*pvkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *); static VkResult (*pvkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *);
static VkBool32 (*pvkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice, uint32_t, struct wl_display *);
static void *vulkan_handle; static void *vulkan_handle;
static const struct vulkan_funcs vulkan_funcs; static const struct vulkan_funcs vulkan_funcs;
...@@ -166,6 +167,8 @@ static const char *wine_vk_native_fn_name(const char *name) ...@@ -166,6 +167,8 @@ static const char *wine_vk_native_fn_name(const char *name)
{ {
if (!strcmp(name, "vkCreateWin32SurfaceKHR")) if (!strcmp(name, "vkCreateWin32SurfaceKHR"))
return "vkCreateWaylandSurfaceKHR"; return "vkCreateWaylandSurfaceKHR";
if (!strcmp(name, "vkGetPhysicalDeviceWin32PresentationSupportKHR"))
return "vkGetPhysicalDeviceWaylandPresentationSupportKHR";
return name; return name;
} }
...@@ -612,6 +615,15 @@ static VkResult wayland_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice ph ...@@ -612,6 +615,15 @@ static VkResult wayland_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice ph
supported); supported);
} }
static VkBool32 wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice phys_dev,
uint32_t index)
{
TRACE("%p %u\n", phys_dev, index);
return pvkGetPhysicalDeviceWaylandPresentationSupportKHR(phys_dev, index,
process_wayland.wl_display);
}
static VkSurfaceKHR wayland_wine_get_native_surface(VkSurfaceKHR surface) static VkSurfaceKHR wayland_wine_get_native_surface(VkSurfaceKHR surface)
{ {
return wine_vk_surface_from_handle(surface)->native; return wine_vk_surface_from_handle(surface)->native;
...@@ -642,6 +654,7 @@ static void wine_vk_init(void) ...@@ -642,6 +654,7 @@ static void wine_vk_init(void)
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR); LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfacePresentModesKHR); LOAD_FUNCPTR(vkGetPhysicalDeviceSurfacePresentModesKHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceSupportKHR); LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceSupportKHR);
LOAD_FUNCPTR(vkGetPhysicalDeviceWaylandPresentationSupportKHR);
#undef LOAD_FUNCPTR #undef LOAD_FUNCPTR
#undef LOAD_OPTIONAL_FUNCPTR #undef LOAD_OPTIONAL_FUNCPTR
...@@ -669,6 +682,7 @@ static const struct vulkan_funcs vulkan_funcs = ...@@ -669,6 +682,7 @@ static const struct vulkan_funcs vulkan_funcs =
.p_vkGetPhysicalDeviceSurfaceFormatsKHR = wayland_vkGetPhysicalDeviceSurfaceFormatsKHR, .p_vkGetPhysicalDeviceSurfaceFormatsKHR = wayland_vkGetPhysicalDeviceSurfaceFormatsKHR,
.p_vkGetPhysicalDeviceSurfacePresentModesKHR = wayland_vkGetPhysicalDeviceSurfacePresentModesKHR, .p_vkGetPhysicalDeviceSurfacePresentModesKHR = wayland_vkGetPhysicalDeviceSurfacePresentModesKHR,
.p_vkGetPhysicalDeviceSurfaceSupportKHR = wayland_vkGetPhysicalDeviceSurfaceSupportKHR, .p_vkGetPhysicalDeviceSurfaceSupportKHR = wayland_vkGetPhysicalDeviceSurfaceSupportKHR,
.p_vkGetPhysicalDeviceWin32PresentationSupportKHR = wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR,
.p_wine_get_native_surface = wayland_wine_get_native_surface, .p_wine_get_native_surface = wayland_wine_get_native_surface,
}; };
......
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