History

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.

Lynne committed 2 years ago

Commit 2f7dfb01 parent 957d3471 file · +3 −0Browse files

Unified · Split

libavfilter/vulkan_shaderc.c+3−0
@@ -65,6 +65,9 @@ static int shdc_shader_compile(FFVkSPIRVCompiler *ctx, void *avctx, · 64 unmodified lines
65 warn = shaderc_result_get_num_warnings(res);65 warn = shaderc_result_get_num_warnings(res);
66 message = shaderc_result_get_error_message(res);66 message = shaderc_result_get_error_message(res);
67 67
68 if (ret != shaderc_compilation_status_success && !err)
69 err = 1;
70
68 loglevel = err ? AV_LOG_ERROR : warn ? AV_LOG_WARNING : AV_LOG_VERBOSE;71 loglevel = err ? AV_LOG_ERROR : warn ? AV_LOG_WARNING : AV_LOG_VERBOSE;
69 72
70 ff_vk_shader_print(avctx, shd, loglevel);73 ff_vk_shader_print(avctx, shd, loglevel);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t