mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-09 05:29:17 +00:00
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>
This commit is contained in:
parent
596fcdcec6
commit
effd888d2f
@ -83,11 +83,7 @@ fn comp_main() -> void {
|
|||||||
|
|
||||||
var pos : vec2<f32>;
|
var pos : vec2<f32>;
|
||||||
var vel : vec2<f32>;
|
var vel : vec2<f32>;
|
||||||
var i : u32 = 0u;
|
for(var i : u32 = 0u; i < 5u; i = i + 1) {
|
||||||
loop {
|
|
||||||
if (i >= 5u) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (i == index) {
|
if (i == index) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -106,10 +102,6 @@ fn comp_main() -> void {
|
|||||||
cVel = cVel + vel;
|
cVel = cVel + vel;
|
||||||
cVelCount = cVelCount + 1;
|
cVelCount = cVelCount + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
|
||||||
i = i + 1u;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (cMassCount > 0) {
|
if (cMassCount > 0) {
|
||||||
cMass =
|
cMass =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user