radv: configure the VRS surface swizzle mode on GFX12

GFX11 allowed only one swizzle mode for the VRS image but GFX12 allows
all 2D non-linear swizzle modes and PC_SC_VRS_INFO needs to be
configured.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32914>
This commit is contained in:
Samuel Pitoiset 2025-01-06 13:57:09 -08:00 committed by Marge Bot
parent 0b53e645a0
commit d7bc370b9e

View file

@ -4616,6 +4616,11 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer)
xmax = vrs_iview->vk.extent.width - 1;
ymax = vrs_iview->vk.extent.height - 1;
if (pdev->info.gfx_level >= GFX12) {
radeon_set_context_reg(cmd_buffer->cs, R_0283E0_PA_SC_VRS_INFO,
S_0283E0_RATE_SW_MODE(vrs_image->planes[0].surface.u.gfx9.swizzle_mode));
}
}
radeon_set_context_reg_seq(cmd_buffer->cs, R_0283F0_PA_SC_VRS_RATE_BASE, 3);