From: Christian Gmeiner Date: Sun, 5 Apr 2020 19:46:55 +0000 (+0200) Subject: etnaviv: remove the "active" member of queries X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=693480a581e018bf61ca00889fcc8c479a418319;p=mesa.git etnaviv: remove the "active" member of queries The state tracker only gets to begin/query/destroy when !active and end when active, so we have no need to try to track this ourselves. Signed-off-by: Christian Gmeiner Part-of: --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.c b/src/gallium/drivers/etnaviv/etnaviv_query.c index ee936a6e616..01ec3bebc8e 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query.c @@ -61,11 +61,7 @@ etna_begin_query(struct pipe_context *pctx, struct pipe_query *pq) { struct etna_query *q = etna_query(pq); - if (q->active) - return false; - q->funcs->begin_query(etna_context(pctx), q); - q->active = true; return true; } @@ -75,11 +71,7 @@ etna_end_query(struct pipe_context *pctx, struct pipe_query *pq) { struct etna_query *q = etna_query(pq); - if (!q->active) - return false; - q->funcs->end_query(etna_context(pctx), q); - q->active = false; return true; } @@ -90,9 +82,6 @@ etna_get_query_result(struct pipe_context *pctx, struct pipe_query *pq, { struct etna_query *q = etna_query(pq); - if (q->active) - return false; - util_query_clear_result(result, q->type); return q->funcs->get_query_result(etna_context(pctx), q, wait, result); diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.h b/src/gallium/drivers/etnaviv/etnaviv_query.h index afa1743bd61..c3c5911f7d0 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query.h +++ b/src/gallium/drivers/etnaviv/etnaviv_query.h @@ -43,7 +43,6 @@ struct etna_query_funcs { struct etna_query { const struct etna_query_funcs *funcs; - bool active; unsigned type; }; diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_acc.h b/src/gallium/drivers/etnaviv/etnaviv_query_acc.h index 526513af12a..9204befa03d 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_acc.h +++ b/src/gallium/drivers/etnaviv/etnaviv_query_acc.h @@ -69,9 +69,6 @@ etna_acc_query_suspend(struct etna_acc_query *aq, struct etna_context *ctx) { const struct etna_acc_sample_provider *p = aq->provider; - if (!aq->base.active) - return; - p->suspend(aq, ctx); aq->samples++; } @@ -81,9 +78,6 @@ etna_acc_query_resume(struct etna_acc_query *aq, struct etna_context *ctx) { const struct etna_acc_sample_provider *p = aq->provider; - if (!aq->base.active) - return; - p->resume(aq, ctx); aq->samples++; }