ShaderModule: Enable the prettier tint diagnostic formatter
Includes code snippits and squiggles of the offending line(s) Bug: none Change-Id: If704b5d1118d0246c16f6e729a10d16363a1169b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37281 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
ede229f313
commit
64275742e0
|
@ -179,7 +179,8 @@ namespace dawn_native {
|
|||
|
||||
tint::reader::wgsl::Parser parser(file);
|
||||
if (!parser.Parse()) {
|
||||
errorStream << "Parser: " << parser.error() << std::endl;
|
||||
auto err = tint::diag::Formatter{}.format(parser.diagnostics());
|
||||
errorStream << "Parser: " << err << std::endl;
|
||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||
}
|
||||
|
||||
|
@ -229,7 +230,8 @@ namespace dawn_native {
|
|||
|
||||
tint::Validator validator;
|
||||
if (!validator.Validate(module)) {
|
||||
errorStream << "Validation: " << validator.error() << std::endl;
|
||||
auto err = tint::diag::Formatter{}.format(validator.diagnostics());
|
||||
errorStream << "Validation: " << err << std::endl;
|
||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue