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 11A5B40897 for ; Sun, 3 Apr 2022 14:51:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D6A8468B204; Sun, 3 Apr 2022 17:51:39 +0300 (EEST) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8A1BB68AF13 for ; Sun, 3 Apr 2022 17:51:33 +0300 (EEST) Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id A2C671060148 for ; Sun, 3 Apr 2022 14:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1648997491; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=xBuwwwkAnmuMOw5WBxGgKVsffG0bBQmtf+aeNrvj1Eg=; b=S/3FTP0FGiQ9PYFaNlWmRZ7fDeCsUjb610VtmN+5n36jiD5KwyE9bShJyQU+UpZ9 sE8A3ap8+INWgEP9TxgTMINMkX0g5g7U2S/WjrY4/L3M6gvAGzxpnHKf/35f6z+jn1y Fdln25COUgdUTZKflCV5zrqMnrZqsLbS8pD5lIWHlgQ8RtAQsCPxYEcWz5h71BQ1IXy vMeHzGRXL45yzA3SpXpFDjQE5e6ulG1a0vefIyGrMLMeKT8J6ZxRH7qtZUrq5+rd/g/ IOS5h+/ek35CTYjo7LLQsHjDWkZDM/P7tUmuHb446Jq6tJVrCHrWAEWr/0Wu4xA13o1 AizrbPOSbQ== Date: Sun, 3 Apr 2022 16:51:31 +0200 (CEST) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_786146_454098476.1648997491947" Subject: [FFmpeg-devel] [PATCH 1/3] hwcontext_vulkan: expose image queue families 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" Archived-At: List-Archive: List-Post: ------=_Part_786146_454098476.1648997491947 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit This allows for queue transition operations to be signalled. Patch attached. ------=_Part_786146_454098476.1648997491947 Content-Type: text/x-patch; charset=us-ascii; name=0001-hwcontext_vulkan-expose-image-queue-families.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-hwcontext_vulkan-expose-image-queue-families.patch >From e1ddb02864a772a0c9ce117c3f68a248c2550853 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sun, 3 Apr 2022 16:40:17 +0200 Subject: [PATCH 1/3] hwcontext_vulkan: expose image queue families --- libavutil/hwcontext_vulkan.c | 2 ++ libavutil/hwcontext_vulkan.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 237caa4bc0..1176858545 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2111,6 +2111,7 @@ static int create_frame(AVHWFramesContext *hwfc, AVVkFrame **frame, return AVERROR_EXTERNAL; } + f->queue_family[i] = p->num_qfs > 1 ? VK_QUEUE_FAMILY_IGNORED : p->qfs[0]; f->layout[i] = create_info.initialLayout; f->access[i] = 0x0; f->sem_value[i] = 0; @@ -2794,6 +2795,7 @@ static int vulkan_map_from_drm_frame_desc(AVHWFramesContext *hwfc, AVVkFrame **f * offer us anything we could import and sync with, so instead * just signal the semaphore we created. */ + f->queue_family[i] = p->num_qfs > 1 ? VK_QUEUE_FAMILY_IGNORED : p->qfs[0]; f->layout[i] = create_info.initialLayout; f->access[i] = 0x0; f->sem_value[i] = 0; diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h index df86c85b3c..ce8a835c6f 100644 --- a/libavutil/hwcontext_vulkan.h +++ b/libavutil/hwcontext_vulkan.h @@ -264,6 +264,12 @@ typedef struct AVVkFrame { * Describes the binding offset of each plane to the VkDeviceMemory. */ ptrdiff_t offset[AV_NUM_DATA_POINTERS]; + + /** + * Queue family of the images. Must be VK_QUEUE_FAMILY_IGNORED if + * the image was allocated with the CONCURRENT concurrency option. + */ + uint32_t queue_family[AV_NUM_DATA_POINTERS]; } AVVkFrame; /** -- 2.35.1 ------=_Part_786146_454098476.1648997491947 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". ------=_Part_786146_454098476.1648997491947--