radv: Slightly refactor the determination of max_ps_params.
It now uses has_dedicated_vram and gfx_level to detect GFX10.3+ discrete GPUs, which should also include GFX11 now. 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:
@@ -740,14 +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;
|
||||
unsigned max_render_backends = pdev->info.max_render_backends;
|
||||
unsigned max_se = pdev->info.max_se;
|
||||
unsigned max_ps_params = 4;
|
||||
|
||||
if (max_render_backends / max_se == 4)
|
||||
max_ps_params = 6; /* Navi21 and other GFX10.3 dGPUs. */
|
||||
else
|
||||
max_ps_params = 4; /* Navi 1x. */
|
||||
if (pdev->info.gfx_level >= GFX10_3 && pdev->info.has_dedicated_vram)
|
||||
max_ps_params = 6; /* 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)
|
||||
|
Reference in New Issue
Block a user