[FFmpeg-cvslog] hwcontext_vulkan: properly migrate queue families with DRM import/export

Lynne git at videolan.org
Sat Nov 13 01:04:23 EET 2021


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Fri Nov 12 23:54:36 2021 +0100| [fa28c1b2f9d6fa9e3c0e89c27ad9a55add3a620f] | committer: Lynne

hwcontext_vulkan: properly migrate queue families with DRM import/export

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

 libavutil/hwcontext_vulkan.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index f5c0c775e4..4ab8a3f6ad 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1677,7 +1677,6 @@ static int alloc_bind_mem(AVHWFramesContext *hwfc, AVVkFrame *f,
 
 enum PrepMode {
     PREP_MODE_WRITE,
-    PREP_MODE_RO_SHADER,
     PREP_MODE_EXTERNAL_EXPORT,
     PREP_MODE_EXTERNAL_IMPORT
 };
@@ -1722,12 +1721,6 @@ static int prepare_frame(AVHWFramesContext *hwfc, VulkanExecCtx *ectx,
         src_qf     = VK_QUEUE_FAMILY_IGNORED;
         dst_qf     = VK_QUEUE_FAMILY_IGNORED;
         break;
-    case PREP_MODE_RO_SHADER:
-        new_layout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
-        new_access = VK_ACCESS_TRANSFER_READ_BIT;
-        src_qf     = VK_QUEUE_FAMILY_IGNORED;
-        dst_qf     = VK_QUEUE_FAMILY_IGNORED;
-        break;
     case PREP_MODE_EXTERNAL_IMPORT:
         new_layout = VK_IMAGE_LAYOUT_GENERAL;
         new_access = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
@@ -2504,10 +2497,7 @@ static int vulkan_map_from_drm_frame_desc(AVHWFramesContext *hwfc, AVVkFrame **f
         goto fail;
     }
 
-    /* NOTE: This is completely uneccesary and unneeded once we can import
-     * semaphores from DRM. Otherwise we have to activate the semaphores.
-     * We're reusing the exec context that's also used for uploads/downloads. */
-    err = prepare_frame(hwfc, &fp->conv_ctx, f, PREP_MODE_RO_SHADER);
+    err = prepare_frame(hwfc, &fp->conv_ctx, f, PREP_MODE_EXTERNAL_IMPORT);
     if (err)
         goto fail;
 



More information about the ffmpeg-cvslog mailing list