diff --git a/src/gallium/drivers/freedreno/freedreno_query_acc.c b/src/gallium/drivers/freedreno/freedreno_query_acc.c index 46efe61aae9..5bc10bce635 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_acc.c +++ b/src/gallium/drivers/freedreno/freedreno_query_acc.c @@ -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