From dc4fe86a012a67a12fcefb3f6c9bab58bcdc25e4 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 23 Oct 2021 17:29:14 -0400 Subject: [PATCH] panfrost: Treat IDVS jobs as tiler for scoreboarding These need to be chained and need to provoke a fragment job when we're done. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_scoreboard.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/panfrost/lib/pan_scoreboard.h b/src/panfrost/lib/pan_scoreboard.h index 750ace0ea25..4910dac930b 100644 --- a/src/panfrost/lib/pan_scoreboard.h +++ b/src/panfrost/lib/pan_scoreboard.h @@ -124,6 +124,21 @@ struct pan_scoreboard { * */ +/** + * Does this job use the tiler? Beyond tiler jobs, index-driven vertex shading + * jobs also do. + */ +static bool +panfrost_job_uses_tiling(enum mali_job_type type) +{ +#if PAN_ARCH >= 6 + if (type == MALI_JOB_TYPE_INDEXED_VERTEX) + return true; +#endif + + return (type == MALI_JOB_TYPE_TILER); +} + /* Generates, uploads, and queues a a new job. All fields are written in order * except for next_job accounting (TODO: Should we be clever and defer the * upload of the header here until next job to keep the access pattern totally @@ -142,7 +157,7 @@ panfrost_add_job(struct pan_pool *pool, const struct panfrost_ptr *job, bool inject) { - if (type == MALI_JOB_TYPE_TILER) { + if (panfrost_job_uses_tiling(type)) { /* Tiler jobs must be chained, and on Midgard, the first tiler * job must depend on the write value job, whose index we * reserve now */ @@ -189,7 +204,7 @@ panfrost_add_job(struct pan_pool *pool, } /* Form a chain */ - if (type == MALI_JOB_TYPE_TILER) { + if (panfrost_job_uses_tiling(type)) { if (!scoreboard->first_tiler) { scoreboard->first_tiler = (void *)job->cpu; scoreboard->first_tiler_dep1 = local_dep;