diff mbox series

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

Message ID 20210831014338.134086-1-wenbin.chen@intel.com
State New
Headers show
Series [FFmpeg-devel,01/10] libavfilter/vulkan: Fix problem when device have queue_count greater than 1 | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Wenbin Chen Aug. 31, 2021, 1:43 a.m. UTC
From: "Chen,Wenbin" <wenbin.chen@intel.com>

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@intel.com>
---
 libavfilter/vulkan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jean-Baptiste Kempf Aug. 31, 2021, 6:06 a.m. UTC | #1
Hello,

On Tue, 31 Aug 2021, at 03:43, wenbin.chen@intel.com wrote:
> From: "Chen,Wenbin" <wenbin.chen@intel.com>
> ...
> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
> ...
> email sent by "wenbin.chen@intel.com" (no name)

In this thread of patches, you have 3 ways of writing your name & email.

You should fix it (and IMHO, use the last one "Wenbin Chen <wenbin.chen@intel.com>").

best
Wenbin Chen Aug. 31, 2021, 6:44 a.m. UTC | #2
Ok, I will submit again.

> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Jean-Baptiste Kempf
> Sent: Tuesday, August 31, 2021 2:07 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 01/10] libavfilter/vulkan: Fix problem
> when device have queue_count greater than 1
> 
> Hello,
> 
> On Tue, 31 Aug 2021, at 03:43, wenbin.chen@intel.com wrote:
> > From: "Chen,Wenbin" <wenbin.chen@intel.com>
> > ...
> > Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
> > ...
> > email sent by "wenbin.chen@intel.com" (no name)
> 
> In this thread of patches, you have 3 ways of writing your name & email.
> 
> You should fix it (and IMHO, use the last one "Wenbin Chen
> <wenbin.chen@intel.com>").
> 
> best
> 
> --
> Jean-Baptiste Kempf -  President
> +33 672 704 734
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Jean-Baptiste Kempf Aug. 31, 2021, 6:45 a.m. UTC | #3
On Tue, 31 Aug 2021, at 08:44, Chen, Wenbin wrote:
> Ok, I will submit again.

Wait for the review. :D
diff mbox series

Patch

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