mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 14:43:31 +00:00
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
|
/// @returns true on success
|
||||||
bool GenerateGlsl(const tint::Program* program, const Options& options) {
|
bool GenerateGlsl(const tint::Program* program, const Options& options) {
|
||||||
#if TINT_BUILD_GLSL_WRITER
|
#if TINT_BUILD_GLSL_WRITER
|
||||||
|
bool success = true;
|
||||||
if (options.validate) {
|
if (options.validate) {
|
||||||
glslang::InitializeProcess();
|
glslang::InitializeProcess();
|
||||||
}
|
}
|
||||||
@ -901,12 +902,12 @@ bool GenerateGlsl(const tint::Program* program, const Options& options) {
|
|||||||
std::cerr << "Error parsing GLSL shader:\n"
|
std::cerr << "Error parsing GLSL shader:\n"
|
||||||
<< shader.getInfoLog() << "\n"
|
<< shader.getInfoLog() << "\n"
|
||||||
<< shader.getInfoDebugLog() << "\n";
|
<< shader.getInfoDebugLog() << "\n";
|
||||||
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return success;
|
||||||
return true;
|
|
||||||
#else
|
#else
|
||||||
(void)program;
|
(void)program;
|
||||||
(void)options;
|
(void)options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user