From: rcombs <rcombs@rcombs.me>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 1/3] lavu/hwcontext_vulkan: check for encode/decode queue extensions
Date: Sat, 4 Feb 2023 17:17:01 -0600
Message-ID: <20230204231703.9050-1-rcombs@rcombs.me> (raw)
These are currently beta features, and aren't always present.
---
libavutil/hwcontext_vulkan.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 2a9b5f4aac..589a7a7d9a 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -954,8 +954,16 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd)
((qf[i].queueFlags) & VK_QUEUE_GRAPHICS_BIT) ? " graphics" : "",
((qf[i].queueFlags) & VK_QUEUE_COMPUTE_BIT) ? " compute" : "",
((qf[i].queueFlags) & VK_QUEUE_TRANSFER_BIT) ? " transfer" : "",
+#ifdef VK_KHR_video_encode_queue
((qf[i].queueFlags) & VK_QUEUE_VIDEO_ENCODE_BIT_KHR) ? " encode" : "",
+#else
+ "",
+#endif
+#ifdef VK_KHR_video_decode_queue
((qf[i].queueFlags) & VK_QUEUE_VIDEO_DECODE_BIT_KHR) ? " decode" : "",
+#else
+ "",
+#endif
((qf[i].queueFlags) & VK_QUEUE_SPARSE_BINDING_BIT) ? " sparse" : "",
((qf[i].queueFlags) & VK_QUEUE_PROTECTED_BIT) ? " protected" : "",
qf[i].queueCount);
@@ -969,8 +977,16 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd)
graph_index = pick_queue_family(qf, num, VK_QUEUE_GRAPHICS_BIT);
comp_index = pick_queue_family(qf, num, VK_QUEUE_COMPUTE_BIT);
tx_index = pick_queue_family(qf, num, VK_QUEUE_TRANSFER_BIT);
+#ifdef VK_KHR_video_encode_queue
enc_index = pick_queue_family(qf, num, VK_QUEUE_VIDEO_ENCODE_BIT_KHR);
+#else
+ enc_index = -1;
+#endif
+#ifdef VK_KHR_video_decode_queue
dec_index = pick_queue_family(qf, num, VK_QUEUE_VIDEO_DECODE_BIT_KHR);
+#else
+ dec_index = -1;
+#endif
/* Signalling the transfer capabilities on a queue family is optional */
if (tx_index < 0) {
--
2.39.1
_______________________________________________
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".
next reply other threads:[~2023-02-04 23:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-04 23:17 rcombs [this message]
2023-02-04 23:17 ` [FFmpeg-devel] [PATCH 2/3] configure: check for vulkan beta extension support rcombs
2023-02-04 23:17 ` [FFmpeg-devel] [PATCH 3/3] lavu/vulkan: only request beta extensions if we detected they're present rcombs
2023-02-05 5:38 ` Lynne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230204231703.9050-1-rcombs@rcombs.me \
--to=rcombs@rcombs.me \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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