Mesa (staging/20.0): radeonsi: make si_fence_server_signal flush pipe without work

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 13 19:01:46 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 5c0a93b6eb3ed3e32ed053bbce5bc2d22f713148
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c0a93b6eb3ed3e32ed053bbce5bc2d22f713148

Author: Peng Huang <shawn.p.huang at gmail.com>
Date:   Sat Feb  1 22:31:00 2020 -0500

radeonsi: make si_fence_server_signal flush pipe without work

glSignalSemaphoreEXT sometime doesn't signal the semaphore, it is
because radeonsi doesn't flush if gl context doesn't have pending
work. Fix the porblem by always submit ib.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Cc: 19.3 20.0 <mesa-stable at lists.freedesktop.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3779>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3779>
(cherry picked from commit 0660cbf4262891e6380faf0d99217b2d27873051)

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/radeonsi/si_fence.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index af621c1419a..9f062fcd9f9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -274,7 +274,7 @@
         "description": "radeonsi: make si_fence_server_signal flush pipe without work",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c
index e9dd3e937f2..26b5fc4bdba 100644
--- a/src/gallium/drivers/radeonsi/si_fence.c
+++ b/src/gallium/drivers/radeonsi/si_fence.c
@@ -606,7 +606,11 @@ static void si_fence_server_signal(struct pipe_context *ctx,
 	 * Therefore, we must make sure that we flush the pipe to avoid
 	 * new work being emitted and getting executed before the signal
 	 * operation.
+	 * 
+	 * Set sctx->initial_gfx_cs_size to force IB submission even if
+	 * it is empty.
 	 */
+	sctx->initial_gfx_cs_size = 0;
 	si_flush_from_st(ctx, NULL, PIPE_FLUSH_ASYNC);
 }
 



More information about the mesa-commit mailing list