zink: don't wait on queue thread if disabled
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 23 May 2023 13:30:59 +0000 (09:30 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 24 May 2023 18:02:11 +0000 (18:02 +0000)
Fixes: 270f9c0b063 ("zink: add ZINK_DEBUG=flushsync")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23189>

src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_screen.c

index 5a2fcae..c6520c1 100644 (file)
@@ -3032,7 +3032,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);
 }
 
index ab7a5f2..27b7c25 100644 (file)
@@ -1655,7 +1655,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);
       }