radv: fix emitting DB_RENDER_OVERRIDE on GFX12

This register is already set in the GFX12 preamble and it shouldn't
be overwritten.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31690>
This commit is contained in:
Samuel Pitoiset 2024-10-16 19:39:54 +02:00 committed by Marge Bot
parent daefd280e2
commit 0f2363993d

View file

@ -3782,13 +3782,12 @@ radv_emit_depth_clamp_enable(struct radv_cmd_buffer *cmd_buffer)
enum radv_depth_clamp_mode mode = radv_get_depth_clamp_mode(cmd_buffer);
radeon_set_context_reg(
cmd_buffer->cs, R_02800C_DB_RENDER_OVERRIDE,
S_02800C_DISABLE_VIEWPORT_CLAMP(pdev->info.gfx_level < GFX12 && mode == RADV_DEPTH_CLAMP_MODE_DISABLED));
if (pdev->info.gfx_level >= GFX12) {
radeon_set_context_reg(cmd_buffer->cs, R_028064_DB_VIEWPORT_CONTROL,
S_028064_DISABLE_VIEWPORT_CLAMP(mode == RADV_DEPTH_CLAMP_MODE_DISABLED));
} else {
radeon_set_context_reg(cmd_buffer->cs, R_02800C_DB_RENDER_OVERRIDE,
S_02800C_DISABLE_VIEWPORT_CLAMP(mode == RADV_DEPTH_CLAMP_MODE_DISABLED));
}
}