diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-07-16 13:33:32 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-16 19:59:43 +0000 |
commit | afa4b32019ad02bc54b43ed5a3e78c3089b4f906 (patch) | |
tree | eb6d9175762fbbd6a2c9a9077dd6840707f79f8b /src/gallium/drivers | |
parent | 6c6a8b2f071b2d56b694f0016d84b2b9d6858d42 (diff) |
panfrost: Fix faults with RASTERIZER_DISCARD
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_job.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index c495d6133e6..5a89825bb86 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -1082,7 +1082,15 @@ panfrost_batch_submit_jobs(struct panfrost_batch *batch) } if (batch->scoreboard.tiler_dep || batch->clear) { - mali_ptr fragjob = panfrost_fragment_job(batch, has_draws); + /* Whether we program the fragment job for draws or not depends + * on whether there is any *tiler* activity (so fragment + * shaders). If there are draws but entirely RASTERIZER_DISCARD + * (say, for transform feedback), we want a fragment job that + * *only* clears, since otherwise the tiler structures will be + * uninitialized leading to faults (or state leaks) */ + + mali_ptr fragjob = panfrost_fragment_job(batch, + batch->scoreboard.tiler_dep != 0); ret = panfrost_batch_submit_ioctl(batch, fragjob, PANFROST_JD_REQ_FS); assert(!ret); } |