summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2020-02-01 22:31:00 -0500
committerDylan Baker <dylan@pnwbakers.com>2020-02-13 11:27:15 -0800
commitb81f4a4092b0e4091e728ec50606dc6561963fba (patch)
tree7ee4f3d88c110344cc72d41417b6cb4117c65f37
parent1f0cbaeb961f0c787e525ef209d684e9bc189f7b (diff)
downloadmesa-b81f4a4092b0e4091e728ec50606dc6561963fba.tar.gz
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@amd.com> Cc: 19.3 20.0 <mesa-stable@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)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/radeonsi/si_fence.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index e00110723a4..947691e2196 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 4df9e65dd08..dcd16b9d11e 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);
}