diff options
author | Dave Airlie <[email protected]> | 2016-10-13 05:14:52 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-10-19 10:15:42 +1000 |
commit | 7c10258567ca98e28b291b679fde8cd60b719579 (patch) | |
tree | 6b23a347c1ca58b16f00afa490325c764d8e668e /src/intel/vulkan/anv_wsi_wayland.c | |
parent | be61fff6da32267cb5d463197df22be8d8875ff8 (diff) |
anv/wsi: abstract wsi interfaces away from device a bit more.
This is a step towards separating out the wsi code for sharing
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi_wayland.c')
-rw-r--r-- | src/intel/vulkan/anv_wsi_wayland.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/intel/vulkan/anv_wsi_wayland.c b/src/intel/vulkan/anv_wsi_wayland.c index 2563dd75692..2c9eecfa64a 100644 --- a/src/intel/vulkan/anv_wsi_wayland.c +++ b/src/intel/vulkan/anv_wsi_wayland.c @@ -286,11 +286,11 @@ fail: } static struct wsi_wl_display * -wsi_wl_get_display(struct anv_physical_device *device, +wsi_wl_get_display(struct anv_wsi_device *wsi_device, struct wl_display *wl_display) { struct wsi_wayland *wsi = - (struct wsi_wayland *)device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND]; + (struct wsi_wayland *)wsi_device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND]; pthread_mutex_lock(&wsi->mutex); @@ -327,7 +327,7 @@ VkBool32 anv_GetPhysicalDeviceWaylandPresentationSupportKHR( { ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice); - return wsi_wl_get_display(physical_device, display) != NULL; + return wsi_wl_get_display(&physical_device->wsi_device, display) != NULL; } static VkResult @@ -380,7 +380,7 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface, { VkIcdSurfaceWayland *surface = (VkIcdSurfaceWayland *)icd_surface; struct wsi_wl_display *display = - wsi_wl_get_display(device, surface->display); + wsi_wl_get_display(&device->wsi_device, surface->display); uint32_t count = u_vector_length(&display->formats); @@ -785,7 +785,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, chain->images[i].buffer = NULL; chain->queue = NULL; - chain->display = wsi_wl_get_display(&device->instance->physicalDevice, + chain->display = wsi_wl_get_display(&device->instance->physicalDevice.wsi_device, surface->display); if (!chain->display) { result = vk_error(VK_ERROR_INITIALIZATION_FAILED); @@ -856,7 +856,7 @@ anv_wl_init_wsi(struct anv_physical_device *device) wsi->base.get_present_modes = wsi_wl_surface_get_present_modes; wsi->base.create_swapchain = wsi_wl_surface_create_swapchain; - device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND] = &wsi->base; + device->wsi_device.wsi[VK_ICD_WSI_PLATFORM_WAYLAND] = &wsi->base; return VK_SUCCESS; @@ -866,7 +866,7 @@ fail_mutex: fail_alloc: vk_free(&device->instance->alloc, wsi); fail: - device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND] = NULL; + device->wsi_device.wsi[VK_ICD_WSI_PLATFORM_WAYLAND] = NULL; return result; } @@ -875,7 +875,7 @@ void anv_wl_finish_wsi(struct anv_physical_device *device) { struct wsi_wayland *wsi = - (struct wsi_wayland *)device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND]; + (struct wsi_wayland *)device->wsi_device.wsi[VK_ICD_WSI_PLATFORM_WAYLAND]; if (wsi) { _mesa_hash_table_destroy(wsi->displays, NULL); |