Update computeboids typing.
This Cl updates some of the literals and types in computeboids to be
stricter.
Bug: tint:248
Change-Id: I3bc42b8da7913677675d6e417b7f4ce19366eeb9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28840
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 e3f015e..2ddcae1 100644
--- a/test/compute_boids.wgsl
+++ b/test/compute_boids.wgsl
@@ -68,7 +68,7 @@
[[stage(compute)]]
fn comp_main() -> void {
var index : u32 = gl_GlobalInvocationID.x;
- if (index >= 5) {
+ if (index >= 5u) {
return;
}
@@ -83,9 +83,9 @@
var pos : vec2<f32>;
var vel : vec2<f32>;
- var i : i32 = 0;
+ var i : u32 = 0u;
loop {
- if (i >= 5) {
+ if (i >= 5u) {
break;
}
if (i == index) {
@@ -108,7 +108,7 @@
}
continuing {
- i = i + 1;
+ i = i + 1u;
}
}
if (cMassCount > 0) {