Mesa (main): Revert "radv: Disable NGG for GS with suboptimal output vertex count."

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 12 12:44:40 UTC 2022


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Apr 12 12:18:03 2022 +0200

Revert "radv: Disable NGG for GS with suboptimal output vertex count."

It breaks too many things and shouldn't have been merged. The fix isn't
trivial and it will probably not be backported because it's intrusive.

It will be re-applied later when everything will work.

This reverts commit 94706601fa2f52605d6e488f30fad9a0e2440612.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15882>

---

 src/amd/vulkan/radv_pipeline.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index c93123d7ea2..8bdc0bb06b8 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -3206,19 +3206,6 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
          stages[MESA_SHADER_TESS_EVAL].info.is_ngg = false;
       }
 
-      if (stages[MESA_SHADER_GEOMETRY].nir &&
-          stages[MESA_SHADER_GEOMETRY].nir->info.gs.vertices_out >= 9) {
-         /* GS has suboptimal number of output vertices. In this case,
-          * the occupancy of NGG GS is very low, and API GS invocations
-          * can't even occupy a single Wave32 wave.
-          * Therefore the legacy pipeline performs better here.
-          */
-         if (stages[MESA_SHADER_TESS_EVAL].nir)
-            stages[MESA_SHADER_TESS_EVAL].info.is_ngg = false;
-         else
-            stages[MESA_SHADER_VERTEX].info.is_ngg = false;
-      }
-
       gl_shader_stage last_xfb_stage = MESA_SHADER_VERTEX;
 
       for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {



More information about the mesa-commit mailing list