From aefac10fecc9ec70feb5923ce3200902f67182ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 4 Sep 2018 12:18:19 +0200 Subject: [PATCH] loader/dri3: Only wait for back buffer fences in dri3_get_buffer We don't need to wait before drawing to the fake front buffer, as front buffer rendering by definition is allowed to produce artifacts. Fixes hangs in some cases when re-using the fake front buffer, due to it still being busy (i.e. in use for presentation). Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/106404 Bugzilla: https://bugs.freedesktop.org/107757 Tested-by: Olivier Fourdan Reviewed-by: Thomas Hellstrom --- src/loader/loader_dri3_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index b6252148583..258678a6662 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1818,7 +1818,9 @@ dri3_get_buffer(__DRIdrawable *driDrawable, buffer = new_buffer; draw->buffers[buf_id] = buffer; } - dri3_fence_await(draw->conn, draw, buffer); + + if (buffer_type == loader_dri3_buffer_back) + dri3_fence_await(draw->conn, draw, buffer); /* * Do we need to preserve the content of a previous buffer? -- 2.30.2