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 AE83C4C8A6 for ; Wed, 7 Aug 2024 21:35:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1178668DBC8; Thu, 8 Aug 2024 00:34:47 +0300 (EEST) Received: from vidala.lynne.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E85C168DBBC for ; Thu, 8 Aug 2024 00:34:38 +0300 (EEST) To: ffmpeg-devel@ffmpeg.org Date: Wed, 7 Aug 2024 23:33:34 +0200 Message-ID: <20240807213347.917235-9-dev@lynne.ee> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20240807213347.917235-1-dev@lynne.ee> References: <20240807213347.917235-1-dev@lynne.ee> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/13] vulkan_shaderc: fix error reporting for certain errors 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: Lynne via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Lynne 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: The issue is that shaderc_result_get_num_errors may sometime return 0 even when shaderc_result_get_compilation_status returns a non-zero error code. Since we use the result from the former, override the status if it returned 0. --- libavfilter/vulkan_shaderc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/vulkan_shaderc.c b/libavfilter/vulkan_shaderc.c index 38be1030ad..455e81767e 100644 --- a/libavfilter/vulkan_shaderc.c +++ b/libavfilter/vulkan_shaderc.c @@ -65,6 +65,9 @@ static int shdc_shader_compile(FFVkSPIRVCompiler *ctx, void *avctx, warn = shaderc_result_get_num_warnings(res); message = shaderc_result_get_error_message(res); + if (ret != shaderc_compilation_status_success && !err) + err = 1; + loglevel = err ? AV_LOG_ERROR : warn ? AV_LOG_WARNING : AV_LOG_VERBOSE; ff_vk_shader_print(avctx, shd, loglevel); -- 2.45.2.753.g447d99e1c3b _______________________________________________ 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".