From b0c32fcc6629258ec15ae4610c5b8f1258597f88 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 18 Mar 2026 15:48:19 +0100 Subject: [PATCH] pan/lib: set srgb-flag for afrc render-targets Without this, sRGB rendering to AFRC is broken. Fixes: 7a763bb0a3b ("pan/genxml: Rework the RT/ZS emission logic") Reviewed-by: Boris Brezillon Reviewed-by: Lars-Ivar Hesselberg Simonsen Part-of: --- src/panfrost/lib/pan_desc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panfrost/lib/pan_desc.c b/src/panfrost/lib/pan_desc.c index 5eb31029c02..08c5ae31506 100644 --- a/src/panfrost/lib/pan_desc.c +++ b/src/panfrost/lib/pan_desc.c @@ -897,6 +897,7 @@ GENX(pan_emit_afrc_color_attachment)(const struct pan_attachment_info *att, cfg.afrc_format = pan_afrc_format(finfo, image->props.modifier, 0); get_rt_formats(iview->format, &cfg.writeback_format, &cfg.internal_format, &cfg.swizzle); + cfg.srgb = util_format_is_srgb(iview->format); cfg.writeback_buffer.base = base; cfg.writeback_buffer.row_stride = row_stride; cfg.writeback_buffer.surface_stride = surf_stride;