From c037fe5ad1b3556809e5a549306a52a8a8bd1cbf Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Mon, 19 Aug 2019 01:36:06 +0200 Subject: [PATCH] radv: Disable NGG for geometry shaders. A bunch of remaining issues including some that affect users. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111248 Fixes: ee21bd7440c "radv/gfx10: implement NGG support (VS only)" Reviewed-by: Samuel Pitoiset --- src/amd/vulkan/radv_pipeline.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 4e9e9e9c9cd..2fdf241cb66 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2339,6 +2339,26 @@ radv_fill_shader_keys(struct radv_device *device, keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = false; } + /* + * Disable NGG with geometry shaders. There are a bunch of + * issues still: + * * GS primitives in pipeline statistic queries do not get + * updates. See dEQP-VK.query_pool.statistics_query.geometry_shader_primitives + * * dEQP-VK.clipping.user_defined.clip_cull_distance_dynamic_index.*geom* failures + * * Interactions with tessellation failing: + * dEQP-VK.tessellation.geometry_interaction.passthrough.tessellate_isolines_passthrough_geometry_no_change + * * General issues with the last primitive missing/corrupt: + * https://bugs.freedesktop.org/show_bug.cgi?id=111248 + * + * Furthermore, XGL/AMDVLK also disables this as of 9b632ef. + */ + if (nir[MESA_SHADER_GEOMETRY]) { + if (nir[MESA_SHADER_TESS_CTRL]) + keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = false; + else + keys[MESA_SHADER_VERTEX].vs_common_out.as_ngg = false; + } + /* TODO: Implement streamout support for NGG. */ gl_shader_stage last_xfb_stage = MESA_SHADER_VERTEX; -- 2.30.2