freedreno: Associate the acc query bo with the batch.
authorEric Anholt <eric@anholt.net>
Fri, 27 Mar 2020 18:31:24 +0000 (11:31 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 21:35:21 +0000 (21:35 +0000)
Otherwise, a result query with wait won't trigger flushing the batch, and
we can end up with zeroed results.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>

src/gallium/drivers/freedreno/freedreno_query_acc.c

index 5e4354bd0e76f64d70189bdd92738717bbf91439..3bcf9ac964e5848c08ec711265731a84aed791d9 100644 (file)
@@ -93,6 +93,8 @@ fd_acc_query_resume(struct fd_acc_query *aq, struct fd_batch *batch)
 
        aq->batch = batch;
        p->resume(aq, aq->batch);
+
+       fd_batch_resource_used(batch, fd_resource(aq->prsc), true);
 }
 
 static void