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:
parent
02acf59184
commit
51aed1c732
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue