dawn-cmake/test/loops/nested_loops.wgsl.expected.wgsl
Ben Clayton def7313523 test: Add loop test cases
Bug: tint:833
Bug: tint:914
Change-Id: Ieb34c734ad08c632c8d4e6152d856ec28f35cf85
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55249
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-06-21 19:04:56 +00:00

18 lines
214 B
WebGPU Shading Language

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