From cc9f34cdd698d21c5492f172ab2f17cff7bdb69f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 23 Sep 2021 12:41:06 -0500 Subject: [PATCH] anv: Switch to common GetDeviceQueues2 and DeviceWaitIdle Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_device.c | 50 ----------------------------------- 1 file changed, 50 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 3607f13ed28..2424d807a78 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3386,39 +3386,6 @@ VkResult anv_EnumerateInstanceLayerProperties( return vk_error(VK_ERROR_LAYER_NOT_PRESENT); } -void anv_GetDeviceQueue2( - VkDevice _device, - const VkDeviceQueueInfo2* pQueueInfo, - VkQueue* pQueue) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - struct anv_physical_device *pdevice = device->physical; - - assert(pQueueInfo->queueFamilyIndex < pdevice->queue.family_count); - struct anv_queue_family *queue_family = - &pdevice->queue.families[pQueueInfo->queueFamilyIndex]; - - int idx_in_family = 0; - struct anv_queue *queue = NULL; - for (uint32_t i = 0; i < device->queue_count; i++) { - if (device->queues[i].family != queue_family) - continue; - - if (idx_in_family == pQueueInfo->queueIndex) { - queue = &device->queues[i]; - break; - } - - idx_in_family++; - } - assert(queue != NULL); - - if (queue && queue->vk.flags == pQueueInfo->flags) - *pQueue = anv_queue_to_handle(queue); - else - *pQueue = NULL; -} - void _anv_device_report_lost(struct anv_device *device) { @@ -3560,23 +3527,6 @@ anv_device_wait(struct anv_device *device, struct anv_bo *bo, return anv_device_query_status(device); } -VkResult anv_DeviceWaitIdle( - VkDevice _device) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - - if (anv_device_is_lost(device)) - return VK_ERROR_DEVICE_LOST; - - for (uint32_t i = 0; i < device->queue_count; i++) { - VkResult res = anv_queue_submit_simple_batch(&device->queues[i], NULL); - if (res != VK_SUCCESS) - return res; - } - - return VK_SUCCESS; -} - uint64_t anv_vma_alloc(struct anv_device *device, uint64_t size, uint64_t align,