render: add a debug_assert to ensure the developer doesn't reuse ids for slots

This commit is contained in:
SeanOMik 2024-06-01 22:55:50 -04:00
parent c846d52b0d
commit bb21805278
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
1 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,11 @@ impl RenderGraph {
// if there is a slot of the same name
slot.id = *id;
} else {
debug_assert!(!self.slots.contains_key(&slot.id),
"Reuse of id detected in render graph! Pass: {}, slot: {}",
desc.name, slot.name,
);
let res_slot = ResourcedSlot {
name: slot.name.clone(),
ty: slot.ty,