@group(0)
@binding(0)
var<storage, read_write> flow: array<u32, 2>;
@compute
@workgroup_size(1)
fn main() {
var LOOP_COUNTER: u32 = 0u;
loop {
(flow)[0u] += 1u;
if (LOOP_COUNTER >= 1u) {
(flow)[1u] += 1u;
break;
}
LOOP_COUNTER += 1u;
}
}Expected output is [2, 1] after executing break statement in second iteration of loop.
| / | <> | <> | <> | <> | <> | <> | <> | |
| Vendor | GPU | Dawn Vulkan Linux | wGPU Vulkan Linux | Dawn Vulkan Windows | wGPU Vulkan Windows | Dawn DX12 Windows | wGPU DX12 Windows | |
|---|---|---|---|---|---|---|---|---|
| Nvidia | RTX 2060 Max-Q | Timeout | ND[fn:1] | Zeros[fn:2] | Zeros[fn:2] | Correct | Correct | |
| Nvidia | RTX 2060 Super | Timeout | ND[fn:1] | Zeros[fn:2] | Correct | Correct | ||
| Nvidia | GTX 1050 Ti | Timeout | Correct | Zeros[fn:2] | Correct | Correct | Correct | |
| Nvidia | Quadro 4000 | Correct | Correct | |||||
| AMD | Ryzen 9 4900HS (iGPU) | Correct | Correct | |||||
| Intel | i7-9700K (iGPU) | Correct | Inconsistent[fn:3] | |||||
| Intel | i5-7400 (iGPU) | Correct | Correct |
[fn:1] Non Deterministic results where the first element is large and the second element is zero; produces correct result if either of the flow increments are removed.
[fn:2] Output is [0, 0], presumed to be as a result of a timeout.
[fn:3] Sometimes produces correct output, other times produces [0, 0] without timing out.