freedreno: rename batch->active_providers to query_providers_used.
authorEric Anholt <eric@anholt.net>
Sat, 30 Jan 2021 00:52:26 +0000 (16:52 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 4 Feb 2021 19:31:30 +0000 (19:31 +0000)
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
src/gallium/drivers/freedreno/freedreno_query_hw.c

index bc31771..fd223de 100644 (file)
@@ -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:
index 3f4be29..e92bd32 100644 (file)
@@ -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