panfrost: Fix faults with RASTERIZER_DISCARD
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
This commit is contained in:
parent
6c6a8b2f07
commit
afa4b32019
|
@ -1082,7 +1082,15 @@ panfrost_batch_submit_jobs(struct panfrost_batch *batch)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (batch->scoreboard.tiler_dep || batch->clear) {
|
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);
|
ret = panfrost_batch_submit_ioctl(batch, fragjob, PANFROST_JD_REQ_FS);
|
||||||
assert(!ret);
|
assert(!ret);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue