From 6bf19b2d70efee2f1e199c87c31b36a1f532c7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Tue, 5 Nov 2024 01:30:48 +0100 Subject: [PATCH] radv: Increase NGG culling PS param limit to 12 on GFX10. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Helps performance in Baldur's Gate 3 on Navi 10 when NGG culling is enabled. Also fix the description of the RADV_PERFTEST=nggc env var. Signed-off-by: Timur Kristóf Reviewed-by: Samuel Pitoiset Part-of: --- docs/envvars.rst | 2 +- src/amd/vulkan/radv_shader.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/envvars.rst b/docs/envvars.rst index d4e6f6b235b..f032c1ba2c7 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1663,7 +1663,7 @@ RadeonSI driver environment variables ``nongg`` Disable NGG and use the legacy pipeline. ``nggc`` - Always use NGG culling even when it can hurt. + Always use NGG culling even on GPUs where it is disabled by default. ``nonggc`` Disable NGG culling. ``switch_on_eop`` diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 16ef6fea85d..19c03191a68 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -669,6 +669,8 @@ radv_consider_culling(const struct radv_physical_device *pdev, struct nir_shader if (pdev->info.gfx_level >= GFX10_3 && pdev->info.has_dedicated_vram) max_ps_params = 12; /* GFX10.3 and newer discrete GPUs. */ + else if (pdev->info.gfx_level == GFX10 && pdev->info.has_dedicated_vram) + max_ps_params = 12; /* TODO: consider other heuristics here, such as PS execution time */ if (util_bitcount64(ps_inputs_read) > max_ps_params)