vulkan: document flags choice for vkGetDeviceQueue
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 15 Feb 2021 16:25:16 +0000 (18:25 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 15 Feb 2021 19:01:28 +0000 (21:01 +0200)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9053>

src/vulkan/util/vk_device.c

index 44df409..cfaebc5 100644 (file)
@@ -131,6 +131,13 @@ vk_common_GetDeviceQueue(VkDevice _device,
    const VkDeviceQueueInfo2 info = {
       .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2,
       .pNext = NULL,
+      /* flags = 0 because (Vulkan spec 1.2.170 - vkGetDeviceQueue):
+       *
+       *    "vkGetDeviceQueue must only be used to get queues that were
+       *     created with the flags parameter of VkDeviceQueueCreateInfo set
+       *     to zero. To get queues that were created with a non-zero flags
+       *     parameter use vkGetDeviceQueue2."
+       */
       .flags = 0,
       .queueFamilyIndex = queueFamilyIndex,
       .queueIndex = queueIndex,