main: Return non-zero status code on GLSL validation error

Change-Id: I55b49cec665947fb735037f762ae8692d990c24d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/68521
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Ben Clayton 2021-11-05 22:45:23 +00:00
parent 02acf59184
commit 51aed1c732
1 changed files with 3 additions and 2 deletions

View File

@ -868,6 +868,7 @@ EShLanguage pipeline_stage_to_esh_language(tint::ast::PipelineStage stage) {
/// @returns true on success
bool GenerateGlsl(const tint::Program* program, const Options& options) {
#if TINT_BUILD_GLSL_WRITER
bool success = true;
if (options.validate) {
glslang::InitializeProcess();
}
@ -901,12 +902,12 @@ bool GenerateGlsl(const tint::Program* program, const Options& options) {
std::cerr << "Error parsing GLSL shader:\n"
<< shader.getInfoLog() << "\n"
<< shader.getInfoDebugLog() << "\n";
success = false;
}
}
}
}
return true;
return success;
#else
(void)program;
(void)options;