[Bug 97914] Redraw lag on Ivy Bridge since 1f6dfc9df678

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 15 19:11:25 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=97914

--- Comment #18 from Chris Wilson <chris at chris-wilson.co.uk> ---
Small bug in the dri3 code failed to setup the sync:

diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index f55f766..d192edf 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1103,9 +1103,9 @@ dri3_update_drawable(__DRIdrawable *driDrawable,
          draw->is_pixmap = true;
          xcb_unregister_for_special_event(draw->conn, draw->special_event);
          draw->special_event = NULL;
-
-         dri3_attach_sync(draw);
       }
+
+      dri3_attach_sync(draw);
    }
    dri3_flush_present_events(draw);
    return true;

but that alone is not enough. The bug stems from rendering done by X between
the glXWaitX() at the start of the cycle and the extraction of the damage
rectangles. In DRI2 this is papered over by the flush from glXWaitX() being
delayed until the texture-from-pixmap operation. We either need the same
invalidation (+ flush) using dri3. In compton, the issue goes away with:

diff --git a/src/opengl.c b/src/opengl.c
index 5a98f4e..5e38599 100644
--- a/src/opengl.c
+++ b/src/opengl.c
@@ -1041,6 +1041,7 @@ glx_set_clip(session_t *ps, XserverRegion reg, const
reg_data_t *pcache_reg) {
   if (!rects) {
     nrects = 0;
     rects = rects_free = XFixesFetchRegion(ps->dpy, reg, &nrects);
+    glXWaitX();
   }
   // Use one empty rectangle if the region is empty
   if (!nrects) {

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20161015/d3afee25/attachment-0001.html>


More information about the intel-gfx-bugs mailing list