Mesa (main): anv: Switch to common GetDeviceQueues2 and DeviceWaitIdle

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 28 21:32:55 UTC 2021


Module: Mesa
Branch: main
Commit: cc9f34cdd698d21c5492f172ab2f17cff7bdb69f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc9f34cdd698d21c5492f172ab2f17cff7bdb69f

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Sep 23 12:41:06 2021 -0500

anv: Switch to common GetDeviceQueues2 and DeviceWaitIdle

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

---

 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,



More information about the mesa-commit mailing list