From d1e724b952a665d07d6c57dbfc49d8c55918a823 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 15 Dec 2022 12:26:07 +0100 Subject: [PATCH] radv: do not emit PA_SC_VRS_OVERRIDE_CNTL from the pipeline on GFX11 PA_SC_VRS_OVERRIDE_CNTL is emitted when a framebuffer is bound because it controls the VRS surface enable bit. Though, if a pipeline is bound after the framebuffer is emitted, it can override the state. Remove it completely since VRS for flat shading and RADV_FORCE_VRS are disabled. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_pipeline.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 9f7296901b6..50099d6e071 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -4657,11 +4657,7 @@ gfx103_pipeline_emit_vrs_state(struct radeon_cmdbuf *ctx_cs, mode = ps->info.ps.can_discard ? V_028064_SC_VRS_COMB_MODE_MIN : V_028064_SC_VRS_COMB_MODE_PASSTHRU; } - if (pdevice->rad_info.gfx_level >= GFX11) { - radeon_set_context_reg(ctx_cs, R_0283D0_PA_SC_VRS_OVERRIDE_CNTL, - S_0283D0_VRS_OVERRIDE_RATE_COMBINER_MODE(mode) | - S_0283D0_VRS_RATE((rate_x << 2) | rate_y)); - } else { + if (pdevice->rad_info.gfx_level < GFX11) { radeon_set_context_reg(ctx_cs, R_028064_DB_VRS_OVERRIDE_CNTL, S_028064_VRS_OVERRIDE_RATE_COMBINER_MODE(mode) | S_028064_VRS_OVERRIDE_RATE_X(rate_x) |