Module: Mesa
Branch: staging/22.0
Commit: c0777e3a4d3715101cef7d24a7a77fa8be943bec
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0777e3a4d3715101cef7d24a7a77fa8be943bec

Author: Pierre-Eric Pelloux-Prayer <[email protected]>
Date:   Mon May  9 22:20:12 2022 +0200

radeonsi: don't use wave32 for GE on gfx10 if culling is used

This is a workaround for issue #6457: it fixes the rendering and
prevent the hang but I can't explain why.

Reviewed-by: Marek Olšák <[email protected]>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6457
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16427>
(cherry picked from commit 1f3156460781d4ebd9dfb2ff6b9f176259cc5959)

---

 .pick_status.json                                 | 2 +-
 src/gallium/drivers/radeonsi/si_state_shaders.cpp | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4535b42584a..fe14ae62fed 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -860,7 +860,7 @@
         "description": "radeonsi: don't use wave32 for GE on gfx10 if culling 
is used",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "because_sha": null
     },
     {
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp 
b/src/gallium/drivers/radeonsi/si_state_shaders.cpp
index 8a7c07b7ba1..cd43bce6de7 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp
@@ -114,8 +114,11 @@ unsigned si_determine_wave_size(struct si_screen *sscreen, 
struct si_shader *sha
 
    /* There are a few very rare cases where VS is better with Wave32, and 
there are no known
     * cases where Wave64 is better.
+    * Wave32 is disabled for GFX10 when culling is active as a workaround for 
#6457. I don't
+    * know why this helps.
     */
-   if (stage <= MESA_SHADER_GEOMETRY)
+   if (stage <= MESA_SHADER_GEOMETRY &&
+       !(sscreen->info.chip_class == GFX10 && shader && 
shader->key.ge.opt.ngg_culling))
       return 32;
 
    /* TODO: Merged shaders must use the same wave size because the driver 
doesn't recompile

Reply via email to