mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[msl] clean up emitted expressions at the end of a block
This commit is contained in:
committed by
Dzmitry Malyshau
parent
62fe72be2e
commit
cf3a6da3ce
@@ -969,6 +969,16 @@ impl<W: Write> Writer<W> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// un-emit expressions
|
||||
//TODO: take care of loop/continuing?
|
||||
for statement in statements {
|
||||
if let crate::Statement::Emit(ref range) = *statement {
|
||||
for handle in range.clone() {
|
||||
self.named_expressions.remove(handle.index());
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user