mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Do not emit an `Expression::As` conversion for WGSL like `vec3(v)` where `v` is already a `vec3`, or `mat2x3(m)` where `m` is already a 2x3 matrix. This doesn't fix any bugs, but it makes it clearer to the reader of `Lowerer::construct` that no conversion can actually take place in this case. Some snapshots are affected because `As` expressions whose `width` is `None` are bitcast expressions, which the constant evaluator does not yet support. When this commit removes those `As` expressions, the constant evaluator can reduce the expression to a `Literal` or `ZeroValue`, which is then concealed by #2539.