When lvp_queue_init fails, propagate the failure to the caller.
Signed-off-by: Greg Depoire--Ferrer <greg.depoire@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15071>
assert(pCreateInfo->queueCreateInfoCount == 1);
assert(pCreateInfo->pQueueCreateInfos[0].queueFamilyIndex == 0);
assert(pCreateInfo->pQueueCreateInfos[0].queueCount == 1);
- lvp_queue_init(device, &device->queue, pCreateInfo->pQueueCreateInfos, 0);
+ result = lvp_queue_init(device, &device->queue, pCreateInfo->pQueueCreateInfos, 0);
+ if (result != VK_SUCCESS) {
+ vk_free(&device->vk.alloc, device);
+ return result;
+ }
*pDevice = lvp_device_to_handle(device);