mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 01:38:06 +02:00
radv: initialize cmd_buffer upload list earlier
When cs allocation fails in radv_create_cmd_buffer, radv_destroy_cmd_buffer is called before returning VK_ERROR_OUT_OF_HOST_MEMORY. At that point, the upload list is not initalized yet, so SIGSEGV will occur when trying to iterate through the upload bo list. Initialize the upload list earlier to avoid this. Signed-off-by: Benjamin Cheng <ben@bcheng.me> Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22016>
This commit is contained in:
parent
270f9c0b06
commit
e57caf9893
1 changed files with 2 additions and 2 deletions
|
|
@ -352,6 +352,8 @@ radv_create_cmd_buffer(struct vk_command_pool *pool,
|
|||
return result;
|
||||
}
|
||||
|
||||
list_inithead(&cmd_buffer->upload.list);
|
||||
|
||||
cmd_buffer->device = device;
|
||||
|
||||
cmd_buffer->qf = vk_queue_to_radv(device->physical_device, pool->queue_family_index);
|
||||
|
|
@ -373,8 +375,6 @@ radv_create_cmd_buffer(struct vk_command_pool *pool,
|
|||
|
||||
*cmd_buffer_out = &cmd_buffer->vk;
|
||||
|
||||
list_inithead(&cmd_buffer->upload.list);
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue