From 83cad95358323f18c8952f78402c8b47053d8c22 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 27 Sep 2023 15:15:51 +0200 Subject: [PATCH] radv: emit missing PA_{SC,SU}_LINE_STIPPLE_xxx regs in gfx preamble Ported from RadeonSI and PAL. This might fix the line stipple flakes in CI. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/si_cmd_buffer.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index 7da3141..95ae6ee 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -610,6 +610,15 @@ si_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs) radeon_set_context_reg(cs, R_02882C_PA_SU_PRIM_FILTER_CNTL, S_02882C_XMAX_RIGHT_EXCLUSION(exclusion) | S_02882C_YMAX_BOTTOM_EXCLUSION(exclusion)); + radeon_set_context_reg(cs, R_028828_PA_SU_LINE_STIPPLE_SCALE, 0x3f800000); + if (physical_device->rad_info.gfx_level >= GFX7) { + radeon_set_uconfig_reg(cs, R_030A00_PA_SU_LINE_STIPPLE_VALUE, 0); + radeon_set_uconfig_reg(cs, R_030A04_PA_SC_LINE_STIPPLE_STATE, 0); + } else { + radeon_set_config_reg(cs, R_008A60_PA_SU_LINE_STIPPLE_VALUE, 0); + radeon_set_config_reg(cs, R_008B10_PA_SC_LINE_STIPPLE_STATE, 0); + } + si_emit_compute(device, cs); } -- 2.7.4