diff options
author | Rob Clark <[email protected]> | 2017-04-21 15:30:33 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-04-22 10:03:02 -0400 |
commit | d310ea0f3258b49f6268df08a7e372764ad5e2d8 (patch) | |
tree | 83866411ef3f9a08cac95b95ed23cb2e05bdd7e2 /src/gallium/drivers/freedreno/freedreno_draw.c | |
parent | 935623af141930db8cbe1089e448cde4066da114 (diff) |
freedreno: add support for hw accumulating queries
Some queries on a4xx and all queries on a5xx can do result accumulation
on CP so we don't need to track per-tile samples. We do still need to
handle pausing/resuming while switching batches (in case the query is
active over multiple draws which are executed out of order).
So introduce new accumulated-query helpers for these sorts of queries,
since it doesn't really fit in cleanly with the original query infra-
structure.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_draw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index dc9effbb7b7..7d3fc8e32da 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -37,6 +37,7 @@ #include "freedreno_context.h" #include "freedreno_state.h" #include "freedreno_resource.h" +#include "freedreno_query_acc.h" #include "freedreno_query_hw.h" #include "freedreno_util.h" @@ -177,6 +178,9 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) resource_written(batch, batch->query_buf); + list_for_each_entry(struct fd_acc_query, aq, &ctx->acc_active_queries, node) + resource_written(batch, aq->prsc); + mtx_unlock(&ctx->screen->lock); batch->num_draws++; @@ -353,6 +357,9 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, resource_written(batch, batch->query_buf); + list_for_each_entry(struct fd_acc_query, aq, &ctx->acc_active_queries, node) + resource_written(batch, aq->prsc); + mtx_unlock(&ctx->screen->lock); DBG("%p: %x %ux%u depth=%f, stencil=%u (%s/%s)", batch, buffers, |