From 989cc76f0c90190b1894bd7c80b80ccf96ae2ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 20 Oct 2020 17:18:16 -0400 Subject: [PATCH] amd: replace 0x028848 with the register definition Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/common/ac_shadowed_regs.c | 2 +- src/amd/vulkan/si_cmd_buffer.c | 4 +++- src/gallium/drivers/radeonsi/si_state.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/amd/common/ac_shadowed_regs.c b/src/amd/common/ac_shadowed_regs.c index 1ef2df5afb7..77cab6a9044 100644 --- a/src/amd/common/ac_shadowed_regs.c +++ b/src/amd/common/ac_shadowed_regs.c @@ -649,7 +649,7 @@ static const struct ac_reg_range Gfx103ContextShadowRange[] = { }, { R_02882C_PA_SU_PRIM_FILTER_CNTL, - 0x028848 - R_02882C_PA_SU_PRIM_FILTER_CNTL + 4, + R_028848_PA_CL_VRS_CNTL - R_02882C_PA_SU_PRIM_FILTER_CNTL + 4, }, { R_028A00_PA_SU_POINT_SIZE, diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index 5f772116d5f..7be781c3b7c 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -478,7 +478,9 @@ si_emit_graphics(struct radv_device *device, if (physical_device->rad_info.chip_class >= GFX10_3) { radeon_set_context_reg(cs, R_028750_SX_PS_DOWNCONVERT_CONTROL, 0xff); - radeon_set_context_reg(cs, 0x28848, 1 << 9); /* This fixes sample shading. */ + /* This allows sample shading. */ + radeon_set_context_reg(cs, R_028848_PA_CL_VRS_CNTL, + S_028848_SAMPLE_ITER_COMBINER_MODE(1)); } if (physical_device->rad_info.chip_class == GFX10) { diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 36d05cd376d..0352345bbc9 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -5358,7 +5358,9 @@ void si_init_cs_preamble_state(struct si_context *sctx, bool uses_reg_shadowing) if (sctx->chip_class >= GFX10_3) { si_pm4_set_reg(pm4, R_028750_SX_PS_DOWNCONVERT_CONTROL, 0xff); - si_pm4_set_reg(pm4, 0x28848, 1 << 9); /* This fixes sample shading. */ + /* This allows sample shading. */ + si_pm4_set_reg(pm4, R_028848_PA_CL_VRS_CNTL, + S_028848_SAMPLE_ITER_COMBINER_MODE(1)); } sctx->cs_preamble_state = pm4;