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>
This commit is contained in:
Eric Anholt
2021-01-29 16:52:26 -08:00
committed by Marge Bot
parent 75a4386676
commit b709efeb09
2 changed files with 6 additions and 6 deletions
@@ -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:
@@ -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