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

Git pushed a commit to branch master
in repository ffmpeg.

commit 2b0c0b2c000b2ecac8c211cddbd6aeee3d0293b1
Author:     Lynne <[email protected]>
AuthorDate: Sun Jul 19 20:53:20 2026 +0800
Commit:     Lynne <[email protected]>
CommitDate: Sun Aug 2 22:11:27 2026 +0900

    hwcontext_vulkan: do not enable host transfers on coinciding decode output
    
    Decode output which doubles as reference frames (COINCIDE mode)
    remains an active DPB slot for as long as the decoder keeps
    referencing it, and decode submissions bake the image layout into
    their barriers at record time. A host-side layout transition can
    therefore not be synchronized against them, and host transfers of such
    frames were found to corrupt image contents on Intel once frame
    threading varied the submission order.
    
    Do not set VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT on such frames. This
    makes the incompatibility visible through the usage flags, and routes
    our own transfer path through the queue.
---
 libavutil/hwcontext_vulkan.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 90d3d14dbb..40a53cbfaf 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -3025,9 +3025,15 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
                                            VK_IMAGE_USAGE_STORAGE_BIT      |
                                            VK_IMAGE_USAGE_SAMPLED_BIT);
 
+        /* Frames which may double as active references (coinciding decode
+         * output) cannot support host transfers: decode submissions bake the
+         * image layout into their barriers at record time, so a host-side
+         * layout transition cannot be synchronized against them, not even
+         * by the frame lock and timeline semaphore. */
         if (p->vkctx.extensions & FF_VK_EXT_HOST_IMAGE_COPY &&
             !(p->dprops.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY) &&
-            !(p->dprops.driverID == VK_DRIVER_ID_MOLTENVK))
+            !(p->dprops.driverID == VK_DRIVER_ID_MOLTENVK) &&
+            !(hwctx->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR))
             hwctx->usage |= supported_usage & 
VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT;
 
         /* Enables encoding of images, if supported by format and extensions */

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

Reply via email to