diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2020-11-25 08:16:14 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-11-30 09:31:29 +0000 |
commit | bf36cfced183bac5bb5e2f8e564674071493bdad (patch) | |
tree | 449a4e0d6e97a302caadc7c00c1db3d0fe8b5831 /src/amd/vulkan/si_cmd_buffer.c | |
parent | 7729ea3d677e5f2c39013d112a9a395113229acf (diff) |
radv: only mask 1 CU for GS/VS waves on GFX10.3
Ported from Radeonsi and PAL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7769>
Diffstat (limited to 'src/amd/vulkan/si_cmd_buffer.c')
-rw-r--r-- | src/amd/vulkan/si_cmd_buffer.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index ee521f3a880..c20a39a01bb 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -347,12 +347,18 @@ si_emit_graphics(struct radv_device *device, } else { late_alloc_wave64 = (num_cu_per_sh - 2) * 4; - /* CU2 & CU3 disabled because of the dual CU design */ - cu_mask_vs = 0xfff3; + /* Gfx10: CU2 & CU3 must be disabled to + * prevent a hw deadlock. Others: CU1 must be + * disabled to prevent a hw deadlock. + * + * The deadlock is caused by late alloc, which + * usually increases performance. + */ + cu_mask_vs &= physical_device->rad_info.chip_class == GFX10 ? + ~BITFIELD_RANGE(2, 2) : ~BITFIELD_RANGE(1, 1); + if (physical_device->use_ngg) { - cu_mask_gs = 0xfff3; - } else { - cu_mask_gs = 0xffff; + cu_mask_gs = cu_mask_vs; } } |