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 9EC4640963 for ; Tue, 1 Feb 2022 22:00:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D938668B20E; Wed, 2 Feb 2022 00:00:49 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 743F368A896 for ; Wed, 2 Feb 2022 00:00:42 +0200 (EET) Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id 243AB10602CF for ; Tue, 1 Feb 2022 22:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1643752841; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=fpN8yIrMrjO5zxSqYzDFb+Zm9E/ZcRMDqqbavtJqJQ0=; b=xdiBW733kK5BZtJi/y/bS0tDsGzpkKWuTCkZqoJ6fE1aquz88H/gAFHZtqetPDuJ 6FOVfm/ftPMEWCLBOcRJggg9w/7weZymf0wsZbgRTy0bdQk2hTk5msqs17S3/wn8cdJ dFRS4Rtias42kvYJnPXE4+iUCsOOLpNSFxz8KK6LIr05ZMJGsmI33NCHDzUblfkZI6t 7fIu2ZlUlsCSWUhPb7Yb6JoFzPV0xCZQQu39lf1rEoCWIlnFsFeo3IoFb25OFpoRz5s YdOrxLMgJyL+bZslZTxNvHYQrKmaHgdi5uaI1ShiRqEUbg22yY0hF3oJVXbQcRvldFY dcH/dXLemg== Date: Tue, 1 Feb 2022 23:00:41 +0100 (CET) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: References: MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] hwcontext_vulkan: use VkPhysicalDeviceTimelineSemaphoreFeatures to check for timeline semaphore supporting 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: 27 Jan 2022, 04:39 by quinkblack@foxmail.com: > VkPhysicalDeviceVulkan12Features isn't implemented on MoltenVK yet. > VkPhysicalDeviceTimelineSemaphoreFeatures is less versatile but > simple. None of device_features_1_1 nor device_features_1_2 has real > usage yet, keep the code for future. > --- > libavutil/hwcontext_vulkan.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c > index ae19fc2ab6..2e219511c9 100644 > --- a/libavutil/hwcontext_vulkan.c > +++ b/libavutil/hwcontext_vulkan.c > @@ -1321,8 +1321,16 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, > VulkanDevicePriv *p = ctx->internal->priv; > FFVulkanFunctions *vk = &p->vkfn; > AVVulkanDeviceContext *hwctx = ctx->hwctx; > + /* VkPhysicalDeviceVulkan12Features has a timelineSemaphore field, but > + * MoltenVK doesn't implement VkPhysicalDeviceVulkan12Features yet, so we > + * use VkPhysicalDeviceTimelineSemaphoreFeatures directly. > + */ > + VkPhysicalDeviceTimelineSemaphoreFeatures timeline_features = { > + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, > + }; > VkPhysicalDeviceVulkan12Features dev_features_1_2 = { > .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, > + .pNext = &timeline_features, > }; > VkPhysicalDeviceVulkan11Features dev_features_1_1 = { > .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, > @@ -1366,7 +1374,7 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, > #undef COPY_FEATURE > > /* We require timeline semaphores */ > - if (!dev_features_1_2.timelineSemaphore) { > + if (!timeline_features.timelineSemaphore) { > av_log(ctx, AV_LOG_ERROR, "Device does not support timeline semaphores!\n"); > err = AVERROR(ENOSYS); > goto end; > I didn't have a strong opinion on this, and on my nvidia testing machine, VkPhysicalDeviceVulkan12Features.timelineSemaphore isn't set for some reason (despite alleged 1.2 compliance), so this may help there. Pushed, thanks. _______________________________________________ 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".