diff options
author | Lynne <dev@lynne.ee> | 2024-12-03 15:31:49 +0900 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-12-23 04:25:09 +0900 |
commit | 2e06b84e2747ef4ea4d9f5c20c936aa866f7647d (patch) | |
tree | ba037209826667bf2eb78796b180b673e40b36dc /libavutil/hwcontext_vulkan.c | |
parent | 157cd820adbbfcfd1870a6ce12d072dc0f623e9b (diff) | |
download | ffmpeg-2e06b84e2747ef4ea4d9f5c20c936aa866f7647d.tar.gz |
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.
Diffstat (limited to 'libavutil/hwcontext_vulkan.c')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 6eca097ea3..d32a685383 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -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; |