lavapipe: check for error when initializing lvp_queue

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>
This commit is contained in:
Greg Depoire--Ferrer 2022-02-18 01:09:18 +01:00 committed by Marge Bot
parent ba2f5cb20a
commit d3bef6ba73
1 changed files with 5 additions and 1 deletions

View File

@ -1552,7 +1552,11 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateDevice(
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);