Skip to content
Snippets Groups Projects
Commit 3b1dd90b authored by Niklas Haas's avatar Niklas Haas
Browse files

spirv: handle shaderc internal errors properly

These don't generate any errors, but the compilation status still isn't
"success". Treat these as errors as well, in terms of logging.
parent e630b7ae
No related branches found
No related tags found
1 merge request!94CI updates
......@@ -105,13 +105,15 @@ static bool shaderc_compile(struct spirv_compiler *spirv, void *tactx,
enum pl_log_level lev = errs ? PL_LOG_ERR : warn ? PL_LOG_INFO : PL_LOG_DEBUG;
int s = shaderc_result_get_compilation_status(res);
bool success = s == shaderc_compilation_status_success;
if (!success)
lev = PL_LOG_ERR;
const char *msg = shaderc_result_get_error_message(res);
if (msg[0])
PL_MSG(spirv, lev, "shaderc output:\n%s", msg);
int s = shaderc_result_get_compilation_status(res);
bool success = s == shaderc_compilation_status_success;
static const char *results[] = {
[shaderc_compilation_status_success] = "success",
[shaderc_compilation_status_invalid_stage] = "invalid stage",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment