diff options
author | Lynne <dev@lynne.ee> | 2021-11-20 02:36:21 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2021-11-20 02:37:41 +0100 |
commit | b159975e8027a1fa7cd4ad89aba98ab5fb2e65f9 (patch) | |
tree | 48d43dbbdbb1613798cd001599fe3ce68db109aa /libavutil/hwcontext_vulkan.c | |
parent | 135e1c0adf155419a9546f02d620fb2aae95194b (diff) | |
download | ffmpeg-b159975e8027a1fa7cd4ad89aba98ab5fb2e65f9.tar.gz |
hwcontext_vulkan: check for non-flagged transfer queue families
"All commands that are allowed on a queue that supports transfer
operations are also allowed on a queue that supports either
graphics or compute operations. Thus, if the capabilities of a
queue family include VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT,
then reporting the VK_QUEUE_TRANSFER_BIT capability separately for
that queue family is optional."
Diffstat (limited to 'libavutil/hwcontext_vulkan.c')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 1e352d5ef7..f1e750cd3e 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -832,6 +832,13 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd) enc_index = pick_queue_family(qf, num, VK_QUEUE_VIDEO_ENCODE_BIT_KHR); dec_index = pick_queue_family(qf, num, VK_QUEUE_VIDEO_DECODE_BIT_KHR); + /* Signalling the transfer capabilities on a queue family is optional */ + if (tx_index < 0) { + tx_index = pick_queue_family(qf, num, VK_QUEUE_COMPUTE_BIT); + if (tx_index < 0) + tx_index = pick_queue_family(qf, num, VK_QUEUE_GRAPHICS_BIT); + } + hwctx->queue_family_index = -1; hwctx->queue_family_comp_index = -1; hwctx->queue_family_tx_index = -1; |