9ae6ea0711
The optimization logic for swizzling a constructor assumed that every argument to the constructor was a scalar or vector. When it was written, this assumption was true. However, we recently added support for casting mat2x2 to float4 which violates the assumption. We now check every argument and do not attempt to optimize if a non-scalar, non-vector arg is found. Change-Id: Ia2b297bd62dfdf4af56712164fbc80c29c9611eb Bug: oss-fuzz:36852 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437017 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
6 lines
122 B
Plaintext
6 lines
122 B
Plaintext
half4 main(float2 coords) {
|
|
half2x2 x = half2x2(0, 1, 2, 3);
|
|
float2 y = float4(x).xy;
|
|
return half4(y.xyxy);
|
|
}
|