diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-07-03 12:04:53 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-07 01:13:39 +0000 |
commit | bb577051dd5dbb5519f770eabf149de8675770ba (patch) | |
tree | 58d4331e7eee81a025f04933bed737f170f3fecd /src/gallium/drivers | |
parent | 3b7aeb2448a1c3cfad43db5ae3eff897dffed627 (diff) |
panfrost: Enable MSAA if we render to such a surface
We hit this case for clears of MSAA surfaces without draws.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_mfbd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index 880a1aaf19c..558ba866c56 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -224,6 +224,9 @@ panfrost_mfbd_set_cbuf( rt->format = panfrost_mfbd_format(surf); + if (layer_stride) + rt->format.flags |= MALI_MFBD_FORMAT_MSAA | MALI_MFBD_FORMAT_LAYERED; + /* Now, we set the layout specific pieces */ if (rsrc->layout == MALI_TEXTURE_LINEAR) { @@ -521,6 +524,14 @@ panfrost_mfbd_fragment(struct panfrost_batch *batch, bool has_draws) struct pipe_surface *surf = batch->key.cbufs[cb]; if (surf) { + unsigned nr_samples = surf->nr_samples; + + if (!nr_samples) + nr_samples = surf->texture->nr_samples; + + if (nr_samples > 1) + batch->requirements |= PAN_REQ_MSAA; + panfrost_mfbd_set_cbuf(&rts[cb], surf); /* What is this? Looks like some extension of the bpp |