Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/3] hwcontext_vulkan: expose image queue families
@ 2022-04-03 14:51 Lynne
       [not found] ` <MzjuD2p--3-2@lynne.ee-MzjuHsU----2>
  0 siblings, 1 reply; 6+ messages in thread
From: Lynne @ 2022-04-03 14:51 UTC (permalink / raw)
  To: Ffmpeg Devel

[-- Attachment #1: Type: text/plain, Size: 79 bytes --]

This allows for queue transition operations to be signalled.

Patch attached.


[-- Attachment #2: 0001-hwcontext_vulkan-expose-image-queue-families.patch --]
[-- Type: text/x-patch, Size: 1859 bytes --]

From e1ddb02864a772a0c9ce117c3f68a248c2550853 Mon Sep 17 00:00:00 2001
From: Lynne <dev@lynne.ee>
Date: Sun, 3 Apr 2022 16:40:17 +0200
Subject: [PATCH 1/3] hwcontext_vulkan: expose image queue families

---
 libavutil/hwcontext_vulkan.c | 2 ++
 libavutil/hwcontext_vulkan.h | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 237caa4bc0..1176858545 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2111,6 +2111,7 @@ static int create_frame(AVHWFramesContext *hwfc, AVVkFrame **frame,
             return AVERROR_EXTERNAL;
         }
 
+        f->queue_family[i] = p->num_qfs > 1 ? VK_QUEUE_FAMILY_IGNORED : p->qfs[0];
         f->layout[i] = create_info.initialLayout;
         f->access[i] = 0x0;
         f->sem_value[i] = 0;
@@ -2794,6 +2795,7 @@ static int vulkan_map_from_drm_frame_desc(AVHWFramesContext *hwfc, AVVkFrame **f
          * offer us anything we could import and sync with, so instead
          * just signal the semaphore we created. */
 
+        f->queue_family[i] = p->num_qfs > 1 ? VK_QUEUE_FAMILY_IGNORED : p->qfs[0];
         f->layout[i] = create_info.initialLayout;
         f->access[i] = 0x0;
         f->sem_value[i] = 0;
diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
index df86c85b3c..ce8a835c6f 100644
--- a/libavutil/hwcontext_vulkan.h
+++ b/libavutil/hwcontext_vulkan.h
@@ -264,6 +264,12 @@ typedef struct AVVkFrame {
      * Describes the binding offset of each plane to the VkDeviceMemory.
      */
     ptrdiff_t offset[AV_NUM_DATA_POINTERS];
+
+    /**
+     * Queue family of the images. Must be VK_QUEUE_FAMILY_IGNORED if
+     * the image was allocated with the CONCURRENT concurrency option.
+     */
+    uint32_t queue_family[AV_NUM_DATA_POINTERS];
 } AVVkFrame;
 
 /**
-- 
2.35.1


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-05 14:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 14:51 [FFmpeg-devel] [PATCH 1/3] hwcontext_vulkan: expose image queue families Lynne
     [not found] ` <MzjuD2p--3-2@lynne.ee-MzjuHsU----2>
2022-04-03 14:52   ` [FFmpeg-devel] [PATCH 2/3] hwcontext_vulkan: add queue and frame locking functions Lynne
2022-04-05  9:38     ` Anton Khirnov
2022-04-05 14:16       ` Lynne
     [not found]   ` <MzjuQ-Z--3-2@lynne.ee-MzjuTDW----2>
2022-04-03 14:53     ` [FFmpeg-devel] [PATCH 3/3] lavu: bump version and add APIchanges for Vulkan API changes Lynne
     [not found]     ` <MzjuZff--3-2@lynne.ee-Mzjubs4--J-2>
2022-04-03 15:49       ` [FFmpeg-devel] [PATCH] hwcontext_vulkan: properly enable sync2 and make prepare_frame compatible Lynne

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git