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 99B3A4C33F for ; Thu, 31 Jul 2025 23:44:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 38DBB68C613; Fri, 1 Aug 2025 02:44:06 +0300 (EEST) Received: from mail-4325.protonmail.ch (mail-4325.protonmail.ch [185.70.43.25]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 0DB2468A919 for ; Fri, 1 Aug 2025 02:43:59 +0300 (EEST) Date: Thu, 31 Jul 2025 23:43:53 +0000 To: ffmpeg-devel@ffmpeg.org Message-ID: <20250731234342.964712-1-VytskaLT@protonmail.com> Feedback-ID: 28638248:user:proton X-Pm-Message-ID: f326476bcec64a9be06abcf6f5172760cb8f8519 MIME-Version: 1.0 Subject: [FFmpeg-devel] hwcontext_vulkan: transfer exclusive images to correct queue family in drm->vulkan mapping 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: vytskalt via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: vytskalt 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: From: vytskalt VK_QUEUE_FAMILY_IGNORED is only valid when the image is in CONCURRENT sharing mode. When there is only one queue family it's in the EXCLUSIVE sharing mode and the dst queue family must match it. Fixes validation error during drm->vulkan frame mapping: "pDependencyInfo->pImageMemoryBarriers[0] has srcQueueFamilyIndex 4294967294 (VK_QUEUE_FAMILY_EXTERNAL) and dstQueueFamilyIndex 4294967295 (VK_QUEUE_FAMILY_IGNORED). The command buffer's command pool is associated with family index 0. Source or destination queue family must match queue family associated with the command buffer's command pool." Signed-off-by: vytskalt --- libavutil/hwcontext_vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 894bc3dae1..6d7df3e619 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -3417,7 +3417,7 @@ static int vulkan_map_from_drm_frame_sync(AVHWFramesContext *hwfc, AVFrame *dst, ((flags & AV_HWFRAME_MAP_WRITE) ? VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT : 0x0), VK_IMAGE_LAYOUT_GENERAL, - VK_QUEUE_FAMILY_IGNORED); + p->nb_img_qfs > 1 ? VK_QUEUE_FAMILY_IGNORED : p->img_qfs[0]); vk->CmdPipelineBarrier2(cmd_buf, &(VkDependencyInfo) { .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO, -- 2.49.0 _______________________________________________ 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".