From c517ab7ce1a40cf4cd7679ec8c3bd53009a6014d Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 23 May 2023 09:30:59 -0400 Subject: [PATCH] zink: don't wait on queue thread if disabled Fixes: 270f9c0b063 ("zink: add ZINK_DEBUG=flushsync") Part-of: (cherry picked from commit f58594cdea4c2b1b23c7da7fafc9868935529ff1) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_context.c | 2 +- src/gallium/drivers/zink/zink_screen.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e545eaeadf5..d03ca86c31b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -823,7 +823,7 @@ "description": "zink: don't wait on queue thread if disabled", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "270f9c0b0636bc0c7954f32e2b5920ec76f839e5" }, diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 5c93f9b2f29..97b7149d2be 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3069,7 +3069,7 @@ zink_evaluate_depth_buffer(struct pipe_context *pctx) static void sync_flush(struct zink_context *ctx, struct zink_batch_state *bs) { - if (zink_screen(ctx->base.screen)->threaded) + if (zink_screen(ctx->base.screen)->threaded_submit) util_queue_fence_wait(&bs->flush_completed); } diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 815bc1d4e16..a96f609a3b3 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1634,7 +1634,7 @@ zink_flush_frontbuffer(struct pipe_screen *pscreen, if (ctx->batch.swapchain || ctx->needs_present) { ctx->batch.has_work = true; pctx->flush(pctx, NULL, PIPE_FLUSH_END_OF_FRAME); - if (ctx->last_fence && screen->threaded) { + if (ctx->last_fence && screen->threaded_submit) { struct zink_batch_state *bs = zink_batch_state(ctx->last_fence); util_queue_fence_wait(&bs->flush_completed); }