egl/wayland: don't block in swrast when updating buffers for zink
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 15 Aug 2023 16:21:24 +0000 (12:21 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 6 Oct 2023 04:53:40 +0000 (04:53 +0000)
this is broken, let vulkan wsi handle buffer management

Fixes: 74451ed3f08 ("egl/wayland: wait for compositor to release shm buffers")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24700>

src/egl/drivers/dri2/platform_wayland.c

index 5287a81..9f13c6d 100644 (file)
@@ -2416,8 +2416,8 @@ swrast_update_buffers(struct dri2_egl_surface *dri2_surf)
 
       /* wait for the compositor to release a buffer */
       if (!dri2_surf->back) {
-         if (wl_display_dispatch_queue(dri2_dpy->wl_dpy, dri2_surf->wl_queue) ==
-             -1) {
+         bool error = zink || wl_display_dispatch_queue(dri2_dpy->wl_dpy, dri2_surf->wl_queue) == -1;
+         if (error) {
             _eglError(EGL_BAD_ALLOC, "waiting for a free buffer failed");
             return -1;
          }