Jim Blandy
509ea4c857
[wgsl-in] Generate no code for trivial vector/matrix construction. ( #2576 )
...
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 .
2023-10-23 14:48:18 +02:00
..
2023-10-16 19:03:14 -07:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-09-20 18:46:33 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-23 15:52:22 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-10-12 13:13:26 +02:00
2023-10-23 14:48:18 +02:00
2023-07-17 16:26:08 -07:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-09-20 18:46:33 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-08-30 21:00:35 +02:00
2023-09-20 18:46:33 +02:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-09-26 16:46:02 +02:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2022-08-29 11:58:02 +01:00
2023-06-08 16:56:57 +02:00
2023-09-20 18:46:33 +02:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-10-12 13:13:26 +02:00
2023-06-08 16:56:57 +02:00
2023-01-12 09:37:08 -08:00
2023-06-08 16:56:57 +02:00
2023-08-29 21:34:55 +02:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00
2023-07-17 16:26:08 -07:00
2023-06-08 16:56:57 +02:00