From d2f21f65c6df8f6a7e1092621f2fdbf72b00fb91 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 13 Feb 2026 19:39:02 -0500 Subject: [PATCH] pan/desc: Set clean_tile.write_zs for interleaved Z/S stencil clears Fixes: 9fc555db034c ("pan/desc: Cache clean tile state") Reviewed-by: Lars-Ivar Hesselberg Simonsen Acked-by: Boris Brezillon Acked-by: Eric R. Smith Part-of: --- src/panfrost/lib/pan_desc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panfrost/lib/pan_desc.c b/src/panfrost/lib/pan_desc.c index 3d3328a8983..3e7ee10aaa7 100644 --- a/src/panfrost/lib/pan_desc.c +++ b/src/panfrost/lib/pan_desc.c @@ -1065,6 +1065,10 @@ pan_get_clean_tile_info(const struct pan_fb_info *fb) pan_image_view_get_zs_plane(fb->zs.view.zs).image : NULL; if (fb->zs.clear.z || pan_force_clean_write_on(img, fb->tile_size)) clean_tile.write_zs = 1; + const bool zs_has_stencil = img && + util_format_has_stencil(util_format_description(img->props.format)); + if (zs_has_stencil && fb->zs.clear.s) + clean_tile.write_zs = 1; } if (!fb->zs.discard.s) {