[Mesa-dev] [PATCH] egl/x11: Send invalidate to the driver on dri2_copy_region

Deepak Rawat drawat at vmware.com
Wed Apr 25 17:49:35 UTC 2018


Similar to what is done in dri2_x11_swap_buffers_msc send invalidate
to the driver because egl/X11 is not watching for for server's
invalidate events. The dri2_copy_region path is trigerred when
server supports DRI2 version minor 1.

Tested with piglit egl tests for regression.

Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Deepak Rawat <drawat at vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com>
---
 src/egl/drivers/dri2/platform_x11.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 6c287b4d06..e99434ea3a 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -841,6 +841,13 @@ dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
 					   render_attachment);
    free(xcb_dri2_copy_region_reply(dri2_dpy->conn, cookie, NULL));
 
+   /*
+    * Just like as done in dri2_x11_swap_buffers_msc we aren't watching for
+    * server's invalidate events, so just send invalidate to driver.
+    */
+   if (dri2_dpy->flush->base.version >= 3 && dri2_dpy->flush->invalidate)
+      dri2_dpy->flush->invalidate(dri2_surf->dri_drawable);
+
    return EGL_TRUE;
 }
 
-- 
2.17.0



More information about the mesa-dev mailing list