From 3414d4fdc5ec837506171ef8e787b7dcafd24c90 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 15 Feb 2021 18:25:16 +0200 Subject: [PATCH] vulkan: document flags choice for vkGetDeviceQueue Signed-off-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand Part-of: --- src/vulkan/util/vk_device.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vulkan/util/vk_device.c b/src/vulkan/util/vk_device.c index 44df409..cfaebc5 100644 --- a/src/vulkan/util/vk_device.c +++ b/src/vulkan/util/vk_device.c @@ -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, -- 2.7.4