From c6210d5aa9a2d246898c093aee31ab10c4b28a4e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 23 Sep 2021 12:44:31 -0500 Subject: [PATCH] turnip: Switch to common GetDeviceQueues2 and DeviceWaitIdle Reviewed-by: Emma Anholt Part-of: --- src/freedreno/vulkan/tu_device.c | 42 ---------------------------------------- 1 file changed, 42 deletions(-) diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index db62eb2..dd1ff49 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -1758,32 +1758,6 @@ tu_EnumerateInstanceLayerProperties(uint32_t *pPropertyCount, return VK_SUCCESS; } -VKAPI_ATTR void VKAPI_CALL -tu_GetDeviceQueue2(VkDevice _device, - const VkDeviceQueueInfo2 *pQueueInfo, - VkQueue *pQueue) -{ - TU_FROM_HANDLE(tu_device, device, _device); - struct tu_queue *queue; - - queue = - &device->queues[pQueueInfo->queueFamilyIndex][pQueueInfo->queueIndex]; - if (pQueueInfo->flags != queue->vk.flags) { - /* From the Vulkan 1.1.70 spec: - * - * "The queue returned by vkGetDeviceQueue2 must have the same - * flags value from this structure as that used at device - * creation time in a VkDeviceQueueCreateInfo instance. If no - * matching flags were specified at device creation time then - * pQueue will return VK_NULL_HANDLE." - */ - *pQueue = VK_NULL_HANDLE; - return; - } - - *pQueue = tu_queue_to_handle(queue); -} - VKAPI_ATTR VkResult VKAPI_CALL tu_QueueWaitIdle(VkQueue _queue) { @@ -1824,22 +1798,6 @@ tu_QueueWaitIdle(VkQueue _queue) } VKAPI_ATTR VkResult VKAPI_CALL -tu_DeviceWaitIdle(VkDevice _device) -{ - TU_FROM_HANDLE(tu_device, device, _device); - - if (tu_device_is_lost(device)) - return VK_ERROR_DEVICE_LOST; - - for (unsigned i = 0; i < TU_MAX_QUEUE_FAMILIES; i++) { - for (unsigned q = 0; q < device->queue_count[i]; q++) { - tu_QueueWaitIdle(tu_queue_to_handle(&device->queues[i][q])); - } - } - return VK_SUCCESS; -} - -VKAPI_ATTR VkResult VKAPI_CALL tu_EnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) -- 2.7.4