mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
radv: fix RADV_DEBUG=hang with multiple cmdbuffer per submission
With RADV_DEBUG=hang, there is only one cmdbuffer per submission and this has been broken recently. This fixes a segfault when generating GPU hang reports. Fixes:76deaa1b1a("radv: Refactor command buffer handling in radv_queue_submit_normal.") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20860> (cherry picked from commit7b76d46e38)
This commit is contained in:
parent
497e3028f0
commit
450ac592e2
2 changed files with 4 additions and 2 deletions
|
|
@ -715,7 +715,7 @@
|
|||
"description": "radv: fix RADV_DEBUG=hang with multiple cmdbuffer per submission",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "76deaa1b1a92ea6997d298e9b6ac1ed6433ba369"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5819,6 +5819,7 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi
|
|||
const bool last_submit = j + advance == cmd_buffer_count;
|
||||
bool submit_ace = false;
|
||||
unsigned num_submitted_cs = 0;
|
||||
unsigned cs_idx = 0;
|
||||
|
||||
if (queue->device->trace_bo)
|
||||
*queue->device->trace_id_ptr = 0;
|
||||
|
|
@ -5841,6 +5842,7 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi
|
|||
|
||||
can_patch &= !(cmd_buffer->usage_flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT);
|
||||
cs_array[num_submitted_cs++] = cmd_buffer->cs;
|
||||
cs_idx = num_submitted_cs - 1;
|
||||
}
|
||||
|
||||
/* Add gang wait postambles to make sure the gang leader waits for the whole gang. */
|
||||
|
|
@ -5864,7 +5866,7 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi
|
|||
goto fail;
|
||||
|
||||
if (queue->device->trace_bo) {
|
||||
radv_check_gpu_hangs(queue, cs_array[j]);
|
||||
radv_check_gpu_hangs(queue, cs_array[cs_idx]);
|
||||
}
|
||||
|
||||
if (queue->device->tma_bo) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue