ShaderModule: Use tint::diag::List::str()
Cuts down on the noise Change-Id: I3904b170a61e5884b4fb1479b885f188b5ea4a24 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43883 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
d9a96fb286
commit
3b1a0c6e14
|
@ -225,7 +225,7 @@ namespace dawn_native {
|
||||||
|
|
||||||
tint::Program program = tint::reader::wgsl::Parse(file);
|
tint::Program program = tint::reader::wgsl::Parse(file);
|
||||||
if (!program.IsValid()) {
|
if (!program.IsValid()) {
|
||||||
auto err = tint::diag::Formatter{}.format(program.Diagnostics());
|
auto err = program.Diagnostics().str();
|
||||||
errorStream << "Parser: " << err << std::endl
|
errorStream << "Parser: " << err << std::endl
|
||||||
<< "Shader: " << std::endl
|
<< "Shader: " << std::endl
|
||||||
<< file->content << std::endl;
|
<< file->content << std::endl;
|
||||||
|
@ -241,7 +241,7 @@ namespace dawn_native {
|
||||||
|
|
||||||
tint::Program program = tint::reader::spirv::Parse(spirv);
|
tint::Program program = tint::reader::spirv::Parse(spirv);
|
||||||
if (!program.IsValid()) {
|
if (!program.IsValid()) {
|
||||||
auto err = tint::diag::Formatter{}.format(program.Diagnostics());
|
auto err = program.Diagnostics().str();
|
||||||
errorStream << "Parser: " << err << std::endl;
|
errorStream << "Parser: " << err << std::endl;
|
||||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ namespace dawn_native {
|
||||||
|
|
||||||
tint::Validator validator;
|
tint::Validator validator;
|
||||||
if (!validator.Validate(program)) {
|
if (!validator.Validate(program)) {
|
||||||
auto err = tint::diag::Formatter{}.format(validator.diagnostics());
|
auto err = validator.diagnostics().str();
|
||||||
errorStream << "Validation: " << err << std::endl;
|
errorStream << "Validation: " << err << std::endl;
|
||||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||||
}
|
}
|
||||||
|
@ -953,8 +953,7 @@ namespace dawn_native {
|
||||||
tint::Program* program) {
|
tint::Program* program) {
|
||||||
tint::transform::Transform::Output output = transform->Run(program);
|
tint::transform::Transform::Output output = transform->Run(program);
|
||||||
if (!output.program.IsValid()) {
|
if (!output.program.IsValid()) {
|
||||||
std::string err = "Tint program failure: " +
|
std::string err = "Tint program failure: " + output.program.Diagnostics().str();
|
||||||
tint::diag::Formatter{}.format(output.program.Diagnostics());
|
|
||||||
return DAWN_VALIDATION_ERROR(err.c_str());
|
return DAWN_VALIDATION_ERROR(err.c_str());
|
||||||
}
|
}
|
||||||
return std::move(output.program);
|
return std::move(output.program);
|
||||||
|
|
Loading…
Reference in New Issue