Mesa (main): zink: set batch state queue on creation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 19 19:17:04 UTC 2021


Module: Mesa
Branch: main
Commit: e92b8956c7923b5261dbf8218d87b7dd3c79ae4f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e92b8956c7923b5261dbf8218d87b7dd3c79ae4f

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Nov 19 13:42:41 2021 -0500

zink: set batch state queue on creation

make this easier to find

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13885>

---

 src/gallium/drivers/zink/zink_batch.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c
index f3433640827..b0674f8f1ab 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -242,6 +242,7 @@ create_batch_state(struct zink_context *ctx)
       goto fail;
 
    util_queue_fence_init(&bs->flush_completed);
+   bs->queue = screen->threaded ? screen->thread_queue : screen->queue;
 
    return bs;
 fail:
@@ -619,11 +620,9 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
       return;
 
    if (screen->threaded) {
-      bs->queue = screen->thread_queue;
       util_queue_add_job(&screen->flush_queue, bs, &bs->flush_completed,
                          submit_queue, post_submit, 0);
    } else {
-      bs->queue = screen->queue;
       submit_queue(bs, NULL, 0);
       post_submit(bs, NULL, 0);
    }



More information about the mesa-commit mailing list