From patchwork Sat Feb 4 23:17:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 40283 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp2234442pzk; Sat, 4 Feb 2023 15:17:28 -0800 (PST) X-Google-Smtp-Source: AK7set9RgAEcB2Dy8P6293GzAS58X3/FdhZlF8XzyBsXyqHQiZlx9ElBHCGDLjv3VQdiTXC4RH51 X-Received: by 2002:a05:6402:4446:b0:49d:fff2:d4b9 with SMTP id o6-20020a056402444600b0049dfff2d4b9mr15323349edb.23.1675552648632; Sat, 04 Feb 2023 15:17:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675552648; cv=none; d=google.com; s=arc-20160816; b=PoUnUpVVOXRow/Mvf2pgRAflS+/e2aONgs/RACdCkxyzg7pdcRVMlHHCelsUXakL+i 1zRm1ioEWHiOtp+w3PU/YrPZr7dS/M+asoVGkM/MPPGNe8cRAZVNJamoFlRVY8sQI951 gH7lQEBIP7RgSOvEDLYNIftV/jTAVJmKArUaiu41gyNOgfGXjNkRRsms2Ienyo7I2/pB xej2ssn8DwCu/H6z+nC052O5FPw4QPl8QdGkYla/USO0ViIsEocLipR0RlwuT2/c6ck/ cQs+tJThtS+d60bg+QZuAaaJtBpq5HUI4n4poxRL02mx0nOqdu9PZk2Ii2VRTPNJDTdq WSIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=t1bWm431R0U7n0JYmN3e7AnL+lFDzbxk+b/WvQK22CY=; b=pmce39uMUdLzabVxq5RHlL3E3kJx6itLO+UTIiMEeN4SYCpkQJ28J2v6TM/+SAfQ2Z s+c/Ah7A/bB+iHpzp9mGlnwRPajFej+qdlA++dtItF+SY+lcN/Lhbc94X05mGWa5nYwM rUUElpzxNhVVy0khr+W6RABre8V3dgUw8yNqvOYTv6Ym5e2H1hGx0ZnndjfjsyXK+IH1 jPiCQK2cNLVzwwrxwd3pnVxnqqiRlT8VJPp2c3aYyAqURrIPcoTFLpFwHszRACp5r5Fh QuGvX3O2N8XX2T09sG14ce0T+9Ob8t06Qg7cjF/xV9GcZ+K2pk+ejWv1S3MUnk3ZpMNc WM6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=Fz5+JzzG; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j4-20020aa7c0c4000000b004a0ae493192si6669672edp.505.2023.02.04.15.17.26; Sat, 04 Feb 2023 15:17:28 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=Fz5+JzzG; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 234E768BE64; Sun, 5 Feb 2023 01:17:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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-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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: GbF0PcSPxNZV 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) { From patchwork Sat Feb 4 23:17:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 40284 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp2234486pzk; Sat, 4 Feb 2023 15:17:36 -0800 (PST) X-Google-Smtp-Source: AK7set9Y52okKaoNYXzKqvNY3vIGMJpxwYPt8NBMJksBOiwV2dUDPyPH6vFAoSDYyrOM+zPUYrkc X-Received: by 2002:a17:907:7211:b0:88d:ba89:184f with SMTP id dr17-20020a170907721100b0088dba89184fmr12294186ejc.32.1675552656385; Sat, 04 Feb 2023 15:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675552656; cv=none; d=google.com; s=arc-20160816; b=EWFedGbCF/91DaHQM+QZADSlcRATDIU0NOsgZYbV1+l2NryXtsm5Xdww9Ct65X6zIv tGphJxQCae0Mm70ygzDimX6V5znXGAZeyPvrBnfU1yJ7UVq0nWgKh733MYhe+gE018yD 5Y4eMvaq3Rp/+nMdDFjkt1RRDWFQx/kjRGjBR3g8w4XzJIK+rmG38YL9vDnzy0NSl20O dqs4QS6kiaw/prYPgZJ9rLfMx37lVVwn8qCi6+jpzXssWGiDrnwNEG3WVdMr8XZNDsaQ tTbJwkUOcuzPpotYgAswKbUS1Uk5Vtz1+B5kFt3bNHkgaPCX6qX1ZmnvBEoLb+3Y0Ept nD2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=woT+gp2akynoi6SeL80fhgXGGJ435Dv8ejqsNkIiBQY=; b=Rsvp1mUxalwtueuxcT0Hu9Q+VJsniBgFRA10cXxtQobj9NkN7v0hoIGDzpOC3UB2nH yxuIxm4C+K8CbHu4VLJwGctEea03g5oPDPQZMqqcs5T13o0wn6VBJeXV8fjyV0jJKHV9 uYoYPJSx9dcahPQWaRC5Qnyiz95aerw6ORYlGkfTUXN2cxwIxwUmO5c/dQ0WOYCyyHn5 nfl/AIRZMco7eMGlt51biNoKz66nO83nHm9YMrXwLdgsEWeRirxK5I5vwlMSjAg4HwMz x1dqspchIeLENhf4Vbo11BdvQPprRSq1HkTsmAfvs15/DqNRMg5h+WHYLbdrmjB/trVo W5/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=OGZ5IkKF; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z26-20020a170906271a00b00870c8690d6csi7466717ejc.207.2023.02.04.15.17.36; Sat, 04 Feb 2023 15:17:36 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=OGZ5IkKF; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4201968BE71; Sun, 5 Feb 2023 01:17:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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 ECC4268BA04 for ; Sun, 5 Feb 2023 01:17:15 +0200 (EET) Received: by mail-il1-f179.google.com with SMTP id u7so3485080ilg.4 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:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bjJo4fqX3flvGqebqyd3rHeOzEP1vcuLtCcfDYrb0iE=; b=OGZ5IkKFsxyIjYhFDzNtsowXVjgD9NfeAiOxm9xZq3NBUcSVQ/U2L/GNXRqX/JnoJe n02Ut+lxzK0y/shFKpO3te/J6XaAKr/Ung9lkiZ+B7PTSxucGX3mK6+XGgBLMttAiuac +mDytdwfmaUMyjl/0+EQXgZAkGRjaxpQCVHIFI2jF5ij7GmKYUQh2bAZI6FnwJ3RLXyh QJOrHS2QngLdqk8zfk7Jndz5jYu+ukuYPpYDz8TEPN0YBUnIBFoTz/SOPgX7/aFJ6qeS S03FiqfNTiGSuKm85Jnb3FRfieGEr6pKRZgM6uqx3uyLbXNfAHae7Sh5sCAtzLci4KQ+ cIvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bjJo4fqX3flvGqebqyd3rHeOzEP1vcuLtCcfDYrb0iE=; b=3YYQTl/6X5K1ujp5NrueQ9l+0t2N72cWd3g9Co8NtD8vFgfj6mH0yCMUrw6vS1RvOx 6RhCmBceJFOt6ySjH/SpyfFB3M5Xn4WfenhtrpyMfgVUUD+ID+lfxqkEnmJHIW/nfuSD /Rc28jfqHNaGRRmPMoHL6lAjh/Ul6+B4JE3skcLwGL7kqzqFf06lpTd3/hO49kd8kZtU ymI+nit91neQr76ijQzV8loJMqmEUSw3EhPYQODffbTLvTWNQWmAPvoBJAQLAKferBv5 sD3vC1O/u7JrzJvxtFUyAiKqH6dJ9fWIVSSeCDlqusXHkXKpzMyzIJpT19TXZHOQSqgY hDWw== X-Gm-Message-State: AO0yUKWvusXStiAca1BNd6SbdS7Vx4WxO2GcvXSeBdAHYWAjadbPAa8H XAutP/XMf0ZImI4YJYjuluHhxqWI5omcTZgCYA== X-Received: by 2002:a05:6e02:1bee:b0:310:adfe:bfa9 with SMTP id y14-20020a056e021bee00b00310adfebfa9mr14313410ilv.11.1675552634508; Sat, 04 Feb 2023 15:17:14 -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:14 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Sat, 4 Feb 2023 17:17:02 -0600 Message-Id: <20230204231703.9050-2-rcombs@rcombs.me> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230204231703.9050-1-rcombs@rcombs.me> References: <20230204231703.9050-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] configure: check for vulkan beta extension support 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 7YSMo65E6Bu8 Some systems (e.g. android) provide vulkan.h, but not vulkan_beta.h. In that case, compiling vulkan.h with VK_ENABLE_BETA_EXTENSIONS enabled will result in a preprocessor error. We can check for this up-front. --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index d67855c729..8c7311ce74 100755 --- a/configure +++ b/configure @@ -2408,6 +2408,7 @@ HAVE_LIST=" perl pod2man texi2html + vulkan_beta xmllint zlib_gzip " @@ -7008,6 +7009,8 @@ enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if. if enabled vulkan; then check_pkg_config_header_only vulkan "vulkan >= 1.2.189" "vulkan/vulkan.h" "defined VK_VERSION_1_2" || check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_3) || (defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 189)" + test_cflags_cc "-DVK_ENABLE_BETA_EXTENSIONS" "vulkan/vulkan.h" "1" && + enable vulkan_beta fi if enabled x86; then From patchwork Sat Feb 4 23:17:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 40285 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp2234532pzk; Sat, 4 Feb 2023 15:17:44 -0800 (PST) X-Google-Smtp-Source: AK7set8etOdjLI3JQ9gtGa8CY2UboDuekIhX6Xvfznn42DXCnbIIqBGBbRkxxW4xwSe05O2ZVb/c X-Received: by 2002:a17:906:b812:b0:88c:7a36:d11e with SMTP id dv18-20020a170906b81200b0088c7a36d11emr13564817ejb.25.1675552664776; Sat, 04 Feb 2023 15:17:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675552664; cv=none; d=google.com; s=arc-20160816; b=acZp1G1qFZAOLy1fBUU7zeEeshw0eLWqICE8R/r4L23YtI2QfN+4p8NTVfyUVOdUHh mbCfxNyAiGRr4/AthdS8oRgxo2r7uNVuUhK4CcFpqUHfXeEQV4/0EISgPvbU5d2g15m9 12vu5MnPYWe2ideD+/dXI5LrrI/vh4zyu0PycJmTGY1oYwGjha+cr6IVFug9s0whREJ4 5iwZTHqwfMuUPd5cKv8YBPsiymrQ7+0XfoXoeIYnWmQrcyALmtqg5SHgKUDQAHBIHOUI Dwa+ECY0hrVF9xa0Jfg25+6PTGbnp9bYk5Wt7Rmjbbp3HyIzm9tV/6xyYftY6c8d4Z6B B2NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=PuSry/3dKap7c0zzktpKmDf3HIELax9N3n8AYASrUHw=; b=aLhb23mXFQIq6I+llMkq8IlR/KtUierz7f0NkCwY5M/QCT+MW59pijm9mAt7U4rXdE vOXtxsqDva61Yna+RuOz9DaoxbIUYPPP1AGmTi9LYi9dzx9eEipyQBJqTIpKw+odpWpo 0k+SGPrAiaugJmNAZXs0UAVCz4iATGENnzDPquZSwYMfE3H/UZ3mgPDpbzle7X4cuiFR im8yhf+v0WCD2vhpY336y/lFhK8HzDVQV0g4sL2yhZAuvvwwE8cj1qM+zrILZlua76ca aymhd1TQ/XJRt9XGTrRsePfXDnfUpYf8utq7HYtalUz0wY3+zOn9+HquZmE3U2YDRHGs +PFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=Vx0DQw7C; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r3-20020aa7d583000000b004a25f9d0900si6787132edq.27.2023.02.04.15.17.44; Sat, 04 Feb 2023 15:17:44 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=Vx0DQw7C; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 46EB168BE8C; Sun, 5 Feb 2023 01:17:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 07A5E68BE0E for ; Sun, 5 Feb 2023 01:17:17 +0200 (EET) Received: by mail-il1-f178.google.com with SMTP id k17so735688ilq.12 for ; Sat, 04 Feb 2023 15:17:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GMCbhjv0t0rpgm8nVhKsBDUt/EuH/3jCf86fh6xO8yg=; b=Vx0DQw7CPr1U5GReTznQkGciKgWDNQwmOmF1PGZAzXfzZBNgR0UUfEtUFWm8SxxEtB f7jNSqexZee5BS5Ba8RfAYsxs3P+ipsTkDjGEpRh40UZ6TmEd1ld5zLtjLdG7+Zm84ig 6DBb2bfhYj4S76nflrm6i84zAmcKW/joBGEF9N1U6P9UnSJiUayEN1Wl3+FIckmDtnIU JKnvAzJp090DYkx6HB3LWdeB3MNOWtplAq9mvKuYvTIfPrsuo5xy82ejth9Dw+XmzcY/ D/zbk3fkqz6VWOCmexuYJ0cbI4gg5fBTyCHPyY1tHb84XTL4S3+PxcleR7Br3MmIxZ5h Ii2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GMCbhjv0t0rpgm8nVhKsBDUt/EuH/3jCf86fh6xO8yg=; b=2lnStwAARiuGvrEZnwlVvh4AbjRMDkmSCgRShnJb/7S2cExjvI5lYAibsvveEbMp6X LETZuSJTVt9e9LXm6zqJ0PiGLRrx9mt3Jf2MmHj6dBUNRayrKPoBCVmQvGlNMTSt4Wti ESo8MdqMQbl15079Q4IP/D4pZ1w1owgtt17QJws8VvkPNRf1GLktDTu9r/lnlXCC/kcM AxsXl/NTY6HleTbmF8VrGFsgHYc35F/Bm0/wYDho4nt3AwDNEUVOZ9XKIXTQjG7WglEL uO1FfPd7vHLuqmBEJYt1RZdMNbyiyzXDl4sAFBGyab6eMbqA9CosoYRCoZxsUY/EgJCn ZaWg== X-Gm-Message-State: AO0yUKVs3V02DZCvUWD0SLldgMiOKDbMq1CjEPYvsVc9tVSsjqDfZq5U sI0fJ9Iwoq4kUrXFBkEDNaS6AfGtNY53HJ83XA== X-Received: by 2002:a92:cd89:0:b0:311:1137:178d with SMTP id r9-20020a92cd89000000b003111137178dmr11358409ilb.13.1675552635274; Sat, 04 Feb 2023 15:17:15 -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.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 04 Feb 2023 15:17:14 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Sat, 4 Feb 2023 17:17:03 -0600 Message-Id: <20230204231703.9050-3-rcombs@rcombs.me> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230204231703.9050-1-rcombs@rcombs.me> References: <20230204231703.9050-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] lavu/vulkan: only request beta extensions if we detected they're present 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Q9iRh/y3pzVq Fixes build on systems where vulkan_beta.h is absent (e.g. Android) --- libavutil/hwcontext_vulkan.c | 5 ++++- libavutil/vulkan_functions.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 589a7a7d9a..67802a850d 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -16,8 +16,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #define VK_NO_PROTOTYPES +#if HAVE_VULKAN_BETA #define VK_ENABLE_BETA_EXTENSIONS +#endif #ifdef _WIN32 #include /* Included to prevent conflicts with CreateSemaphore */ @@ -29,7 +33,6 @@ #include -#include "config.h" #include "pixdesc.h" #include "avstring.h" #include "imgutils.h" diff --git a/libavutil/vulkan_functions.h b/libavutil/vulkan_functions.h index d15a5d9a42..4d80322540 100644 --- a/libavutil/vulkan_functions.h +++ b/libavutil/vulkan_functions.h @@ -19,8 +19,12 @@ #ifndef AVUTIL_VULKAN_FUNCTIONS_H #define AVUTIL_VULKAN_FUNCTIONS_H +#include "config.h" + #define VK_NO_PROTOTYPES +#if HAVE_VULKAN_BETA #define VK_ENABLE_BETA_EXTENSIONS +#endif #include "hwcontext.h" #include "hwcontext_vulkan.h"