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

Git pushed a commit to branch master
in repository ffmpeg.

commit 97682155e6f84b2e157a1b167768d0ffb5a94554
Author:     Niklas Haas <[email protected]>
AuthorDate: Fri Mar 6 18:07:12 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Mon Mar 9 12:01:51 2026 +0100

    swscale/vulkan/ops: move buffer desc setting to helper function
    
    And call it on the read/write ops directly, rather than this awkward loop.
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/vulkan/ops.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/libswscale/vulkan/ops.c b/libswscale/vulkan/ops.c
index 7b7d51835a..6f88e9ad39 100644
--- a/libswscale/vulkan/ops.c
+++ b/libswscale/vulkan/ops.c
@@ -180,6 +180,28 @@ static void 
add_desc_read_write(FFVulkanDescriptorSetBinding *out_desc,
 }
 
 #if CONFIG_LIBSHADERC || CONFIG_LIBGLSLANG
+static void add_desc_read_write(FFVulkanDescriptorSetBinding *out_desc,
+                                enum FFVkShaderRepFormat *out_rep,
+                                const SwsOp *op)
+{
+    const char *img_type = op->type == SWS_PIXEL_F32 ? "rgba32f"  :
+                           op->type == SWS_PIXEL_U32 ? "rgba32ui" :
+                           op->type == SWS_PIXEL_U16 ? "rgba16ui" :
+                                                       "rgba8ui";
+
+    *out_desc = (FFVulkanDescriptorSetBinding) {
+        .name = op->op == SWS_OP_WRITE ? "dst_img" : "src_img",
+        .type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
+        .mem_layout = img_type,
+        .mem_quali = op->op == SWS_OP_WRITE ? "writeonly" : "readonly",
+        .dimensions = 2,
+        .elems = op->rw.packed ? 1 : op->rw.elems,
+        .stages = VK_SHADER_STAGE_COMPUTE_BIT,
+    };
+
+    *out_rep = op->type == SWS_PIXEL_F32 ? FF_VK_REP_FLOAT : FF_VK_REP_UINT;
+}
+
 static int add_ops_glsl(VulkanPriv *p, FFVulkanOpsCtx *s,
                         SwsOpList *ops, FFVulkanShader *shd)
 {

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

Reply via email to