Skip to content

Commit

Permalink
Fix Hello Compute Shader (#6985)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Jan 24, 2025
1 parent 5386d38 commit b233d20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/standalone/01_hello_compute/src/shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn doubleMe(@builtin(global_invocation_id) global_id: vec3<u32>) {
// Because we're using a workgroup size of 64, if the input size isn't a multiple of 64,
// we will have some "extra" invocations. This is fine, but we should tell them to stop
// to avoid out-of-bounds accesses.
let array_length = arrayLength(input);
let array_length = arrayLength(&input);
if (global_id.x >= array_length) {
return;
}
Expand Down

0 comments on commit b233d20

Please sign in to comment.