From f4b4191f1cca9fd04ff4f0e85d2739ceb85ddebc Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 6 Aug 2025 13:38:29 +0200 Subject: [PATCH] pan: use translate_s_format for stencil While this was also using translate_zs_format() before the commit in question, that's didn't lead to any real issues, because only a single value was legal here before. While it's not entirely in-spec to use other values, it seems the HW doesn't mind. But when this logic was reworked, the typed field was used instead. This lead to a compiler warning on Clang. Let's correct this properly here, rather than papering over the compiler warning. Fixes: 7a763bb0a3b ("pan/genxml: Rework the RT/ZS emission logic") Reviewed-by: Alyssa Rosenzweig Tested-by: Yiwei Zhang Reviewed-by: Eric R. Smith Part-of: (cherry picked from commit 0dcf510c05cc79bf441bb65a2e733346af2dcf6e) --- .pick_status.json | 2 +- src/panfrost/lib/pan_desc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1a21f96de44..debeac28906 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -634,7 +634,7 @@ "description": "pan: use translate_s_format for stencil", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "7a763bb0a3b1cb48dce03a62fff2fe9eac3f0eaf", "notes": null diff --git a/src/panfrost/lib/pan_desc.c b/src/panfrost/lib/pan_desc.c index 73126ed413e..e85ebd0a2ad 100644 --- a/src/panfrost/lib/pan_desc.c +++ b/src/panfrost/lib/pan_desc.c @@ -274,7 +274,7 @@ GENX(pan_emit_afbc_s_attachment)(const struct pan_fb_info *fb, &body_offset, &hdr_row_stride); pan_cast_and_pack(payload, AFBC_S_TARGET, cfg) { cfg.msaa = mali_sampling_mode(s); - cfg.write_format = translate_zs_format(s->format); + cfg.write_format = translate_s_format(s->format); cfg.block_format = get_afbc_block_format(pref.image->props.modifier); cfg.header = header; cfg.body_offset = body_offset;