avutil/hwcontext_vulkan: publicly expose queue device creation flags

These are needed for interop with e.g. libplacebo, which needs to know the
correct flags to call vkGetDeviceQueue2.

Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas Haas
2026-06-02 13:32:43 +02:00
parent 80375ca773
commit 9fe5758da5
4 changed files with 13 additions and 7 deletions
+3
View File
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
API changes, most recent first:
2026-06-xx - xxxxxxxxxxx - lavu 60.32.100 - hwcontext_vulkan.h
Add AVVulkanDeviceContext.queue_flags.
2026-05-xx - xxxxxxxxxx - lavf 62.19.100 - avformat.h
Add AVStreamGroupLayeredVideo
Add AVStreamGroup.params.layered_video
+6 -6
View File
@@ -1633,6 +1633,11 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd)
}
hwctx->nb_qf = 0;
hwctx->queue_flags = 0;
#ifdef VK_KHR_internally_synchronized_queues
if (p->vkctx.extensions & FF_VK_EXT_INTERNAL_QUEUE_SYNC)
hwctx->queue_flags |= VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR;
#endif
/* Pick each queue family to use. */
#define PICK_QF(type, vid_op) \
@@ -1727,14 +1732,9 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd)
weights[j] = 1.0;
pc = (VkDeviceQueueCreateInfo *)cd->pQueueCreateInfos;
VkDeviceQueueCreateFlags qflags = 0;
#ifdef VK_KHR_internally_synchronized_queues
if (p->vkctx.extensions & FF_VK_EXT_INTERNAL_QUEUE_SYNC)
qflags |= VK_DEVICE_QUEUE_CREATE_INTERNALLY_SYNCHRONIZED_BIT_KHR;
#endif
pc[cd->queueCreateInfoCount++] = (VkDeviceQueueCreateInfo) {
.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
.flags = qflags,
.flags = hwctx->queue_flags,
.queueFamilyIndex = hwctx->qf[i].idx,
.queueCount = hwctx->qf[i].num,
.pQueuePriorities = weights,
+3
View File
@@ -199,6 +199,9 @@ typedef struct AVVulkanDeviceContext {
*/
AVVulkanDeviceQueueFamily qf[64];
int nb_qf;
/* Queue creation flags, for vkGetDeviceQueue2. */
VkDeviceQueueCreateFlags queue_flags;
} AVVulkanDeviceContext;
/**
+1 -1
View File
@@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 60
#define LIBAVUTIL_VERSION_MINOR 31
#define LIBAVUTIL_VERSION_MINOR 32
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \