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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 15 19:27:41 UTC 2016


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

--- Comment #19 from Chris Wilson <chris at chris-wilson.co.uk> ---
So to make DRI3 do the equivalent serialisation to DRI2 takes something like:

diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index d192edf..f370c87 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1430,6 +1430,15 @@ loader_dri3_get_buffers(__DRIdrawable *driDrawable,

       if (!front)
          return false;
+
+      if (draw->is_pixmap && draw->sync_fence) {
+         xshmfence_reset(draw->shm_fence);
+
+         xcb_sync_trigger_fence(draw->conn, draw->sync_fence);
+         xcb_flush(draw->conn);
+
+         xshmfence_await(draw->shm_fence);
+      }
    } else {
       dri3_free_buffers(driDrawable, loader_dri3_buffer_front, draw);
       draw->have_fake_front = 0;
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c
b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 8bcdba3..7d0c69e 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -280,6 +280,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
 {
    struct gl_framebuffer *fb = dPriv->driverPrivate;
    struct brw_context *brw = pDRICtx->driverPrivate;
+   __DRIscreen *dri_screen = pDRICtx->driScreenPriv;
    struct gl_context *ctx = &brw->ctx;
    struct intel_renderbuffer *rb;
    struct gl_texture_object *texObj;
@@ -294,7 +295,8 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
       return;

    intel_update_renderbuffers(pDRICtx, dPriv,
-                              !pDRICtx->driScreenPriv->dri2.useInvalidate);
+                              !dri_screen->dri2.useInvalidate ||
+                             dri_screen->loaderPrivate);

    rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
    /* If the miptree isn't set, then intel_update_renderbuffers was unable

(on top of the earlier patch)

-- 
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/201667f6/attachment.html>


More information about the intel-gfx-bugs mailing list