radv: emit missing PA_{SC,SU}_LINE_STIPPLE_xxx regs in gfx preamble
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Sep 2023 13:15:51 +0000 (15:15 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 29 Sep 2023 07:50:46 +0000 (07:50 +0000)
Ported from RadeonSI and PAL.
This might fix the line stipple flakes in CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25428>

src/amd/vulkan/si_cmd_buffer.c

index 7da3141..95ae6ee 100644 (file)
@@ -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);
 }