skia2/tests/sksl/folding/IntFoldingES2.glsl

70 lines
1.4 KiB
Plaintext
Raw Normal View History

vec4 main() {
int _1_unknown = int(sqrt(1.0));
bool _2_ok = true;
int _3_x = 34;
_2_ok = true;
_3_x = 30;
_2_ok = true;
_3_x = 64;
_2_ok = true;
_3_x = 16;
_2_ok = true;
_3_x = 1;
_2_ok = true;
_3_x = -2;
_2_ok = true;
_3_x = 3;
_2_ok = true;
_3_x = -4;
_2_ok = true;
_3_x = 5;
_2_ok = true;
_3_x = -6;
_2_ok = true;
_3_x = 7;
_2_ok = true;
_3_x = -8;
_2_ok = true;
_3_x = 9;
_2_ok = true;
_3_x = -10;
_2_ok = true;
_3_x = 11;
_2_ok = true;
_3_x = -12;
_2_ok = true;
_3_x = _1_unknown;
_2_ok = _3_x == _1_unknown;
_3_x = _1_unknown;
_2_ok = _2_ok && _3_x == _1_unknown;
_3_x = _1_unknown;
_2_ok = _2_ok && _3_x == _1_unknown;
_3_x = 0;
_2_ok = _2_ok;
_3_x = _1_unknown;
_2_ok = _2_ok && _3_x == _1_unknown;
_3_x = _1_unknown;
_2_ok = _2_ok && _3_x == _1_unknown;
_3_x = 0;
_2_ok = _2_ok;
_3_x = _1_unknown;
_2_ok = _2_ok && _3_x == _1_unknown;
_3_x = 0;
_2_ok = _2_ok;
_3_x += 1;
_2_ok = _2_ok && _3_x == 1;
_2_ok = _2_ok && _3_x == 1;
_3_x -= 2;
_2_ok = _2_ok && _3_x == -1;
_2_ok = _2_ok && _3_x == -1;
_2_ok = _2_ok && _3_x == -1;
_3_x *= 2;
_2_ok = _2_ok && _3_x == -2;
_2_ok = _2_ok && _3_x == -2;
_3_x /= 2;
_2_ok = _2_ok && _3_x == -1;
return _2_ok ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
}