Revert "radv: Disable NGG for GS with suboptimal output vertex count."
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Apr 2022 10:18:03 +0000 (12:18 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 12 Apr 2022 12:26:32 +0000 (12:26 +0000)
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@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15882>

src/amd/vulkan/radv_pipeline.c

index c93123d7ea23cef7d8b11e03702b8a0305081ef6..8bdc0bb06b898d20ca9dbd2414a74e7a8ecf3316 100644 (file)
@@ -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++) {