From 589ea55732e7eda03a00a119a5612a41ac0e2304 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 24 Jun 2021 20:24:28 +0200 Subject: [PATCH] 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 Acked-by: Lionel Landwerlin Part-of: --- src/vulkan/wsi/wsi_common_wayland.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 4294863..4ebc059 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -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++) { -- 2.7.4