Mesa (master): freedreno: rename batch->active_providers to query_providers_used.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 4 19:46:05 UTC 2021


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jan 29 16:52:26 2021 -0800

freedreno: rename batch->active_providers to query_providers_used.

It's not the set of currently active providers, it's what's been used at
all in the current batch (this is used for doing the initialization of
query providers at initial HW setup in a submit).

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

---

 src/gallium/drivers/freedreno/freedreno_batch.h    | 4 ++--
 src/gallium/drivers/freedreno/freedreno_query_hw.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/freedreno/freedreno_batch.h b/src/gallium/drivers/freedreno/freedreno_batch.h
index bc317719281..fd223de7790 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.h
+++ b/src/gallium/drivers/freedreno/freedreno_batch.h
@@ -207,8 +207,8 @@ struct fd_batch {
 	 */
 	struct fd_hw_sample *sample_cache[MAX_HW_SAMPLE_PROVIDERS];
 
-	/* which sample providers were active in the current batch: */
-	uint32_t active_providers;
+	/* which sample providers were used in the current batch: */
+	uint32_t query_providers_used;
 
 	/* tracking for current stage, to know when to start/stop
 	 * any active queries:
diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.c b/src/gallium/drivers/freedreno/freedreno_query_hw.c
index 3f4be2923ff..e92bd324759 100644
--- a/src/gallium/drivers/freedreno/freedreno_query_hw.c
+++ b/src/gallium/drivers/freedreno/freedreno_query_hw.c
@@ -85,7 +85,7 @@ resume_query(struct fd_batch *batch, struct fd_hw_query *hq,
 	DBG("%p", hq);
 	assert(idx >= 0);   /* query never would have been created otherwise */
 	assert(!hq->period);
-	batch->active_providers |= (1 << idx);
+	batch->query_providers_used |= (1 << idx);
 	hq->period = slab_alloc_st(&batch->ctx->sample_period_pool);
 	list_inithead(&hq->period->list);
 	hq->period->start = get_sample(batch, ring, hq->base.type);
@@ -101,7 +101,7 @@ pause_query(struct fd_batch *batch, struct fd_hw_query *hq,
 	DBG("%p", hq);
 	assert(idx >= 0);   /* query never would have been created otherwise */
 	assert(hq->period && !hq->period->end);
-	assert(batch->active_providers & (1 << idx));
+	assert(batch->query_providers_used & (1 << idx));
 	hq->period->end = get_sample(batch, ring, hq->base.type);
 	list_addtail(&hq->period->list, &hq->periods);
 	hq->period = NULL;
@@ -418,13 +418,13 @@ fd_hw_query_enable(struct fd_batch *batch, struct fd_ringbuffer *ring)
 {
 	struct fd_context *ctx = batch->ctx;
 	for (int idx = 0; idx < MAX_HW_SAMPLE_PROVIDERS; idx++) {
-		if (batch->active_providers & (1 << idx)) {
+		if (batch->query_providers_used & (1 << idx)) {
 			assert(ctx->hw_sample_providers[idx]);
 			if (ctx->hw_sample_providers[idx]->enable)
 				ctx->hw_sample_providers[idx]->enable(ctx, ring);
 		}
 	}
-	batch->active_providers = 0;  /* clear it for next frame */
+	batch->query_providers_used = 0;  /* clear it for next frame */
 }
 
 void



More information about the mesa-commit mailing list