radv: reserve more CS space when executing DGC calls

This can trigger an assert otherwise. The space reserved before
executing DGC IBs is an arbitrary number which should be large enough
in all cases.

Found this while implementing descriptor heap.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37681>
(cherry picked from commit 874bc09537)
This commit is contained in:
Samuel Pitoiset 2025-10-03 11:28:13 +02:00 committed by Eric Engestrom
parent 9d524bbd21
commit 0f5d8ed998
2 changed files with 5 additions and 1 deletions

View file

@ -5214,7 +5214,7 @@
"description": "radv: reserve more CS space when executing DGC calls",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -12108,6 +12108,8 @@ radv_dgc_execute_ib(struct radv_cmd_buffer *cmd_buffer, const VkGeneratedCommand
const uint64_t main_ib_va = ib_va + radv_get_indirect_main_cmdbuf_offset(pGeneratedCommandsInfo);
const uint64_t main_trailer_va = ib_va + radv_get_indirect_main_trailer_offset(pGeneratedCommandsInfo);
radeon_check_space(device->ws, cmd_buffer->cs, 64);
device->ws->cs_chain_dgc_ib(cmd_buffer->cs, main_ib_va, cmdbuf_size >> 2, main_trailer_va,
cmd_buffer->state.predicating);
@ -12208,6 +12210,8 @@ radv_CmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPr
}
if (!radv_cmd_buffer_uses_mec(cmd_buffer)) {
radeon_check_space(device->ws, cmd_buffer->cs, 2);
radeon_begin(cmd_buffer->cs);
radeon_emit(PKT3(PKT3_PFP_SYNC_ME, 0, cmd_buffer->state.predicating));
radeon_emit(0);