freedreno: Count blits in GL_TIME_ELAPSED and perf counter queries.

Fixes 0 gpu time reported for glBlitFramebuffer in apitrace replay --pgpu.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
This commit is contained in:
Eric Anholt
2020-03-27 10:54:19 -07:00
committed by Marge Bot
parent 4a07839948
commit 7ef61c1f10
5 changed files with 8 additions and 6 deletions
@@ -151,7 +151,7 @@ perfcntr_accumulate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider perfcntr = {
.query_type = FD_QUERY_FIRST_PERFCNTR,
.active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
.active = FD_STAGE_ALL,
.resume = perfcntr_resume,
.pause = perfcntr_pause,
.result = perfcntr_accumulate_result,
@@ -259,7 +259,7 @@ static const struct fd_hw_sample_provider occlusion_predicate_conservative = {
static const struct fd_hw_sample_provider time_elapsed = {
.query_type = PIPE_QUERY_TIME_ELAPSED,
.active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
.active = FD_STAGE_ALL,
.enable = time_elapsed_enable,
.get_sample = time_elapsed_get_sample,
.accumulate_result = time_elapsed_accumulate_result,
@@ -229,7 +229,7 @@ timestamp_accumulate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider time_elapsed = {
.query_type = PIPE_QUERY_TIME_ELAPSED,
.active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
.active = FD_STAGE_ALL,
.size = sizeof(struct fd5_query_sample),
.resume = timestamp_resume,
.pause = timestamp_pause,
@@ -366,7 +366,7 @@ perfcntr_accumulate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider perfcntr = {
.query_type = FD_QUERY_FIRST_PERFCNTR,
.active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
.active = FD_STAGE_ALL,
.resume = perfcntr_resume,
.pause = perfcntr_pause,
.result = perfcntr_accumulate_result,
@@ -646,6 +646,8 @@ handle_rgba_blit(struct fd_context *ctx, const struct pipe_blit_info *info)
mtx_unlock(&ctx->screen->lock);
fd_batch_set_stage(batch, FD_STAGE_BLIT);
emit_setup(batch);
if ((info->src.resource->target == PIPE_BUFFER) &&
@@ -229,7 +229,7 @@ timestamp_accumulate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider time_elapsed = {
.query_type = PIPE_QUERY_TIME_ELAPSED,
.active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
.active = FD_STAGE_ALL,
.size = sizeof(struct fd6_query_sample),
.resume = timestamp_resume,
.pause = timestamp_pause,
@@ -547,7 +547,7 @@ perfcntr_accumulate_result(struct fd_acc_query *aq, void *buf,
static const struct fd_acc_sample_provider perfcntr = {
.query_type = FD_QUERY_FIRST_PERFCNTR,
.active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
.active = FD_STAGE_ALL,
.resume = perfcntr_resume,
.pause = perfcntr_pause,
.result = perfcntr_accumulate_result,