anv: Unify GetDeviceQueue and GetDeviceQueue2

Avoid duplicating some checks and code by making anv_GetDeviceQueue a
subcase of anv_GetDeviceQueue2, like radv does.

Signed-off-by: Ricardo Garcia <rgarcia@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Ricardo Garcia 2019-11-07 15:38:45 +01:00 committed by Jason Ekstrand
parent 5b31182665
commit 20b403aad0
1 changed files with 8 additions and 4 deletions

View File

@ -2848,11 +2848,15 @@ void anv_GetDeviceQueue(
uint32_t queueIndex,
VkQueue* pQueue)
{
ANV_FROM_HANDLE(anv_device, device, _device);
const VkDeviceQueueInfo2 info = {
.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2,
.pNext = NULL,
.flags = 0,
.queueFamilyIndex = queueNodeIndex,
.queueIndex = queueIndex,
};
assert(queueIndex == 0);
*pQueue = anv_queue_to_handle(&device->queue);
anv_GetDeviceQueue2(_device, &info, pQueue);
}
void anv_GetDeviceQueue2(