diff options
author | Michel Dänzer <[email protected]> | 2018-10-01 18:43:46 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2018-10-18 16:52:06 +0200 |
commit | c20ba1be1843d035f36e9794bee7aea9abfc2f8b (patch) | |
tree | 6bf06aa986e75be911fe3442fd289d20740232b9 | |
parent | 00bb42105d6edf6e432c0e3712ffb9d3eb0aece4 (diff) |
loader/dri3: Also wait for front buffer fence if we triggered it
In that case, we have to wait for the fence to synchronize with the
corresponding drawing we triggered in the X server.
Fixes incorrect display with the i965 driver and some applications, e.g.
solvespace.
Bugzilla: https://bugs.freedesktop.org/108097
Fixes: aefac10fecc9 "loader/dri3: Only wait for back buffer fences in
dri3_get_buffer"
Tested-by: Sergii Romantsov <[email protected]>
-rw-r--r-- | src/loader/loader_dri3_helper.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index f641a34e6d1..1981b5f0515 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1736,6 +1736,7 @@ dri3_get_buffer(__DRIdrawable *driDrawable, struct loader_dri3_drawable *draw) { struct loader_dri3_buffer *buffer; + bool fence_await = buffer_type == loader_dri3_buffer_back; int buf_id; if (buffer_type == loader_dri3_buffer_back) { @@ -1791,6 +1792,7 @@ dri3_get_buffer(__DRIdrawable *driDrawable, 0, 0, 0, 0, draw->width, draw->height); dri3_fence_trigger(draw->conn, new_buffer); + fence_await = true; } dri3_free_render_buffer(draw, buffer); } else if (buffer_type == loader_dri3_buffer_front) { @@ -1812,13 +1814,14 @@ dri3_get_buffer(__DRIdrawable *driDrawable, new_buffer->linear_buffer, 0, 0, draw->width, draw->height, 0, 0, 0); - } + } else + fence_await = true; } buffer = new_buffer; draw->buffers[buf_id] = buffer; } - if (buffer_type == loader_dri3_buffer_back) + if (fence_await) dri3_fence_await(draw->conn, draw, buffer); /* |