[FFmpeg-devel] [V2 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1
Wenbin Chen
wenbin.chen at intel.com
Tue Aug 31 10:24:21 EEST 2021
If the descriptorSetCount is greater than the number of setLayouts,
vkAllocateDescriptorSets will report error. Now fix it.
Now the following command can run on the device that has queue_count greater
than one:
ffmpeg -v verbose -init_hw_device vulkan=vul:0 -filter_hw_device vul
-i input1080p.264 -vf "hwupload=extra_hw_frames=16,scale_vulkan=1920:1080,
hwdownload,format=yuv420p" -f rawvideo output.yuv
Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
---
libavfilter/vulkan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vulkan.c b/libavfilter/vulkan.c
index 337c8d7d5a..e5b070b3e6 100644
--- a/libavfilter/vulkan.c
+++ b/libavfilter/vulkan.c
@@ -1160,7 +1160,7 @@ void ff_vk_update_descriptor_set(AVFilterContext *avctx, VulkanPipeline *pl,
VulkanFilterContext *s = avctx->priv;
vkUpdateDescriptorSetWithTemplate(s->hwctx->act_dev,
- pl->desc_set[s->cur_queue_idx * pl->desc_layout_num + set_id],
+ pl->desc_set[set_id],
pl->desc_template[set_id],
s);
}
@@ -1179,7 +1179,7 @@ int ff_vk_init_pipeline_layout(AVFilterContext *avctx, VulkanPipeline *pl)
VkResult ret;
VulkanFilterContext *s = avctx->priv;
- pl->descriptor_sets_num = pl->desc_layout_num * s->queue_count;
+ pl->descriptor_sets_num = pl->desc_layout_num;
{ /* Init descriptor set pool */
VkDescriptorPoolCreateInfo pool_create_info = {
--
2.25.1
More information about the ffmpeg-devel
mailing list