Module: Mesa
Branch: main
Commit: 83cad95358323f18c8952f78402c8b47053d8c22
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=83cad95358323f18c8952f78402c8b47053d8c22

Author: Samuel Pitoiset <[email protected]>
Date:   Wed Sep 27 15:15:51 2023 +0200

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25428>

---

 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 7da3141edd1..95ae6eedeaf 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);
 }
 

Reply via email to