From e0d15fbe1d670313132a0b71970badbcac259d78 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 14 Oct 2016 05:14:45 +0100 Subject: anv/wsi/wayland: add callback to get device format properties. This avoids having to know the toplevel API name. Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_wsi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/intel/vulkan/anv_wsi.c') diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index bd0a19d6c5e..84edeebf0f1 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/intel/vulkan/anv_wsi.c @@ -23,6 +23,11 @@ #include "anv_wsi.h" #include "vk_format_info.h" + +static const struct anv_wsi_callbacks anv_wsi_cbs = { + .get_phys_device_format_properties = anv_GetPhysicalDeviceFormatProperties, +}; + VkResult anv_init_wsi(struct anv_physical_device *physical_device) { @@ -38,7 +43,8 @@ anv_init_wsi(struct anv_physical_device *physical_device) #ifdef VK_USE_PLATFORM_WAYLAND_KHR result = anv_wl_init_wsi(&physical_device->wsi_device, &physical_device->instance->alloc, - anv_physical_device_to_handle(physical_device)); + anv_physical_device_to_handle(physical_device), + &anv_wsi_cbs); if (result != VK_SUCCESS) { #ifdef VK_USE_PLATFORM_XCB_KHR anv_x11_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc); -- cgit v1.2.3