panfrost: Conditionally submit fragment job
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 20 Jun 2019 22:35:22 +0000 (15:35 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 21 Jun 2019 16:35:35 +0000 (09:35 -0700)
If there are no tiling jobs and no clears, there is no need to submit a
fragment job (relevant for transform feedback).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_drm.c

index 77ec419398e47c36df78d1e2b7990d8f64724160..3914fdc09cc3c181ed8ebb555555ceb84648f47d 100644 (file)
@@ -265,7 +265,10 @@ panfrost_drm_submit_vs_fs_job(struct panfrost_context *ctx, bool has_draws, bool
                assert(!ret);
        }
 
-       ret = panfrost_drm_submit_job(ctx, panfrost_fragment_job(ctx, has_draws), PANFROST_JD_REQ_FS, surf);
+        if (job->first_tiler.gpu || job->clear) {
+                ret = panfrost_drm_submit_job(ctx, panfrost_fragment_job(ctx, has_draws), PANFROST_JD_REQ_FS, surf);
+                assert(!ret);
+        }
 
         return ret;
 }