summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_wsi.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-10-14 05:14:45 +0100
committerDave Airlie <[email protected]>2016-10-19 10:15:43 +1000
commite0d15fbe1d670313132a0b71970badbcac259d78 (patch)
treeeca2fc7ebb0af8eee3029d5c38f47f857f98f29b /src/intel/vulkan/anv_wsi.c
parent4392de6771e56731b7dbea78c41102b5e8c90877 (diff)
anv/wsi/wayland: add callback to get device format properties.
This avoids having to know the toplevel API name. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi.c')
-rw-r--r--src/intel/vulkan/anv_wsi.c8
1 files changed, 7 insertions, 1 deletions
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);