Convert computeboids to for().
This CL updates computeboids to use the `for()` sugar instead of the
loop/continuing block.
Change-Id: I13f416624821a87fbfa40b15669980bedc794ed4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28842
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
diff --git a/test/compute_boids.wgsl b/test/compute_boids.wgsl
index 2ddcae1..bf4ce44 100644
--- a/test/compute_boids.wgsl
+++ b/test/compute_boids.wgsl
@@ -83,11 +83,7 @@
var pos : vec2<f32>;
var vel : vec2<f32>;
- var i : u32 = 0u;
- loop {
- if (i >= 5u) {
- break;
- }
+ for(var i : u32 = 0u; i < 5u; i = i + 1) {
if (i == index) {
continue;
}
@@ -106,10 +102,6 @@
cVel = cVel + vel;
cVelCount = cVelCount + 1;
}
-
- continuing {
- i = i + 1u;
- }
}
if (cMassCount > 0) {
cMass =