From 2b688942c1b1f5ca4f3e4d33231579149aeb8fdb Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 12 Apr 2022 12:18:03 +0200 Subject: [PATCH] Revert "radv: Disable NGG for GS with suboptimal output vertex count." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Timur Kristóf Part-of: --- 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++) {