[Mesa-dev] [PATCH libdrm 9/9] Fixes 88ae2f5870c: "panfrost/midgard: Remove unnecessary variables"

Rohan Garg rohan.garg at collabora.com
Wed Jun 12 11:24:39 UTC 2019


Make sure we link the last vertex job to the first tiler job.
---
 src/gallium/drivers/panfrost/pan_context.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 00acb464bc6..caa914e33cb 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -581,6 +581,7 @@ struct panfrost_transfer
 panfrost_vertex_tiler_job(struct panfrost_context *ctx, bool is_tiler)
 {
         struct panfrost_job *job = panfrost_get_job_for_fbo(ctx);
+        static mali_ptr first_tiler_job = 0;
 
         /* Each draw call corresponds to two jobs, and the set-value job is first */
         int draw_job_index = 1 + (2 * job->draw_count) + 1;
@@ -623,6 +624,11 @@ panfrost_vertex_tiler_job(struct panfrost_context *ctx, bool is_tiler)
                 if (job->draw_count) {
                         /* Previous vertex job points to this vertex job */
                         panfrost_link_job_pair(ctx->u_vertex_jobs[job->draw_count - 1], transfer.gpu);
+
+                        /* Last vertex job points to first tiler job */
+                        if (!first_tiler_job)
+                                first_tiler_job = transfer.gpu;
+                        panfrost_link_job_pair(&next_job, first_tiler_job);
                 } else {
                         /* Have the first vertex job depend on the set value job */
                         next_job.job_dependency_index_1 = ctx->u_set_value_job->job_index;
-- 
2.17.1



More information about the mesa-dev mailing list