From 05211f419bb98dda7cee82e7f40f5eb6f2a6dc3b Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Tue, 13 Jan 2026 21:32:41 +0800 Subject: [PATCH] radeonsi: fix primitive restart gpu hang for pre gfx10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PAL always set WD_SWITCH_ON_EOP for pre gfx10 when primitve restart is enabled to prevent gpu hang. It only happens when specific index stream with primitive restart. Since we don't know what's the exact problem, just follow PAL to disable 4x primitive rate when primitive restart is enabled. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14629 Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák (cherry picked from commit 7d73ea20ec7d6da10ab5a1ac747184578359fdf9) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_state_draw.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3ff130b8871..a6fb7ce6457 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -394,7 +394,7 @@ "description": "radeonsi: fix primitive restart gpu hang for pre gfx10", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 142a8089875..cba737f9b97 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -749,17 +749,11 @@ static unsigned si_get_init_multi_vgt_param(struct si_screen *sscreen, union si_ /* WD_SWITCH_ON_EOP has no effect on GPUs with less than * 4 shader engines. Set 1 to pass the assertion below. * The other cases are hardware requirements. - * - * Polaris supports primitive restart with WD_SWITCH_ON_EOP=0 - * for points, line strips, and tri strips. */ if (sscreen->info.max_se <= 2 || key->u.prim == MESA_PRIM_POLYGON || key->u.prim == MESA_PRIM_LINE_LOOP || key->u.prim == MESA_PRIM_TRIANGLE_FAN || key->u.prim == MESA_PRIM_TRIANGLE_STRIP_ADJACENCY || - (key->u.primitive_restart && - (sscreen->info.family < CHIP_POLARIS10 || - (key->u.prim != MESA_PRIM_POINTS && key->u.prim != MESA_PRIM_LINE_STRIP && - key->u.prim != MESA_PRIM_TRIANGLE_STRIP))) || + key->u.primitive_restart || key->u.count_from_stream_output) wd_switch_on_eop = true;