From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 4097B4ADB0 for ; Wed, 20 Aug 2025 21:01:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C6D0368D63C; Thu, 21 Aug 2025 00:01:35 +0300 (EEST) Received: from c1ad6a1ecdc3 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 7CAD368D203 for ; Thu, 21 Aug 2025 00:01:33 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] =?utf-8?q?=5BPATCH=5D_avutil/hwcontext=5Fvulkan?= =?utf-8?q?=3A_always_enable_extra_usage_flags_=28PR_=2320295=29?= 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: , From: Niklas Haas via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Message-Id: <20250820210135.C6D0368D63C@ffbox0-bg.ffmpeg.org> Date: Thu, 21 Aug 2025 00:01:35 +0300 (EEST) Archived-At: List-Archive: List-Post: PR #20295 opened by Niklas Haas (haasn) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20295 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20295.patch Otherwise, this may break vulkan encoding or subsequent hwupload/hwdownload if the upstream filter did not specifically advertise this. >From 7096e82417d12da01b7d9fd8f62447e974ac8ade Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 20 Aug 2025 16:56:22 +0200 Subject: [PATCH] avutil/hwcontext_vulkan: always enable extra usage flags Otherwise, this may break vulkan encoding or subsequent hwupload/hwdownload if the upstream filter did not specifically advertise this. --- libavutil/hwcontext_vulkan.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index e066fa8d18..13c385d674 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2914,17 +2914,17 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc) VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_SAMPLED_BIT); - - if ((p->vkctx.extensions & FF_VK_EXT_HOST_IMAGE_COPY) && !p->disable_host_transfer) - hwctx->usage |= supported_usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT; - - /* Enables encoding of images, if supported by format and extensions */ - if ((supported_usage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR) && - (p->vkctx.extensions & (FF_VK_EXT_VIDEO_ENCODE_QUEUE | - FF_VK_EXT_VIDEO_MAINTENANCE_1))) - hwctx->usage |= VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR; } + if ((p->vkctx.extensions & FF_VK_EXT_HOST_IMAGE_COPY) && !p->disable_host_transfer) + hwctx->usage |= supported_usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT; + + /* Enables encoding of images, if supported by format and extensions */ + if ((supported_usage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR) && + (p->vkctx.extensions & (FF_VK_EXT_VIDEO_ENCODE_QUEUE | + FF_VK_EXT_VIDEO_MAINTENANCE_1))) + hwctx->usage |= VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR; + /* Image creation flags. * Only fill them in automatically if the image is not going to be used as * a DPB-only image, and we have SAMPLED/STORAGE bits set. */ -- 2.49.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".