tint/transform: Include diagnostics in TINT_PRINT_PROGRAM_FOR_EACH_TRANSFORM
Change-Id: Id3e7e0cce464e8b1db00c2adab8db350eee0168c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111041 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
87bccb74d8
commit
81ce4b6237
|
@ -37,11 +37,15 @@ Transform::ApplyResult Manager::Apply(const Program* program,
|
|||
#if TINT_PRINT_PROGRAM_FOR_EACH_TRANSFORM
|
||||
auto print_program = [&](const char* msg, const Transform* transform) {
|
||||
auto wgsl = Program::printer(program);
|
||||
std::cout << "---------------------------------------------------------" << std::endl;
|
||||
std::cout << "-- " << msg << " " << transform->TypeInfo().name << ":" << std::endl;
|
||||
std::cout << "---------------------------------------------------------" << std::endl;
|
||||
std::cout << "=========================================================" << std::endl;
|
||||
std::cout << "== " << msg << " " << transform->TypeInfo().name << ":" << std::endl;
|
||||
std::cout << "=========================================================" << std::endl;
|
||||
std::cout << wgsl << std::endl;
|
||||
std::cout << "---------------------------------------------------------" << std::endl
|
||||
if (!program->IsValid()) {
|
||||
std::cout << "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" << std::endl;
|
||||
std::cout << program->Diagnostics().str() << std::endl;
|
||||
}
|
||||
std::cout << "=========================================================" << std::endl
|
||||
<< std::endl;
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue