mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 00:11:11 +01:00
[mtl] fix nested loop service variable
This commit is contained in:
1 parent
832e259a03
commit
76094aa553
1 file changed
+2
-2
@@ -699,10 +699,10 @@ impl<W: Write> Writer<W> {
|
||||
writeln!(self.out, "{}bool {} = true;", level, gate_name)?;
|
||||
writeln!(self.out, "{}while(true) {{", level)?;
|
||||
let lif = level.next();
|
||||
writeln!(self.out, "{}if (!loop_init) {{", lif)?;
|
||||
writeln!(self.out, "{}if (!{}) {{", lif, gate_name)?;
|
||||
self.put_block(lif.next(), continuing, context, return_value)?;
|
||||
writeln!(self.out, "{}}}", lif)?;
|
||||
writeln!(self.out, "{}loop_init = false;", lif)?;
|
||||
writeln!(self.out, "{}{} = false;", lif, gate_name)?;
|
||||
} else {
|
||||
writeln!(self.out, "{}while(true) {{", level)?;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user