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

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>

---

 src/gallium/drivers/radeonsi/si_state_shaders.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp 
b/src/gallium/drivers/radeonsi/si_state_shaders.cpp
index 33bb4923157..798ce8640ed 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