ac,radeonsi: set COLOR_SW_MODE for mutable CB surfaces on GFX12

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29525>
This commit is contained in:
Samuel Pitoiset
2024-06-04 11:24:53 +02:00
committed by Marge Bot
parent c6cacc5166
commit aa02cd2a1b
2 changed files with 4 additions and 4 deletions

View File

@@ -1142,8 +1142,10 @@ ac_set_mutable_cb_surface_fields(const struct radeon_info *info, const struct ac
cb->cb_color_base |= tile_swizzle;
}
if (info->gfx_level >= GFX12)
if (info->gfx_level >= GFX12) {
cb->cb_color_attrib3 |= S_028C7C_COLOR_SW_MODE(surf->u.gfx9.swizzle_mode);
return;
}
/* Set up DCC. */
if (state->dcc_enabled) {

View File

@@ -3377,9 +3377,7 @@ static void gfx12_emit_framebuffer_state(struct si_context *sctx, unsigned index
gfx12_set_context_reg(R_028C6C_CB_COLOR0_ATTRIB + i * 0x24, cb_surf.cb_color_attrib);
gfx12_set_context_reg(R_028C70_CB_COLOR0_FDCC_CONTROL + i * 0x24, cb_surf.cb_dcc_control);
gfx12_set_context_reg(R_028C78_CB_COLOR0_ATTRIB2 + i * 0x24, cb_surf.cb_color_attrib2);
gfx12_set_context_reg(R_028C7C_CB_COLOR0_ATTRIB3 + i * 0x24,
cb_surf.cb_color_attrib3 |
S_028C7C_COLOR_SW_MODE(tex->surface.u.gfx9.swizzle_mode));
gfx12_set_context_reg(R_028C7C_CB_COLOR0_ATTRIB3 + i * 0x24, cb_surf.cb_color_attrib3);
gfx12_set_context_reg(R_028E40_CB_COLOR0_BASE_EXT + i * 4, cb_surf.cb_color_base >> 32);
gfx12_set_context_reg(R_028EC0_CB_COLOR0_INFO + i * 4, cb_surf.cb_color_info);
}