mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
turnip: fix error handling for tu_queue_init
tu_queue_finish can only be called on initialized queues. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18510>
This commit is contained in:
parent
0308abbe46
commit
79c75a3e97
1 changed files with 4 additions and 2 deletions
|
|
@ -1856,8 +1856,10 @@ tu_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||
for (unsigned q = 0; q < queue_create->queueCount; q++) {
|
||||
result = tu_queue_init(device, &device->queues[qfi][q], q,
|
||||
queue_create);
|
||||
if (result != VK_SUCCESS)
|
||||
if (result != VK_SUCCESS) {
|
||||
device->queue_count[qfi] = q;
|
||||
goto fail_queues;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2056,7 +2058,7 @@ fail_queues:
|
|||
for (unsigned i = 0; i < TU_MAX_QUEUE_FAMILIES; i++) {
|
||||
for (unsigned q = 0; q < device->queue_count[i]; q++)
|
||||
tu_queue_finish(&device->queues[i][q]);
|
||||
if (device->queue_count[i])
|
||||
if (device->queues[i])
|
||||
vk_free(&device->vk.alloc, device->queues[i]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue