diff options
author | Boris Brezillon <[email protected]> | 2018-01-11 10:22:04 +0100 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-03-05 15:54:04 -0800 |
commit | 9ea90ffb98fbb5eac4cec5660a1ca2253c3a3e25 (patch) | |
tree | 80cc4bd7fe6cece8bb1383c050b07c686133fb4b /src/gallium/drivers/vc4/vc4_job.c | |
parent | 5924379a587aa654a0a8bfd68a815b5bc906c1e9 (diff) |
broadcom/vc4: Add support for HW perfmon
The V3D engine provides several perf counters.
Implement ->get_driver_query_[group_]info() so that these counters are
exposed through the GL_AMD_performance_monitor extension.
Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_job.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_job.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_job.c b/src/gallium/drivers/vc4/vc4_job.c index 5d18cb9bb82..41c274ca1b3 100644 --- a/src/gallium/drivers/vc4/vc4_job.c +++ b/src/gallium/drivers/vc4/vc4_job.c @@ -92,6 +92,9 @@ vc4_job_create(struct vc4_context *vc4) job->last_gem_handle_hindex = ~0; + if (vc4->perfmon) + job->perfmon = vc4->perfmon; + return job; } @@ -455,6 +458,8 @@ vc4_job_submit(struct vc4_context *vc4, struct vc4_job *job) submit.shader_rec_count = job->shader_rec_count; submit.uniforms = (uintptr_t)job->uniforms.base; submit.uniforms_size = cl_offset(&job->uniforms); + if (job->perfmon) + submit.perfmonid = job->perfmon->id; assert(job->draw_min_x != ~0 && job->draw_min_y != ~0); submit.min_x_tile = job->draw_min_x / job->tile_width; @@ -487,6 +492,8 @@ vc4_job_submit(struct vc4_context *vc4, struct vc4_job *job) warned = true; } else if (!ret) { vc4->last_emit_seqno = submit.seqno; + if (job->perfmon) + job->perfmon->last_seqno = submit.seqno; } } |