libavutil/vulkan: replace GetDeviceQueue with GetDeviceQueue2

vkGetDeviceQueue2 with flags = 0 is equivalent to vkGetDeviceQueue and
is available since Vulkan 1.1. Needed to support queues created with
non-zero VkDeviceQueueCreateFlags.

Fixes VUID-vkGetDeviceQueue-flags-01841 VVL error.
This commit is contained in:
llyyr
2026-04-24 16:00:11 +05:30
parent 163ba704b7
commit 51660ad523
2 changed files with 12 additions and 2 deletions

View File

@@ -507,7 +507,17 @@ int ff_vk_exec_pool_init(FFVulkanContext *s, AVVulkanDeviceQueueFamily *qf,
/* Queue index distribution */
e->qi = i % qf->num;
e->qf = qf->idx;
vk->GetDeviceQueue(s->hwctx->act_dev, qf->idx, e->qi, &e->queue);
VkDeviceQueueInfo2 qinfo = {
.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2,
#ifdef VK_KHR_internally_synchronized_queues
.flags = (s->extensions & FF_VK_EXT_INTERNAL_QUEUE_SYNC)
? VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR
: 0,
#endif
.queueFamilyIndex = qf->idx,
.queueIndex = e->qi,
};
vk->GetDeviceQueue2(s->hwctx->act_dev, &qinfo, &e->queue);
}
return 0;

View File

@@ -121,7 +121,7 @@ typedef uint64_t FFVulkanExtensions;
MACRO(1, 1, FF_VK_EXT_NO_FLAG, CmdDispatchBase) \
\
/* Queue */ \
MACRO(1, 1, FF_VK_EXT_NO_FLAG, GetDeviceQueue) \
MACRO(1, 1, FF_VK_EXT_NO_FLAG, GetDeviceQueue2) \
MACRO(1, 1, FF_VK_EXT_NO_FLAG, QueueSubmit) \
MACRO(1, 1, FF_VK_EXT_NO_FLAG, QueueSubmit2) \
\