[FFmpeg-devel] [V2 01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1

Dennis Mungai dmngaie at gmail.com
Sat Nov 19 22:47:43 EET 2022


On Tue, 31 Aug 2021 at 10:26, Wenbin Chen <wenbin.chen at intel.com> wrote:

> 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
>

Hello there,

Was this ever merged? I have an issue mentioned in ticket #8962, see
https://trac.ffmpeg.org/ticket/8962 and this thread on Reddit
https://www.reddit.com/r/ffmpeg/comments/jn5skj/comment/gazmt8b/?utm_source=share&utm_medium=web2x&context=3


More information about the ffmpeg-devel mailing list