mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[naga] Improve snapshot output when validation fails.
This commit is contained in:
committed by
Teodor Tanasoaia
parent
50a75fb79f
commit
85dd4048df
@@ -275,7 +275,13 @@ fn check_targets(
|
||||
|
||||
let info = naga::valid::Validator::new(naga::valid::ValidationFlags::all(), capabilities)
|
||||
.validate(module)
|
||||
.unwrap_or_else(|_| panic!("Naga module validation failed on test '{}'", name.display()));
|
||||
.unwrap_or_else(|err| {
|
||||
panic!(
|
||||
"Naga module validation failed on test `{}`:\n{:?}",
|
||||
name.display(),
|
||||
err
|
||||
);
|
||||
});
|
||||
|
||||
#[cfg(feature = "compact")]
|
||||
let info = {
|
||||
@@ -292,10 +298,11 @@ fn check_targets(
|
||||
|
||||
naga::valid::Validator::new(naga::valid::ValidationFlags::all(), capabilities)
|
||||
.validate(module)
|
||||
.unwrap_or_else(|_| {
|
||||
.unwrap_or_else(|err| {
|
||||
panic!(
|
||||
"Post-compaction module validation failed on test '{}'",
|
||||
name.display()
|
||||
"Post-compaction module validation failed on test '{}':\n<{:?}",
|
||||
name.display(),
|
||||
err,
|
||||
)
|
||||
})
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user