• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2out vec4 sk_FragColor;
3uniform vec4 colorRed;
4uniform vec4 colorGreen;
5uniform float unknownInput;
6bool test_int_b() {
7    bool ok = true;
8    ivec4 inputRed = ivec4(colorRed);
9    ivec4 inputGreen = ivec4(colorGreen);
10    ivec4 x = inputRed + 2;
11    ok = ok && x == ivec4(3, 2, 2, 3);
12    x = inputGreen.ywxz - 2;
13    ok = ok && x == ivec4(-1, -1, -2, -2);
14    x = inputRed + inputGreen.y;
15    ok = ok && x == ivec4(2, 1, 1, 2);
16    x.xyz = inputGreen.wyw * 9;
17    ok = ok && x == ivec4(9, 9, 9, 2);
18    x.xy = x.zw / 3;
19    ok = ok && x == ivec4(3, 0, 9, 2);
20    x = (inputRed * 5).yxwz;
21    ok = ok && x == ivec4(0, 5, 5, 0);
22    x = 2 + inputRed;
23    ok = ok && x == ivec4(3, 2, 2, 3);
24    x = 10 - inputGreen.ywxz;
25    ok = ok && x == ivec4(9, 9, 10, 10);
26    x = inputRed.x + inputGreen;
27    ok = ok && x == ivec4(1, 2, 1, 2);
28    x.xyz = 9 * inputGreen.wyw;
29    ok = ok && x == ivec4(9, 9, 9, 2);
30    x.xy = 36 / x.zw;
31    ok = ok && x == ivec4(4, 18, 9, 2);
32    x = (36 / x).yxwz;
33    ok = ok && x == ivec4(2, 9, 18, 4);
34    x += 2;
35    x *= 2;
36    x -= 4;
37    x /= 2;
38    ok = ok && x == ivec4(2, 9, 18, 4);
39    x = x + 2;
40    x = x * 2;
41    x = x - 4;
42    x = x / 2;
43    ok = ok && x == ivec4(2, 9, 18, 4);
44    return ok;
45}
46vec4 main() {
47    bool _0_ok = true;
48    vec4 _1_inputRed = colorRed;
49    vec4 _2_inputGreen = colorGreen;
50    vec4 _3_x = _1_inputRed + 2.0;
51    _0_ok = _0_ok && _3_x == vec4(3.0, 2.0, 2.0, 3.0);
52    _3_x = _2_inputGreen.ywxz - 2.0;
53    _0_ok = _0_ok && _3_x == vec4(-1.0, -1.0, -2.0, -2.0);
54    _3_x = _1_inputRed + _2_inputGreen.y;
55    _0_ok = _0_ok && _3_x == vec4(2.0, 1.0, 1.0, 2.0);
56    _3_x.xyz = _2_inputGreen.wyw * 9.0;
57    _0_ok = _0_ok && _3_x == vec4(9.0, 9.0, 9.0, 2.0);
58    _3_x.xy = _3_x.zw / 0.5;
59    _0_ok = _0_ok && _3_x == vec4(18.0, 4.0, 9.0, 2.0);
60    _3_x = (_1_inputRed * 5.0).yxwz;
61    _0_ok = _0_ok && _3_x == vec4(0.0, 5.0, 5.0, 0.0);
62    _3_x = 2.0 + _1_inputRed;
63    _0_ok = _0_ok && _3_x == vec4(3.0, 2.0, 2.0, 3.0);
64    _3_x = 10.0 - _2_inputGreen.ywxz;
65    _0_ok = _0_ok && _3_x == vec4(9.0, 9.0, 10.0, 10.0);
66    _3_x = _1_inputRed.x + _2_inputGreen;
67    _0_ok = _0_ok && _3_x == vec4(1.0, 2.0, 1.0, 2.0);
68    _3_x.xyz = 9.0 * _2_inputGreen.wyw;
69    _0_ok = _0_ok && _3_x == vec4(9.0, 9.0, 9.0, 2.0);
70    _3_x.xy = 36.0 / _3_x.zw;
71    _0_ok = _0_ok && _3_x == vec4(4.0, 18.0, 9.0, 2.0);
72    _3_x = (36.0 / _3_x).yxwz;
73    _0_ok = _0_ok && _3_x == vec4(2.0, 9.0, 18.0, 4.0);
74    _3_x += 2.0;
75    _3_x *= 2.0;
76    _3_x -= 4.0;
77    _3_x /= 2.0;
78    _0_ok = _0_ok && _3_x == vec4(2.0, 9.0, 18.0, 4.0);
79    _3_x = _3_x + 2.0;
80    _3_x = _3_x * 2.0;
81    _3_x = _3_x - 4.0;
82    _3_x = _3_x / 2.0;
83    _0_ok = _0_ok && _3_x == vec4(2.0, 9.0, 18.0, 4.0);
84    return _0_ok && test_int_b() ? colorGreen : colorRed;
85}
86