Module: Mesa
Branch: main
Commit: 8aa43d70e117376ddc1c8d766437b02e1f8fdedd
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8aa43d70e117376ddc1c8d766437b02e1f8fdedd

Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Aug 15 12:21:24 2023 -0400

egl/wayland: don't block in swrast when updating buffers for zink

this is broken, let vulkan wsi handle buffer management

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

Acked-by: Daniel Stone <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24700>

---

 src/egl/drivers/dri2/platform_wayland.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_wayland.c 
b/src/egl/drivers/dri2/platform_wayland.c
index 5287a818189..9f13c6d1e6f 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -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;
          }

Reply via email to