Mesa (main): vulkan/wsi/wayland: remove swapchain wl_drm wrapper
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 8 10:25:05 UTC 2021
Module: Mesa
Branch: main
Commit: 589ea55732e7eda03a00a119a5612a41ac0e2304
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=589ea55732e7eda03a00a119a5612a41ac0e2304
Author: Simon Ser <contact at emersion.fr>
Date: Thu Jun 24 20:24:28 2021 +0200
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 at emersion.fr>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11589>
---
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 4294863b55e..4ebc059a001 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++) {
More information about the mesa-commit
mailing list