From patchwork Sun Sep 1 00:03:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 51275 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:4027:b0:48e:c0f8:d0de with SMTP id ky39csp1134489vqb; Sat, 31 Aug 2024 17:04:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWYz5ibTgD3qptSWG+fZ7Hq4qDKU92faSLmEomZJ9+cA5mU7ucqCKgrj7Pvp0vyTj307ewnVgqLm09BzJyI2H4B@gmail.com X-Google-Smtp-Source: AGHT+IFiX9wCDjXvkzRigBTy/FsUY64wGP0J+NvWDG2/hcVBCi8rqIOe+Z0u9DzIccD0n9TrtWbQ X-Received: by 2002:a2e:4611:0:b0:2f5:ce9:14d3 with SMTP id 38308e7fff4ca-2f610551290mr64658091fa.47.1725149069404; Sat, 31 Aug 2024 17:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725149069; cv=none; d=google.com; s=arc-20240605; b=d+f7sGHnWEQwJJxVajQ8Ht1gVmhPO+sxgXU1PtBSq7p3qQ3+s5GvEl4FwrpF6xDDlH u5+Uumbkakc9Cwb/6Sd7KAS97GZINuXa9HKILbGIAgOZvAvOQpG6MZjtvMqPwkbsWX7M oL0BIYI6FkZQvxUBlGOBSmcD1zcfFvyPX30m/swENHo9pFUzBexo+/bcUZKPfITHt9Z4 ZgNAfvpfmGcjxlYYQGSQmY+K+JvzeYTpblxUCOZKpyQNx0lT2eRLSWOVdzEnpoZf2igY /LCWpkJFqhgr9m8QGtisFPouN8RbYqRWKSKyHcH5KHYsOr99hGWutpmSsFgf6ixNTLVJ zxhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to:from :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:delivered-to; bh=9T0+urXc+Qn/Yp+Q2RY+7rLxt0ZduiCZZw6wNhn9Gts=; fh=nenT92/WZoU6unXd3J6UhGUdod4piddKfVtctNBOh6k=; b=IV6ilCnVss9Zvt5AkbS+wMfRdYRv6yo/ZbkYaeVDjNfWvwtQIzWC52brTQsCWXtqbV fv5KedYkoTxl93JditD1BvmkUBjiDT3IujbuuEjRyL4s2Hze9gH4TzyC6TxlUtEjLwSJ VW1de+eA9vwNuAis4d/YyiTmh6ar2v9Odfm1LNcJa5gZBQ+6kIJh/AeiqDSAmtzi1x3K XRIea+M1tfvXLqzbHsqG0rpfKPTU8gmneVTX6DJIb5yyEnCU83bX6Gv9FZbrJZ5/3MlX 7MDy6Ag9idSPnruDJw8xlkDGN/P9GXAYiftQfS9aO5Liky+jBeVx0pSZ3cerM4gR3hvW 8qCA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f614ece084si21501991fa.167.2024.08.31.17.04.29; Sat, 31 Aug 2024 17:04:29 -0700 (PDT) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6163D68DF7C; Sun, 1 Sep 2024 03:03:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vidala.lynne.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0161468DF65 for ; Sun, 1 Sep 2024 03:03:33 +0300 (EEST) To: ffmpeg-devel@ffmpeg.org Date: Sun, 1 Sep 2024 02:03:04 +0200 Message-ID: <20240901000314.379276-6-dev@lynne.ee> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20240901000314.379276-1-dev@lynne.ee> References: <20240901000314.379276-1-dev@lynne.ee> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/10] vulkan: error out if query is called without being initialized 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: , X-Patchwork-Original-From: Lynne via ffmpeg-devel From: Lynne Reply-To: FFmpeg development discussions and patches Cc: Lynne Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: u/AB5TmI+Vek --- libavutil/vulkan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index fe5affa72a..c2a3b5cfa3 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -446,6 +446,11 @@ VkResult ff_vk_exec_get_query(FFVulkanContext *s, FFVkExecContext *e, if (!e->had_submission) return VK_INCOMPLETE; + if (!e->query_data) { + av_log(s, AV_LOG_ERROR, "Requested a query with a NULL query_data pointer!\n"); + return VK_INCOMPLETE; + } + qf |= pool->query_64bit ? VK_QUERY_RESULT_64_BIT : 0x0; qf |= pool->query_statuses ?