xref: /aosp_15_r20/external/skia/resources/sksl/shared/StructComparison.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform half4 colorGreen, colorRed;
2uniform float[5] testArray;
3
4struct S {
5    int x, y;
6    half2x2 m;
7    float[5] a;
8};
9
10half4 main(float2 coords) {
11    float array[5] = float[5](1, 2, 3, 4, 5);
12    S s1 = S(1, 2, half2x2(1), array);
13    S s2 = S(1, 2, half2x2(1), testArray);
14    S s3 = S(1, 2, half2x2(2), float[5](1, 2, 3, 4, 5));
15
16    return (s1 == s2) && (s1 != s3) ? colorGreen : colorRed;
17}
18