From 9ea90ffb98fbb5eac4cec5660a1ca2253c3a3e25 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 11 Jan 2018 10:22:04 +0100 Subject: 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 Signed-off-by: Eric Anholt --- src/gallium/drivers/vc4/vc4_job.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gallium/drivers/vc4/vc4_job.c') 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; } } -- cgit v1.2.3