xref: /aosp_15_r20/external/skia/tests/sksl/inliner/TrivialArgumentsInlineDirectly.glsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1
2out vec4 sk_FragColor;
3uniform vec4 colorGreen;
4uniform float unknownInput;
5uniform mat2 testMatrix2x2;
6struct S {
7    vec4 ah4[1];
8    float ah[1];
9    vec4 h4;
10    float h;
11};
12struct S4 {
13    float a;
14    float b;
15    float c;
16    float d;
17};
18struct S5 {
19    float a;
20    float b;
21    float c;
22    float d;
23    float e;
24};
25void keepAlive_vh(inout float f) {
26}
27vec4 main() {
28    S s;
29    s.ah4[0] = vec4(unknownInput);
30    s.ah[0] = unknownInput;
31    s.h4 = vec4(unknownInput);
32    s.h = unknownInput;
33    S as[1];
34    as[0].ah4[0] = vec4(unknownInput);
35    bool b = bool(unknownInput);
36    int i = int(unknownInput);
37    ivec4 i4 = ivec4(i);
38    vec4 var;
39    mat2 mat;
40    var = vec4(s.h) * vec4(s.h);
41    var = vec4(float(b), float(b), float(b), float(!b));
42    var = s.ah4[0].ywyw * s.ah4[0].wywy;
43    var = as[0].ah4[0].xyxy * as[0].ah4[0].yxyx;
44    var = s.h4.zzzz * s.h4.zzzz;
45    var = colorGreen.xyzx * colorGreen.xyzx;
46    var = vec4(s.h) * vec4(s.h);
47    var = vec4(s.h) * vec4(s.h);
48    var = s.ah4[0].xxxy * s.ah4[0].xxxy;
49    var = colorGreen * colorGreen;
50    var = vec4(1.0, 4.0, 9.0, 16.0);
51    var = vec4(float(i)) * vec4(float(i));
52    var = vec4(i4) * vec4(i4);
53    var = vec4(4.0, 8.0, 12.0, 4.0);
54    mat = mat2(unknownInput) * mat2(unknownInput)[0].x;
55    vec4 _0_h4 = vec4(testMatrix2x2);
56    var = _0_h4 * _0_h4;
57    mat2 _1_m = mat2(colorGreen.xy, colorGreen.zw);
58    mat = _1_m * _1_m[0].x;
59    mat2 _2_m = mat2(mat3(unknownInput));
60    mat = _2_m * _2_m[0].x;
61    vec4 _3_h4 = vec4(1.0, 2.0, 3.0, unknownInput);
62    var = _3_h4 * _3_h4;
63    S5 _4_s = S5(1.0, 2.0, 3.0, 4.0, 5.0);
64    var = vec4(_4_s.a, _4_s.b, _4_s.c, _4_s.d) * _4_s.e;
65    var = vec4(-s.h) * vec4(-s.h);
66    var = vec4(float(!b), float(!b), float(!b), float(b));
67    vec3 _5_h3 = s.h4.yyy + s.h4.zzz;
68    var = _5_h3.xyzx * _5_h3.xyzx;
69    vec4 _6_h4 = vec4(s.h4.y, 0.0, 0.0, 1.0);
70    var = _6_h4 * _6_h4;
71    keepAlive_vh(var.x);
72    keepAlive_vh(mat[0].x);
73    return colorGreen;
74}
75