radv/winsys: allow to submit up to 4 IBs for chips without chaining
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Apr 2018 11:42:36 +0000 (13:42 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Apr 2018 16:12:26 +0000 (18:12 +0200)
commitfedd0a4215bcd387525000d76b77993ca38916ae
tree3636311f7ed83569c582b73017c3aaabdb33cc15
parentff904978a1d299a36b58781df47351729a8e40b6
radv/winsys: allow to submit up to 4 IBs for chips without chaining

The SI family doesn't support chaining which means the maximum
size in dwords per CS is limited. When that limit was reached
we failed to submit the CS and the application crashed.

This patch allows to submit up to 4 IBs which is currently the
limit, but recent amdgpu supports more than that.

Please note that we can reach the limit of 4 IBs per submit
but currently we can't improve that. The only solution is to
upgrade libdrm. That will be improved later but for now this
should fix crashes on SI or when using RADV_DEBUG=noibs.

Fixes: 36cb5508e89 ("radv/winsys: Fail early on overgrown cs.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105775
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c