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>
8 lines
123 B
GLSL
8 lines
123 B
GLSL
|
|
out vec4 sk_FragColor;
|
|
vec4 main() {
|
|
mat2 x = mat2(0.0, 1.0, 2.0, 3.0);
|
|
vec2 y = vec4(x).xy;
|
|
return y.xyxy;
|
|
}
|