mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
hwcontext_vulkan: fix p->img_qfs
The array was tied to our old queue API, which meant that if users set it, it was never set.
This commit is contained in:
parent
0aa4ac0faf
commit
32d47166c8
@ -1759,7 +1759,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
||||
tx_index = (ctx_qf == tx_index) ? -1 : tx_index; \
|
||||
enc_index = (ctx_qf == enc_index) ? -1 : enc_index; \
|
||||
dec_index = (ctx_qf == dec_index) ? -1 : dec_index; \
|
||||
p->img_qfs[p->nb_img_qfs++] = ctx_qf; \
|
||||
} while (0)
|
||||
|
||||
CHECK_QUEUE("graphics", 0, graph_index, hwctx->queue_family_index, hwctx->nb_graphics_queues);
|
||||
@ -1802,6 +1801,22 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
}
|
||||
}
|
||||
|
||||
/* Setup array for pQueueFamilyIndices with used queue families */
|
||||
p->nb_img_qfs = 0;
|
||||
for (int i = 0; i < hwctx->nb_qf; i++) {
|
||||
int seen = 0;
|
||||
/* Make sure each entry is unique
|
||||
* (VUID-VkBufferCreateInfo-sharingMode-01419) */
|
||||
for (int j = (i - 1); j >= 0; j--) {
|
||||
if (hwctx->qf[i].idx == hwctx->qf[j].idx) {
|
||||
seen = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!seen)
|
||||
p->img_qfs[p->nb_img_qfs++] = hwctx->qf[i].idx;
|
||||
}
|
||||
|
||||
if (!hwctx->lock_queue)
|
||||
hwctx->lock_queue = lock_queue;
|
||||
if (!hwctx->unlock_queue)
|
||||
|
Loading…
Reference in New Issue
Block a user