freedreno: fix missing locking
authorRob Clark <robdclark@chromium.org>
Thu, 2 Apr 2020 19:12:32 +0000 (12:12 -0700)
committerMarge Bot <eric+marge@anholt.net>
Sat, 4 Apr 2020 00:07:10 +0000 (00:07 +0000)
Fixes: d0b3ccb0607 ("freedreno: Fix detection of being in a blit for acc queries.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>

src/gallium/drivers/freedreno/freedreno_query_acc.c

index 46efe61aae98dc66d79f998616010d849b3d60f8..5bc10bce6353694dc67af9aa514bc9b7434e940f 100644 (file)
@@ -87,7 +87,9 @@ fd_acc_query_resume(struct fd_acc_query *aq, struct fd_batch *batch)
        aq->batch = batch;
        p->resume(aq, aq->batch);
 
+       mtx_lock(&batch->ctx->screen->lock);
        fd_batch_resource_used(batch, fd_resource(aq->prsc), true);
+       mtx_unlock(&batch->ctx->screen->lock);
 }
 
 static void