From 4632426c65f136ef70c4ab854a1076e1d1c868ff Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 28 Dec 2022 05:55:53 +0100 Subject: [PATCH 47/72] vulkan: return current queue index from ff_vk_qf_rotate() --- libavutil/vulkan.c | 3 ++- libavutil/vulkan.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index d045ff83c1..cb8e08e02f 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -240,9 +240,10 @@ int ff_vk_qf_init(FFVulkanContext *s, FFVkQueueFamilyCtx *qf, return ret; } -void ff_vk_qf_rotate(FFVkQueueFamilyCtx *qf) +int ff_vk_qf_rotate(FFVkQueueFamilyCtx *qf) { qf->cur_queue = (qf->cur_queue + 1) % qf->nb_queues; + return qf->cur_queue; } int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h index ccfa88f44f..dd1bc9c440 100644 --- a/libavutil/vulkan.h +++ b/libavutil/vulkan.h @@ -302,7 +302,7 @@ int ff_vk_qf_init(FFVulkanContext *s, FFVkQueueFamilyCtx *qf, /** * Rotate through the queues in a queue family. */ -void ff_vk_qf_rotate(FFVkQueueFamilyCtx *qf); +int ff_vk_qf_rotate(FFVkQueueFamilyCtx *qf); /** * Create a Vulkan sampler, will be auto-freed in ff_vk_filter_uninit() -- 2.39.2