mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 17:44:09 +01:00
refactor(core): debug_assert that we wrote at least one deduction for maxInterStageShaderVariables errors
This commit is contained in:
1 parent
6bf665ab26
commit
727cbc3d13
1 file changed
+10
-1
@@ -147,9 +147,18 @@ where
|
||||
.filter(|(_, effective_deduction)| *effective_deduction > 0);
|
||||
if relevant_deductions.clone().next().is_some() {
|
||||
writeln!(f, "; note that some deductions apply during validation:")?;
|
||||
let mut wrote_something = false;
|
||||
for deduction in deductions {
|
||||
writeln!(f, "\n- {deduction:?}: {}", accessor(deduction))?;
|
||||
let deducted_amount = accessor(deduction);
|
||||
if deducted_amount > 0 {
|
||||
writeln!(f, "\n- {deduction:?}: {}", accessor(deduction))?;
|
||||
wrote_something = true;
|
||||
}
|
||||
}
|
||||
debug_assert!(
|
||||
wrote_something,
|
||||
"no substantial deductions found in error display"
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user