From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D01FB44321 for ; Sat, 4 Feb 2023 23:17:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E24C768BDFB; Sun, 5 Feb 2023 01:17:21 +0200 (EET) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A5D5B68BA04 for ; Sun, 5 Feb 2023 01:17:15 +0200 (EET) Received: by mail-il1-f179.google.com with SMTP id l7so3509705ilf.0 for ; Sat, 04 Feb 2023 15:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=i/+4M564Oc/kY2MTAUuxDQD8J1d2wDTooTT2d4V6ILs=; b=Fz5+JzzGEsqZ8ng0ODMR3e1otUF+eYbmqoUTiHOtuZ+JmtlUfV+r/0TJiLFNoCVV4y qrOEWXbC5TFTQKITcR3FNRCvKPbRm34ZQOq8I1YgUpmqOIoBcx2h3CaiyY50Rg5D7JoO bzrwd3nT+OqPM6EJvZOvamlTgEQtpRgah9uXxOtardpa4K3Yql8lrQkoUtmnhRN9wM4A 3gvbWz4nLrMWdr/Rw4vy41jkR/bahVfrfSEPwLbZqaEIn+voDwfwrYDkPkh/6sFFrp6t EJB/W2ZYojBAH5CU2B5sCEVgLtJQd4V0MlGwkyIvKyktQpMZ8brB/mkBuaskR3ZcDU2b tHLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i/+4M564Oc/kY2MTAUuxDQD8J1d2wDTooTT2d4V6ILs=; b=QUcB+jWLshB8gNPXIB2QwHW4KUzXYiC9nylbw8xd6EoRfVtq9wGuIFig2uvgS81zTM 5eDSs70H0VC7OvvvygRVNF01sCY3LNIHYs6XFZ+a67fPvFoLEYR3P10ndwZJ901il+6Q OSw3/3TusA2+iHn5GvWlN3geHQCjSI2ybrx8qsgl5iTMie/0oTcAFXdHusC/534kI+aJ A9Vs5j8LYMcyMBFxLHxrodh/X0JY3up0OKcwwYUcN0EeEJdSqK62u5iUlwp2NZ6RsHwd BtYEgAhnGLcX63VeTV8NLzWQxCEEmz+1yANqh5Kj3JxxsjvtV3R9XpOcG4YY+lDxlxbj VNaw== X-Gm-Message-State: AO0yUKV7LZLVvbA3GiXVAv2+oZ8DIETWQkxakcKRLWmTjN9MZh2TcmpJ NEa0oxu8NlPdjooEBWdd2GqPsmDEj6qeQegGHg== X-Google-Smtp-Source: AK7set/siUsBq2O6Cgwk289nDuD9cYhpzp9XL9S1akGrzyfAvfyUTMNaoRZnpMRlDKl5F/LJmDykFw== X-Received: by 2002:a05:6e02:1b0c:b0:311:ad48:ff1a with SMTP id i12-20020a056e021b0c00b00311ad48ff1amr8448375ilv.2.1675552633739; Sat, 04 Feb 2023 15:17:13 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:ac6c:b24e:29cb:25de]) by smtp.gmail.com with ESMTPSA id bo14-20020a056638438e00b0039e8c12414asm2115705jab.164.2023.02.04.15.17.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 04 Feb 2023 15:17:13 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Sat, 4 Feb 2023 17:17:01 -0600 Message-Id: <20230204231703.9050-1-rcombs@rcombs.me> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] lavu/hwcontext_vulkan: check for encode/decode queue extensions X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".