From 8d97c3bd064ca9b493990a1dbfd180764ab2ea60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Thu, 22 Feb 2024 16:06:20 +0100 Subject: [PATCH] radv: Increase maximum allowed PS params for enabling NGG culling. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original limits were chosen very conservatively because at that time we didn't have a good understanding on the perf impact of shader culling. Since then, we've seen some use cases that have a higher amount of PS params but still benefit from shader culling. Signed-off-by: Timur Kristóf Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 079b60893f3..869bf37540f 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -740,10 +740,10 @@ radv_consider_culling(const struct radv_physical_device *pdev, struct nir_shader /* Shader based culling efficiency can depend on PS throughput. * Estimate an upper limit for PS input param count based on GPU info. */ - unsigned max_ps_params = 4; + unsigned max_ps_params = 8; if (pdev->info.gfx_level >= GFX10_3 && pdev->info.has_dedicated_vram) - max_ps_params = 6; /* GFX10.3 and newer discrete GPUs. */ + max_ps_params = 12; /* GFX10.3 and newer discrete GPUs. */ /* TODO: consider other heuristics here, such as PS execution time */ if (util_bitcount64(ps_inputs_read & ~VARYING_BIT_POS) > max_ps_params)