mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-05-01 06:13:08 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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) \
|
||||
\
|
||||
|
||||
Reference in New Issue
Block a user