This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new dc54ec7a0d lavu/vulkan: wait for the frame timeline before the export
layout transition
dc54ec7a0d is described below
commit dc54ec7a0dccb411313361ffd702e0e389e79748
Author: Tymur Boiko <[email protected]>
AuthorDate: Fri Oct 16 22:01:25 2026 +0200
Commit: Lynne <[email protected]>
CommitDate: Sat Oct 17 02:06:11 2026 +0000
lavu/vulkan: wait for the frame timeline before the export layout transition
switch_layout() submits vkCmdPipelineBarrier2 on the compute queue. The
image was last written by vkCmdDecodeVideoKHR on the video queue, which
signals the frame timeline at VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR.
The layout transition is a write, and the cross-queue order is that
semaphore wait. VK_PIPELINE_STAGE_2_NONE names no stage, so the barrier
was outside the wait and raced VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR
(SYNC-HAZARD-WRITE-AFTER-WRITE). Wait at
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT so every command in the submission,
including the transition, happens after the signal.
---
libavutil/hwcontext_vulkan.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 63d2ab5c43..72e4df26c8 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2644,8 +2644,10 @@ static int switch_layout(AVHWFramesContext *hwfc,
FFVkExecPool *ectx,
if (err < 0)
return err;
+ /* NONE does not block any stage, so this queue's layout transition
+ * races a decode write submitted on the video queue. */
err = ff_vk_exec_add_dep_frame(&p->vkctx, exec, &tmp_frame,
- VK_PIPELINE_STAGE_2_NONE,
+ VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT);
if (err < 0)
return err;
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]