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."
This commit is contained in:
Lynne 2021-11-20 02:36:21 +01:00
parent 135e1c0adf
commit b159975e80
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
1 changed files with 7 additions and 0 deletions

View File

@ -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;