1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

vulkan_shaderc: fix error reporting for certain errors

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.
This commit is contained in:
Lynne 2024-07-24 00:53:28 +02:00
parent 957d34784a
commit 2f7dfb0d15
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464

View File

@ -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);