diff options
Diffstat (limited to 'lib/mesa/src/gallium/drivers/etnaviv/etnaviv_query.c')
-rw-r--r-- | lib/mesa/src/gallium/drivers/etnaviv/etnaviv_query.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_query.c b/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_query.c index 89e016d01..01ec3bebc 100644 --- a/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_query.c +++ b/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_query.c @@ -29,10 +29,10 @@ #include "util/u_inlines.h" #include "etnaviv_context.h" +#include "etnaviv_perfmon.h" #include "etnaviv_query.h" -#include "etnaviv_query_hw.h" +#include "etnaviv_query_acc.h" #include "etnaviv_query_sw.h" -#include "etnaviv_query_pm.h" static struct pipe_query * etna_create_query(struct pipe_context *pctx, unsigned query_type, @@ -43,9 +43,7 @@ etna_create_query(struct pipe_context *pctx, unsigned query_type, q = etna_sw_create_query(ctx, query_type); if (!q) - q = etna_hw_create_query(ctx, query_type); - if (!q) - q = etna_pm_create_query(ctx, query_type); + q = etna_acc_create_query(ctx, query_type); return (struct pipe_query *)q; } @@ -62,15 +60,10 @@ static bool etna_begin_query(struct pipe_context *pctx, struct pipe_query *pq) { struct etna_query *q = etna_query(pq); - bool ret; - - if (q->active) - return false; - ret = q->funcs->begin_query(etna_context(pctx), q); - q->active = ret; + q->funcs->begin_query(etna_context(pctx), q); - return ret; + return true; } static bool @@ -78,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; } @@ -93,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); @@ -139,11 +125,11 @@ etna_set_active_query_state(struct pipe_context *pctx, bool enable) struct etna_context *ctx = etna_context(pctx); if (enable) { - list_for_each_entry(struct etna_hw_query, hq, &ctx->active_hw_queries, node) - etna_hw_query_resume(hq, ctx); + list_for_each_entry(struct etna_acc_query, aq, &ctx->active_acc_queries, node) + etna_acc_query_resume(aq, ctx); } else { - list_for_each_entry(struct etna_hw_query, hq, &ctx->active_hw_queries, node) - etna_hw_query_suspend(hq, ctx); + list_for_each_entry(struct etna_acc_query, aq, &ctx->active_acc_queries, node) + etna_acc_query_suspend(aq, ctx); } } |