graphics/mesa-dri: fix Wayland warnings on exit after d2c3c81a53

warning: queue 0x562a5ed2cd20 destroyed while proxies still attached:
  wl_display@1 still attached

warning: queue 0x557a4efbcf70 destroyed while proxies still attached:
  zwp_linux_dmabuf_feedback_v1@18 still attached

PR:		269877
Obtained from:	upstream (mesa-23.1.0)
Exp-run by:	antoine
Approved by:	manu
This commit is contained in:
Jan Beich 2023-02-28 16:15:31 +00:00
parent 0ab18b0ed7
commit f880209f7e

View file

@ -0,0 +1,44 @@
https://gitlab.freedesktop.org/mesa/mesa/-/commit/ee5d2250fd15
https://gitlab.freedesktop.org/mesa/mesa/-/commit/689ce66a4332
--- src/egl/drivers/dri2/platform_wayland.c.orig 2023-03-08 18:37:09 UTC
+++ src/egl/drivers/dri2/platform_wayland.c
@@ -2789,10 +2789,10 @@ dri2_teardown_wayland(struct dri2_egl_display *dri2_dp
wl_shm_destroy(dri2_dpy->wl_shm);
if (dri2_dpy->wl_registry)
wl_registry_destroy(dri2_dpy->wl_registry);
- if (dri2_dpy->wl_queue)
- wl_event_queue_destroy(dri2_dpy->wl_queue);
if (dri2_dpy->wl_dpy_wrapper)
wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
+ if (dri2_dpy->wl_queue)
+ wl_event_queue_destroy(dri2_dpy->wl_queue);
if (dri2_dpy->own_device)
wl_display_disconnect(dri2_dpy->wl_dpy);
--- src/vulkan/wsi/wsi_common_wayland.c.orig 2023-03-08 18:37:09 UTC
+++ src/vulkan/wsi/wsi_common_wayland.c
@@ -1156,17 +1156,17 @@ wsi_wl_surface_destroy(VkIcdSurfaceBase *icd_surface,
struct wsi_wl_surface *wsi_wl_surface =
wl_container_of((VkIcdSurfaceWayland *)icd_surface, wsi_wl_surface, base);
- if (wsi_wl_surface->surface)
- wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
-
- if (wsi_wl_surface->display)
- wsi_wl_display_destroy(wsi_wl_surface->display);
-
if (wsi_wl_surface->wl_dmabuf_feedback) {
zwp_linux_dmabuf_feedback_v1_destroy(wsi_wl_surface->wl_dmabuf_feedback);
dmabuf_feedback_fini(&wsi_wl_surface->dmabuf_feedback);
dmabuf_feedback_fini(&wsi_wl_surface->pending_dmabuf_feedback);
}
+
+ if (wsi_wl_surface->surface)
+ wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
+
+ if (wsi_wl_surface->display)
+ wsi_wl_display_destroy(wsi_wl_surface->display);
vk_free2(&instance->alloc, pAllocator, wsi_wl_surface);
}