dawn-cmake/test/tint/loops/loop_with_break_if.wgsl

15 lines
203 B
WebGPU Shading Language

fn f() -> i32 {
var i : i32;
loop {
if (i > 4) {
return i;
}
continuing {
i = i + 1;
break if i == 4;
}
}
return i;
}