panvk: Fix depth-stencil AFBC support

When both the depth and stencil attachments are enabled, and the
underlying image is AFBC, it must be an combined Z24S8 format.

Make sure this is the case when initializing the fbinfo object.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
This commit is contained in:
Boris Brezillon 2024-05-28 14:20:00 +02:00 committed by Marge Bot
parent baf8570b28
commit 4a30a28653

View file

@ -1579,6 +1579,15 @@ panvk_cmd_begin_rendering_init_state(struct panvk_cmd_buffer *cmdbuf,
cmdbuf->state.gfx.render.fb
.bos[cmdbuf->state.gfx.render.fb.bo_count++] = img->bo;
if (drm_is_afbc(img->pimage.layout.modifier)) {
assert(fbinfo->zs.view.zs == &iview->pview || !fbinfo->zs.view.zs);
fbinfo->zs.view.zs = &iview->pview;
} else {
fbinfo->zs.view.s =
&iview->pview != fbinfo->zs.view.zs ? &iview->pview : NULL;
}
fbinfo->zs.view.s =
&iview->pview != fbinfo->zs.view.zs ? &iview->pview : NULL;
fbinfo->nr_samples = MAX2(