diff options
author | Marek Olšák <[email protected]> | 2016-06-27 19:46:39 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-06-29 20:12:00 +0200 |
commit | 44906101c4bcd630733ee46fcd9a3b718314461d (patch) | |
tree | d662e47e450bdadd8bafe99807a57719586f66a8 /src/gallium/drivers/radeon/r600_texture.c | |
parent | 82b39f352142a91ad98ae84f313287eb14197c90 (diff) |
gallium/radeon: don't re-create queries for DCC stat gathering
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 614025aeb4f..776ad7c68d0 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1884,6 +1884,7 @@ void vi_separate_dcc_process_and_reset_stats(struct pipe_context *ctx, struct r600_texture *tex) { struct r600_common_context *rctx = (struct r600_common_context*)ctx; + struct pipe_query *tmp; unsigned i = vi_get_context_dcc_stats_index(rctx, tex); bool query_active = rctx->dcc_stats[i].query_active; bool disable = false; @@ -1894,8 +1895,9 @@ void vi_separate_dcc_process_and_reset_stats(struct pipe_context *ctx, /* Read the results. */ ctx->get_query_result(ctx, rctx->dcc_stats[i].ps_stats[2], true, &result); - ctx->destroy_query(ctx, rctx->dcc_stats[i].ps_stats[2]); - rctx->dcc_stats[i].ps_stats[2] = NULL; + r600_query_hw_reset_buffers(rctx, + (struct r600_query_hw*) + rctx->dcc_stats[i].ps_stats[2]); /* Compute the approximate number of fullscreen draws. */ tex->ps_draw_ratio = @@ -1914,9 +1916,10 @@ void vi_separate_dcc_process_and_reset_stats(struct pipe_context *ctx, vi_separate_dcc_stop_query(ctx, tex); /* Move the queries in the queue by one. */ + tmp = rctx->dcc_stats[i].ps_stats[2]; rctx->dcc_stats[i].ps_stats[2] = rctx->dcc_stats[i].ps_stats[1]; rctx->dcc_stats[i].ps_stats[1] = rctx->dcc_stats[i].ps_stats[0]; - rctx->dcc_stats[i].ps_stats[0] = NULL; + rctx->dcc_stats[i].ps_stats[0] = tmp; /* create and start a new query as ps_stats[0] */ if (query_active) |