zink: don't wait on queue thread if disabled

Fixes: 270f9c0b06 ("zink: add ZINK_DEBUG=flushsync")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23189>
(cherry picked from commit f58594cdea)
This commit is contained in:
Mike Blumenkrantz 2023-05-23 09:30:59 -04:00 committed by Eric Engestrom
parent 46afe552b0
commit c517ab7ce1
3 changed files with 3 additions and 3 deletions

View file

@ -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"
},

View file

@ -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);
}

View file

@ -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);
}