radv: program DB_RENDER_OVERRIDE correctly on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32941>
This commit is contained in:

committed by
Marge Bot

parent
83809f06a7
commit
bc1374355b
@@ -10677,6 +10677,13 @@ radv_emit_depth_stencil_state(struct radv_cmd_buffer *cmd_buffer)
|
||||
const uint32_t depth_bounds_max = fui(d->vk.ds.depth.bounds_test.max);
|
||||
|
||||
if (pdev->info.gfx_level >= GFX12) {
|
||||
const bool force_s_valid =
|
||||
stencil_test_enable && ((d->vk.ds.stencil.front.op.pass != d->vk.ds.stencil.front.op.depth_fail) ||
|
||||
(d->vk.ds.stencil.back.op.pass != d->vk.ds.stencil.back.op.depth_fail));
|
||||
|
||||
radeon_set_context_reg(cmd_buffer->cs, R_02800C_DB_RENDER_OVERRIDE,
|
||||
S_02800C_FORCE_STENCIL_READ(1) | S_02800C_FORCE_STENCIL_VALID(force_s_valid));
|
||||
|
||||
radeon_opt_set_context_reg(cmd_buffer, R_028070_DB_DEPTH_CONTROL, RADV_TRACKED_DB_DEPTH_CONTROL,
|
||||
db_depth_control);
|
||||
|
||||
|
@@ -886,10 +886,6 @@ radv_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs)
|
||||
|
||||
if (pdev->info.gfx_level >= GFX12) {
|
||||
radeon_set_context_reg(cs, R_028000_DB_RENDER_CONTROL, 0);
|
||||
radeon_set_context_reg(cs, R_02800C_DB_RENDER_OVERRIDE,
|
||||
S_02800C_FORCE_STENCIL_READ(1) |
|
||||
/* TODO: this should be conditional based on stencil state */
|
||||
S_02800C_FORCE_STENCIL_VALID(1));
|
||||
}
|
||||
|
||||
ac_pm4_finalize(pm4);
|
||||
|
Reference in New Issue
Block a user