radv: Implement VkGetDeviceQueue2.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 21 Jan 2018 15:11:48 +0000 (16:11 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 7 Mar 2018 20:18:35 +0000 (21:18 +0100)
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c

index c16944e5f8ee857e11bb1c74c430ea250dce47c8..586a6e6b7cd9dd61851e2b3443f949e719e88cc4 100644 (file)
@@ -1403,15 +1403,29 @@ VkResult radv_EnumerateDeviceLayerProperties(
        return vk_error(VK_ERROR_LAYER_NOT_PRESENT);
 }
 
+void radv_GetDeviceQueue2(
+       VkDevice                                    _device,
+       const VkDeviceQueueInfo2*                   pQueueInfo,
+       VkQueue*                                    pQueue)
+{
+       RADV_FROM_HANDLE(radv_device, device, _device);
+
+       *pQueue = radv_queue_to_handle(&device->queues[pQueueInfo->queueFamilyIndex][pQueueInfo->queueIndex]);
+}
+
 void radv_GetDeviceQueue(
        VkDevice                                    _device,
        uint32_t                                    queueFamilyIndex,
        uint32_t                                    queueIndex,
        VkQueue*                                    pQueue)
 {
-       RADV_FROM_HANDLE(radv_device, device, _device);
+       const VkDeviceQueueInfo2 info = (VkDeviceQueueInfo2) {
+               .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2,
+               .queueFamilyIndex = queueFamilyIndex,
+               .queueIndex = queueIndex
+       };
 
-       *pQueue = radv_queue_to_handle(&device->queues[queueFamilyIndex][queueIndex]);
+       radv_GetDeviceQueue2(_device, &info, pQueue);
 }
 
 static void