render: add a debug_assert to ensure the developer doesn't reuse ids for slots
This commit is contained in:
parent
c846d52b0d
commit
bb21805278
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue