[Mesa-dev] [PATCH] egl: wayland: bufferAge: only request a back buffer if there isn't one

Lionel Landwerlin llandwerlin at gmail.com
Sat Dec 3 22:47:17 UTC 2016


Seeing gtk+ application lockup when they query the buffer age of a surface.

Since we update the buffer age field only when creating buffers & swaping
them on the client side, there shouldn't be any need for requesting a new
back buffer if there is already one available.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84016
---
 src/egl/drivers/dri2/platform_wayland.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 395f1e1..84d9ddd 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -798,7 +798,7 @@ dri2_wl_query_buffer_age(_EGLDriver *drv,
 {
    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
 
-   if (get_back_bo(dri2_surf) < 0) {
+   if (dri2_surf->back == NULL && get_back_bo(dri2_surf) < 0) {
       _eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
       return 0;
    }
-- 
2.10.2



More information about the mesa-dev mailing list