You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix game_of_life shader relying on Naga bug (#18951)
# Objective
The game of life example shader relies on a Naga bug
([6397](gfx-rs/wgpu#6397) /
[4536](gfx-rs/wgpu#4536)). In WGSL certain
arithmetic operations must be explicitly parenthesized
([reference](https://www.w3.org/TR/WGSL/#operator-precedence-associativity)).
Naga doesn't enforce that (and also the precedence order is [messed
up](gfx-rs/wgpu#4536 (comment))).
So this example may break soon. This is the only sample shader having
this issue.
## Solution
added parentheses
## Testing
ran the example before and after the fix with `cargo run --example
compute_shader_game_of_life`
0 commit comments