Module: Mesa
Branch: staging/18.1
Commit: e89a4589c06adbaa6546e170dbcd0034c45ea287
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e89a4589c06adbaa6546e170dbcd0034c45ea287

Author: Michel Dänzer <[email protected]>
Date:   Tue Sep  4 12:18:19 2018 +0200

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: [email protected]
Bugzilla: https://bugs.freedesktop.org/106404
Bugzilla: https://bugs.freedesktop.org/107757
Tested-by: Olivier Fourdan <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
(cherry picked from commit aefac10fecc9ec70feb5923ce3200902f67182ba)

---

 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 9b787bb175..076045a72b 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1736,7 +1736,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?

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to