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>
This commit is contained in:
dan sinclair 2020-09-23 14:40:54 +00:00 committed by Commit Bot service account
parent a7d498e060
commit d7abd76dea
1 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ type Particles = [[block]] struct {
[[stage(compute)]]
fn comp_main() -> void {
var index : u32 = gl_GlobalInvocationID.x;
if (index >= 5) {
if (index >= 5u) {
return;
}
@ -83,9 +83,9 @@ fn comp_main() -> void {
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 @@ fn comp_main() -> void {
}
continuing {
i = i + 1;
i = i + 1u;
}
}
if (cMassCount > 0) {