From: Michel Dänzer Date: Tue, 4 Sep 2018 10:18:19 +0000 (+0200) Subject: loader/dri3: Only wait for back buffer fences in dri3_get_buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aefac10fecc9ec70feb5923ce3200902f67182ba;p=mesa.git 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 --- 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?