summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-11-16 12:49:27 -0800
committerJason Ekstrand <[email protected]>2017-12-04 10:04:19 -0800
commit0a10e3770f79e5e5c450e31ff1bfc2d045940b56 (patch)
tree0fc4cf9b249721814b9bc7bf57d7d6f90b8b4c4d /src/intel
parent2e3e55110b0b528f23339453e9acf73513dfd6bb (diff)
vulkan/wsi: Initialize individual WSI interfaces in wsi_device_init
Now that we have anv_device_init/finish functions, there's no reason to have the individual driver do any more work than that. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_wsi.c36
1 files changed, 6 insertions, 30 deletions
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index add983f4ab2..6082c3dd093 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -36,41 +36,17 @@ anv_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
VkResult
anv_init_wsi(struct anv_physical_device *physical_device)
{
- VkResult result;
-
- wsi_device_init(&physical_device->wsi_device,
- anv_physical_device_to_handle(physical_device),
- anv_wsi_proc_addr);
-
-#ifdef VK_USE_PLATFORM_XCB_KHR
- result = wsi_x11_init_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
- if (result != VK_SUCCESS)
- return result;
-#endif
-
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
- result = wsi_wl_init_wsi(&physical_device->wsi_device, &physical_device->instance->alloc,
- anv_physical_device_to_handle(physical_device));
- if (result != VK_SUCCESS) {
-#ifdef VK_USE_PLATFORM_XCB_KHR
- wsi_x11_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
-#endif
- return result;
- }
-#endif
-
- return VK_SUCCESS;
+ return wsi_device_init(&physical_device->wsi_device,
+ anv_physical_device_to_handle(physical_device),
+ anv_wsi_proc_addr,
+ &physical_device->instance->alloc);
}
void
anv_finish_wsi(struct anv_physical_device *physical_device)
{
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
- wsi_wl_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
-#endif
-#ifdef VK_USE_PLATFORM_XCB_KHR
- wsi_x11_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
-#endif
+ wsi_device_finish(&physical_device->wsi_device,
+ &physical_device->instance->alloc);
}
void anv_DestroySurfaceKHR(