From 0dcf510c05cc79bf441bb65a2e733346af2dcf6e 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: --- src/panfrost/lib/pan_desc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_desc.c b/src/panfrost/lib/pan_desc.c index 8ed2f0fc3be..8bc94a3f118 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;