ac: disable late alloc on small gfx10 chips
authorMarek Olšák <marek.olsak@amd.com>
Wed, 11 Mar 2020 01:52:42 +0000 (21:52 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Mar 2020 17:27:23 +0000 (17:27 +0000)
same as PAL.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4143>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4143>

src/amd/common/ac_gpu_info.c

index e53a1a15afc3ebc264d3cd19f968b86dee26d0d6..47433ed26f5fd74df3558a033d8e1dfcc7eed174 100644 (file)
@@ -717,7 +717,8 @@ bool ac_query_gpu_info(int fd, void *dev_p,
                info->num_physical_sgprs_per_simd = 128 * info->max_wave64_per_simd * 2;
                info->min_sgpr_alloc = 128;
                info->sgpr_alloc_granularity = 128;
                info->num_physical_sgprs_per_simd = 128 * info->max_wave64_per_simd * 2;
                info->min_sgpr_alloc = 128;
                info->sgpr_alloc_granularity = 128;
-               info->use_late_alloc = true;
+               /* Don't use late alloc on small chips. */
+               info->use_late_alloc = info->num_render_backends > 4;
        } else if (info->chip_class >= GFX8) {
                info->num_physical_sgprs_per_simd = 800;
                info->min_sgpr_alloc = 16;
        } else if (info->chip_class >= GFX8) {
                info->num_physical_sgprs_per_simd = 800;
                info->min_sgpr_alloc = 16;