aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2022-01-31 16:27:45 -0500
committerGitHub <noreply@github.com>2022-01-31 16:27:45 -0500
commit4bbce8528cc2a4258302e4df710a344f405a0fa4 (patch)
treece823e640dcd2afd0389fc7a1ef54b4eddf5e891
parent615ab4863f7d2e31d3037d0c6a0f641fd6fc0d07 (diff)
downloadamber-4bbce8528cc2a4258302e4df710a344f405a0fa4.tar.gz
Show clspv error output when compilation fails (#979)
Fixes: #978
-rw-r--r--src/clspv_helper.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/clspv_helper.cc b/src/clspv_helper.cc
index 59b8737..4be5bfa 100644
--- a/src/clspv_helper.cc
+++ b/src/clspv_helper.cc
@@ -258,9 +258,10 @@ Result Compile(Pipeline::ShaderInfo* shader_info,
for (const auto& option : shader_info->GetCompileOptions()) {
options += option + " ";
}
+ std::string error_log;
if (clspv::CompileFromSourceString(src_str, /* sampler map */ "", options,
- generated_binary)) {
- return Result("Clspv compile failed");
+ generated_binary, &error_log)) {
+ return Result("Clspv compile error: " + error_log);
}
// Parse the reflection instructions.