This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 95baff9b610822f51bb217d5143f3b2854038d1f
Author:     Lynne <[email protected]>
AuthorDate: Tue Dec 23 19:03:45 2025 +0100
Commit:     Lynne <[email protected]>
CommitDate: Wed Dec 31 15:00:46 2025 +0100

    vulkan: add ff_vk_buf_barrier()
    
    This is a shorthand way of writing buffer barrier structures.
---
 libavutil/vulkan.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
index d42bf514fe..115e9fc940 100644
--- a/libavutil/vulkan.h
+++ b/libavutil/vulkan.h
@@ -507,6 +507,25 @@ int ff_vk_create_imageviews(FFVulkanContext *s, 
FFVkExecContext *e,
                             VkImageView views[AV_NUM_DATA_POINTERS],
                             AVFrame *f, enum FFVkShaderRepFormat rep_fmt);
 
+#define ff_vk_buf_barrier(dst, vkb, s_stage, s_access, s_access2,              
\
+                          d_stage, d_access, d_access2, offs, bsz)             
\
+    do {                                                                       
\
+        dst = (VkBufferMemoryBarrier2) {                                       
\
+            .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2,                
\
+            .srcStageMask = VK_PIPELINE_STAGE_2_ ##s_stage,                    
\
+            .srcAccessMask = VK_ACCESS_2_ ##s_access |                         
\
+                             VK_ACCESS_2_ ##s_access2,                         
\
+            .dstStageMask = VK_PIPELINE_STAGE_2_ ##d_stage,                    
\
+            .dstAccessMask = VK_ACCESS_2_ ##d_access |                         
\
+                             VK_ACCESS_2_ ##d_access2,                         
\
+            .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,                    
\
+            .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,                    
\
+            .buffer = vkb->buf,                                                
\
+            .offset = offs,                                                    
\
+            .size = bsz                                                        
\
+        };                                                                     
\
+    } while(0)
+
 void ff_vk_frame_barrier(FFVulkanContext *s, FFVkExecContext *e,
                          AVFrame *pic, VkImageMemoryBarrier2 *bar, int *nb_bar,
                          VkPipelineStageFlags2 src_stage,

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to