radv/amdgpu: do not use a constant value for the IB size in dwords

Better to avoid magic number.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31464>
This commit is contained in:
Samuel Pitoiset 2024-10-01 17:46:52 +02:00 committed by Marge Bot
parent 816ae4ee67
commit d1f3a92671

View file

@ -383,8 +383,7 @@ radv_amdgpu_cs_grow(struct radeon_cmdbuf *_cs, size_t min_size)
uint64_t ib_size = MAX2(min_size * 4 + 16, cs->base.max_dw * 4 * 2);
/* max that fits in the chain size field. */
ib_size = align(MIN2(ib_size, 0xfffff), ib_alignment);
ib_size = align(MIN2(ib_size, ~C_3F2_IB_SIZE), ib_alignment);
VkResult result = radv_amdgpu_cs_bo_create(cs, ib_size);