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 7B1394C117 for ; Fri, 23 May 2025 12:14:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 5DD8D68DF3A; Fri, 23 May 2025 15:14:17 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id D50BF68DF23 for ; Fri, 23 May 2025 15:14:15 +0300 (EEST) Received: from haasn.dev (unknown [10.30.1.1]) by haasn.dev (Postfix) with UTF8SMTP id 48912418EF for ; Fri, 23 May 2025 14:14:15 +0200 (CEST) Date: Fri, 23 May 2025 14:14:15 +0200 Message-ID: <20250523141415.GC21491@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: References: <20250518121152.94947-1-ffmpeg@haasn.xyz> <20250518121152.94947-2-ffmpeg@haasn.xyz> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH 2/7] avutil/vulkan: automatically enable shader device address usage bit 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 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: On Thu, 22 May 2025 06:32:18 +0900 Lynne wrote: > On 18/05/2025 21:11, Niklas Haas wrote: > > From: Niklas Haas > > > > We require this internally when using descriptor buffers, so it makes sense > > to enable it internally, also. > > --- > > libavutil/vulkan.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c > > index 5f2ac6267d..97c008c809 100644 > > --- a/libavutil/vulkan.c > > +++ b/libavutil/vulkan.c > > @@ -989,6 +989,9 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, > > int use_ded_mem; > > FFVulkanFunctions *vk = &s->vkfn; > > > > + if (s->extensions & FF_VK_EXT_DESCRIPTOR_BUFFER) > > + usage |= VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT; > > You should omit the flag if the usage contains > VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR or > VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR, since its not used there. I think a more robust logic would be to emit the flag only if the usage contains any type that implies a descriptor (e.g. storage buffer, uniform buffer, etc). > > > + > > VkBufferCreateInfo buf_spawn = { > > .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, > > .pNext = pNext, > > Apart from that, okay. > _______________________________________________ > 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". _______________________________________________ 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".