|
cfe2c8fe
|
2025-06-25T13:25:01
|
|
WGSL: RewriteMultielementSwizzle
WGSL doesn't support assignments to multi-element swizzles.
This is used in a lot of shader tests, so temporarily work around
this with an AST traverser that splits these assignments into
multiple assignments that only assign to single element
swizzles.
One special case is multiplication-by-a-matrix assignment:
vec.xy *= mat;
is converted to
vec.x = (vec.xy * mat).x;
vec.y = (vec.xy * mat).y;
Bug: angleproject:392542001
Change-Id: I3f393039aae13eb3f2c5dc5e553f68eb03b6316d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6847280
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Liza Burakova <liza@chromium.org>
|