pan/lib: set srgb-flag for afrc render-targets

Without this, sRGB rendering to AFRC is broken.

Fixes: 7a763bb0a3 ("pan/genxml: Rework the RT/ZS emission logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit b0c32fcc66)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
Erik Faye-Lund 2026-03-18 15:48:19 +01:00 committed by Eric Engestrom
parent 0a5c858f28
commit ad057adfd4
2 changed files with 2 additions and 1 deletions

View file

@ -5874,7 +5874,7 @@
"description": "pan/lib: set srgb-flag for afrc render-targets",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7a763bb0a3b1cb48dce03a62fff2fe9eac3f0eaf",
"notes": null

View file

@ -800,6 +800,7 @@ GENX(pan_emit_afrc_color_attachment)(const struct pan_fb_info *fb,
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;