mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
panfrost: Set discard based on the resolve set
This is a bit simpler and will allow resolve to be disabled independently. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6295>
This commit is contained in:
parent
bff8c7e611
commit
c8161bf05d
1 changed files with 3 additions and 9 deletions
|
|
@ -790,9 +790,7 @@ panfrost_batch_to_fb_info(const struct panfrost_batch *batch,
|
|||
sizeof((fb->rts[i].clear_value)));
|
||||
}
|
||||
|
||||
/* Discard RTs that have no draws or clear. */
|
||||
if (!reserve && !((batch->clear | batch->draws) & mask))
|
||||
fb->rts[i].discard = true;
|
||||
fb->rts[i].discard = !reserve && !(batch->resolve & mask);
|
||||
|
||||
rts[i].format = surf->format;
|
||||
rts[i].dim = MALI_TEXTURE_DIMENSION_2D;
|
||||
|
|
@ -862,12 +860,8 @@ panfrost_batch_to_fb_info(const struct panfrost_batch *batch,
|
|||
fb->zs.clear_value.stencil = batch->clear_stencil;
|
||||
}
|
||||
|
||||
/* Discard if Z/S are not updated */
|
||||
if (!reserve && !((batch->draws | batch->clear) & PIPE_CLEAR_DEPTH))
|
||||
fb->zs.discard.z = true;
|
||||
|
||||
if (!reserve && !((batch->draws | batch->clear) & PIPE_CLEAR_STENCIL))
|
||||
fb->zs.discard.s = true;
|
||||
fb->zs.discard.z = !reserve && !(batch->resolve & PIPE_CLEAR_DEPTH);
|
||||
fb->zs.discard.s = !reserve && !(batch->resolve & PIPE_CLEAR_STENCIL);
|
||||
|
||||
if (!fb->zs.clear.z &&
|
||||
((batch->read & PIPE_CLEAR_DEPTH) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue