![]() # Objective The game of life example shader relies on a Naga bug ([6397](https://github.com/gfx-rs/wgpu/issues/6397) / [4536](https://github.com/gfx-rs/wgpu/issues/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](https://github.com/gfx-rs/wgpu/issues/4536#issuecomment-1780113990)). 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` |
||
---|---|---|
.. | ||
android-res/mipmap-mdpi | ||
animation_graphs | ||
branding | ||
cursors/kenney_crosshairPack | ||
data | ||
docs | ||
environment_maps | ||
external | ||
fonts | ||
irradiance_volumes | ||
lightmaps | ||
models | ||
pixel | ||
scenes | ||
shaders | ||
sounds | ||
textures | ||
volumes |