We hit this case for clears of MSAA surfaces without draws.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
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) {
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