radv/amdgpu: fix executing secondaries without IB2
If a secondary cmdbuf has been grown and is executed without IB2
(eg. on compute queue or when it's not allowed), the ib size ptr
contains chaining info, which means the IB size was wrong.
This fixes CPU crashes when running gl_vk_meshlet_cadscene.
Fixes: 277b2afd70 ("radv/amdgpu: add support for executing DGC cmdbuf with RADV_DEBUG=noibs")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24891>
This commit is contained in:
committed by
Marge Bot
parent
40d7cb4000
commit
9206aeb077
@@ -455,7 +455,8 @@ radv_amdgpu_cs_finalize(struct radeon_cmdbuf *_cs)
|
||||
}
|
||||
|
||||
/* Append the current (last) IB to the array of IB buffers. */
|
||||
radv_amdgpu_cs_add_ib_buffer(cs, cs->ib_buffer, 0, cs->use_ib ? *cs->ib_size_ptr : cs->base.cdw, false);
|
||||
radv_amdgpu_cs_add_ib_buffer(cs, cs->ib_buffer, 0, cs->use_ib ? G_3F2_IB_SIZE(*cs->ib_size_ptr) : cs->base.cdw,
|
||||
false);
|
||||
|
||||
/* Prevent freeing this BO twice. */
|
||||
cs->ib_buffer = NULL;
|
||||
|
||||
Reference in New Issue
Block a user