Module: Mesa Branch: main Commit: 5082918d6588b3771ca1a09802e8585ee5a8ec43 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5082918d6588b3771ca1a09802e8585ee5a8ec43
Author: Samuel Pitoiset <[email protected]> Date: Fri Aug 26 13:36:34 2022 +0200 radv: simplify determining if NGG passthrough can be enabled NGG can't be enabled with XFB, so this check is redundant now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18278> --- src/amd/vulkan/radv_pipeline.c | 13 ------------- src/amd/vulkan/radv_shader_info.c | 5 ++--- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 8d208f49cfe..402674a7df7 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2791,19 +2791,6 @@ radv_fill_shader_info_ngg(struct radv_pipeline *pipeline, else stages[MESA_SHADER_VERTEX].info.is_ngg = false; } - - /* Determine if the pipeline is eligible for the NGG passthrough - * mode. It can't be enabled for geometry shaders, for NGG - * streamout or for vertex shaders that export the primitive ID - * (this is checked later because we don't have the info here.) - */ - if (!stages[MESA_SHADER_GEOMETRY].nir && !uses_xfb) { - if (stages[MESA_SHADER_TESS_CTRL].nir && stages[MESA_SHADER_TESS_EVAL].info.is_ngg) { - stages[MESA_SHADER_TESS_EVAL].info.is_ngg_passthrough = true; - } else if (stages[MESA_SHADER_VERTEX].nir && stages[MESA_SHADER_VERTEX].info.is_ngg) { - stages[MESA_SHADER_VERTEX].info.is_ngg_passthrough = true; - } - } } } diff --git a/src/amd/vulkan/radv_shader_info.c b/src/amd/vulkan/radv_shader_info.c index 77f70f68621..e69b2ce5641 100644 --- a/src/amd/vulkan/radv_shader_info.c +++ b/src/amd/vulkan/radv_shader_info.c @@ -1215,9 +1215,8 @@ radv_determine_ngg_settings(struct radv_device *device, struct radv_pipeline_sta /* NGG passthrough mode should be disabled when culling and when the vertex shader * exports the primitive ID. */ - es_stage->info.is_ngg_passthrough = es_stage->info.is_ngg_passthrough && - !es_stage->info.has_ngg_culling && !(es_stage->stage == MESA_SHADER_VERTEX && - es_stage->info.outinfo.export_prim_id); + es_stage->info.is_ngg_passthrough = !es_stage->info.has_ngg_culling && + !(es_stage->stage == MESA_SHADER_VERTEX && es_stage->info.outinfo.export_prim_id); } static void
