ffmpeg | branch: master | IndecisiveTurtle <geoste...@gmail.com> | Fri Feb 28 
09:49:11 2025 +0200| [b37ce9b0166827bbd3a6ad4cd8959d326daf62aa] | committer: 
Lynne
libavutil/vulkan: Expose ff_vk_set_descriptor_image

Useful when creating a descriptor array of separate images

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b37ce9b0166827bbd3a6ad4cd8959d326daf62aa
---

 libavutil/vulkan.c | 12 ++++++------
 libavutil/vulkan.h |  8 ++++++++
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 31610e2d94..91415957fd 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -2381,10 +2381,10 @@ static inline void 
update_set_pool_write(FFVulkanContext *s, FFVkExecContext *e,
     }
 }
 
-static int vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
-                                   FFVkExecContext *e, int set, int bind, int 
offs,
-                                   VkImageView view, VkImageLayout layout,
-                                   VkSampler sampler)
+int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
+                               FFVkExecContext *e, int set, int bind, int offs,
+                               VkImageView view, VkImageLayout layout,
+                               VkSampler sampler)
 {
     FFVulkanDescriptorSet *desc_set = &shd->desc_set[set];
 
@@ -2521,8 +2521,8 @@ void ff_vk_shader_update_img_array(FFVulkanContext *s, 
FFVkExecContext *e,
     const int nb_planes = av_pix_fmt_count_planes(hwfc->sw_format);
 
     for (int i = 0; i < nb_planes; i++)
-        vk_set_descriptor_image(s, shd, e, set, binding, i,
-                                views[i], layout, sampler);
+        ff_vk_set_descriptor_image(s, shd, e, set, binding, i,
+                                   views[i], layout, sampler);
 }
 
 void ff_vk_shader_update_push_const(FFVulkanContext *s, FFVkExecContext *e,
diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
index 8690c13b3d..617df952c4 100644
--- a/libavutil/vulkan.h
+++ b/libavutil/vulkan.h
@@ -590,6 +590,14 @@ int ff_vk_shader_update_desc_buffer(FFVulkanContext *s, 
FFVkExecContext *e,
                                     FFVkBuffer *buf, VkDeviceSize offset, 
VkDeviceSize len,
                                     VkFormat fmt);
 
+/**
+ * Sets an image descriptor for specified shader and binding.
+ */
+int ff_vk_set_descriptor_image(FFVulkanContext *s, FFVulkanShader *shd,
+                               FFVkExecContext *e, int set, int bind, int offs,
+                               VkImageView view, VkImageLayout layout,
+                               VkSampler sampler);
+
 /**
  * Update a descriptor in a buffer with an image array..
  * Must be called before binding the shader.

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to