vulkan/wsi/wayland: remove swapchain wl_drm wrapper

The sole purpose of this wl_proxy is to set the queue to
chain->display->queue. However, wl_proxy inherit their queue from
their parent, so the original wl_drm proxy already has its queue
set up properly (inherited from wl_registry).

Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11589>
This commit is contained in:
Simon Ser 2021-06-24 20:24:28 +02:00
parent cf66ccf3f0
commit 589ea55732

View file

@ -760,8 +760,6 @@ struct wsi_wl_swapchain {
struct wl_surface * surface;
struct wl_drm * drm_wrapper;
struct wl_callback * frame;
VkExtent2D extent;
@ -982,7 +980,7 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain,
assert(image->base.drm_modifier == DRM_FORMAT_MOD_INVALID);
image->buffer =
wl_drm_create_prime_buffer(chain->drm_wrapper,
wl_drm_create_prime_buffer(display->drm.wl_drm,
image->base.fds[0], /* name */
chain->extent.width,
chain->extent.height,
@ -1023,8 +1021,6 @@ wsi_wl_swapchain_destroy(struct wsi_swapchain *wsi_chain,
wl_callback_destroy(chain->frame);
if (chain->surface)
wl_proxy_wrapper_destroy(chain->surface);
if (chain->drm_wrapper)
wl_proxy_wrapper_destroy(chain->drm_wrapper);
if (chain->display)
wsi_wl_display_unref(chain->display);
@ -1073,7 +1069,6 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
for (uint32_t i = 0; i < num_images; i++)
chain->images[i].buffer = NULL;
chain->surface = NULL;
chain->drm_wrapper = NULL;
chain->frame = NULL;
bool alpha = pCreateInfo->compositeAlpha ==
@ -1137,17 +1132,6 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
}
}
if (chain->display->drm.wl_drm) {
chain->drm_wrapper =
wl_proxy_create_wrapper(chain->display->drm.wl_drm);
if (!chain->drm_wrapper) {
result = VK_ERROR_OUT_OF_HOST_MEMORY;
goto fail;
}
wl_proxy_set_queue((struct wl_proxy *) chain->drm_wrapper,
chain->display->queue);
}
chain->fifo_ready = true;
for (uint32_t i = 0; i < chain->base.image_count; i++) {