You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
vulkan: do not reinvent a queue context struct
We recently introduced a public field which was a superset of the queue context we used to have. Switch to using it entirely. This also allows us to get rid of the NIH function which was valid only for video queues.
This commit is contained in:
@@ -104,8 +104,8 @@ typedef struct VulkanDevicePriv {
|
||||
void *libvulkan;
|
||||
|
||||
FFVulkanContext vkctx;
|
||||
FFVkQueueFamilyCtx compute_qf;
|
||||
FFVkQueueFamilyCtx transfer_qf;
|
||||
AVVulkanDeviceQueueFamily *compute_qf;
|
||||
AVVulkanDeviceQueueFamily *transfer_qf;
|
||||
|
||||
/* Properties */
|
||||
VkPhysicalDeviceProperties2 props;
|
||||
@@ -1904,8 +1904,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
p->vkctx.hwctx = hwctx;
|
||||
|
||||
ff_vk_load_props(&p->vkctx);
|
||||
ff_vk_qf_init(&p->vkctx, &p->compute_qf, VK_QUEUE_COMPUTE_BIT);
|
||||
ff_vk_qf_init(&p->vkctx, &p->transfer_qf, VK_QUEUE_TRANSFER_BIT);
|
||||
p->compute_qf = ff_vk_qf_find(&p->vkctx, VK_QUEUE_COMPUTE_BIT, 0);
|
||||
p->transfer_qf = ff_vk_qf_find(&p->vkctx, VK_QUEUE_TRANSFER_BIT, 0);
|
||||
|
||||
end:
|
||||
av_free(qf_vid);
|
||||
@@ -2789,18 +2789,18 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
|
||||
if (!hwctx->unlock_frame)
|
||||
hwctx->unlock_frame = unlock_frame;
|
||||
|
||||
err = ff_vk_exec_pool_init(&p->vkctx, &p->compute_qf, &fp->compute_exec,
|
||||
p->compute_qf.nb_queues, 0, 0, 0, NULL);
|
||||
err = ff_vk_exec_pool_init(&p->vkctx, p->compute_qf, &fp->compute_exec,
|
||||
p->compute_qf->num, 0, 0, 0, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = ff_vk_exec_pool_init(&p->vkctx, &p->transfer_qf, &fp->upload_exec,
|
||||
p->transfer_qf.nb_queues*2, 0, 0, 0, NULL);
|
||||
err = ff_vk_exec_pool_init(&p->vkctx, p->transfer_qf, &fp->upload_exec,
|
||||
p->transfer_qf->num*2, 0, 0, 0, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = ff_vk_exec_pool_init(&p->vkctx, &p->transfer_qf, &fp->download_exec,
|
||||
p->transfer_qf.nb_queues, 0, 0, 0, NULL);
|
||||
err = ff_vk_exec_pool_init(&p->vkctx, p->transfer_qf, &fp->download_exec,
|
||||
p->transfer_qf->num, 0, 0, 0, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user