radv: Increase maximum allowed PS params for enabling NGG culling.

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 <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27751>
This commit is contained in:
Timur Kristóf
2024-02-22 16:06:20 +01:00
committed by Marge Bot
parent 4464e6baff
commit 8d97c3bd06

View File

@@ -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)