Don't emit ANSI colors in shader validation error messages. (#3591)

This commit is contained in:
Jim Blandy
2023-03-14 19:35:02 -07:00
committed by GitHub
parent 42a0683d48
commit 0772df798d
2 changed files with 2 additions and 1 deletions

View File

@@ -98,6 +98,7 @@ By @teoxoy in [#3534](https://github.com/gfx-rs/wgpu/pull/3534)
- Allow copying of textures with copy-compatible formats. By @teoxoy in [#3528](https://github.com/gfx-rs/wgpu/pull/3528)
- Improve attachment related errors. By @cwfitzgerald in [#3549](https://github.com/gfx-rs/wgpu/pull/3549)
- Make error descriptions all upper case. By @cwfitzgerald in [#3549](https://github.com/gfx-rs/wgpu/pull/3549)
- Don't include ANSI terminal color escape sequences in shader module validation error messages. By @jimblandy in [#3591](https://github.com/gfx-rs/wgpu/pull/3591)
#### WebGPU

View File

@@ -88,7 +88,7 @@ impl fmt::Display for ShaderError<naga::WithSpan<naga::valid::ValidationError>>
let label = self.label.as_deref().unwrap_or_default();
let files = SimpleFile::new(label, &self.source);
let config = term::Config::default();
let mut writer = term::termcolor::Ansi::new(Vec::new());
let mut writer = term::termcolor::NoColor::new(Vec::new());
let diagnostic = Diagnostic::error().with_labels(
self.inner