From 6e4ff8b3a80ff6f1cec340d4cd637234dcf1cc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 20 Sep 2022 16:23:41 -0400 Subject: [PATCH] radeonsi: don't flush asynchronously for fence_server_signal See the comment. Fixes: 21b3a234 - mesa: fix SignalSemaphoreEXT behavior Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: (cherry picked from commit da68678171072747ff1ee784dcf901cad2c98d62) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_fence.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index f67ee65dbeb..900f26a967f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2767,7 +2767,7 @@ "description": "radeonsi: don't flush asynchronously for fence_server_signal", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "21b3a234048a270e7999f8e70e25091c599dd3eb" }, diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c index b698af0cd7c..ddd799ccd11 100644 --- a/src/gallium/drivers/radeonsi/si_fence.c +++ b/src/gallium/drivers/radeonsi/si_fence.c @@ -571,8 +571,11 @@ static void si_fence_server_signal(struct pipe_context *ctx, struct pipe_fence_h * operation. * * Forces a flush even if the GFX CS is empty. + * + * The flush must not be asynchronous because the kernel must receive + * the scheduled "signal" operation before any wait. */ - si_flush_all_queues(ctx, NULL, PIPE_FLUSH_ASYNC, true); + si_flush_all_queues(ctx, NULL, 0, true); } static void si_fence_server_sync(struct pipe_context *ctx, struct pipe_fence_handle *fence)