diff options
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_wsi.c | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c index aa06944e95e..cb61eb66024 100644 --- a/src/amd/vulkan/radv_wsi.c +++ b/src/amd/vulkan/radv_wsi.c @@ -38,41 +38,17 @@ radv_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName) VkResult radv_init_wsi(struct radv_physical_device *physical_device) { - VkResult result; - - wsi_device_init(&physical_device->wsi_device, - radv_physical_device_to_handle(physical_device), - radv_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, - radv_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, + radv_physical_device_to_handle(physical_device), + radv_wsi_proc_addr, + &physical_device->instance->alloc); } void radv_finish_wsi(struct radv_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 radv_DestroySurfaceKHR( |