skia2/tests/sksl/folding/IntFoldingES2.glsl
John Stiles 0ac6c15075 Reduce self-assignment expressions (x = x) into just x.
Change-Id: I44356aa781f208f4941dbeb617a30318e36c1081
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367062
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-10 20:00:05 +00:00

71 lines
1.5 KiB
GLSL

out vec4 sk_FragColor;
uniform vec4 colorRed;
uniform vec4 colorGreen;
uniform float unknownInput;
vec4 main() {
int _1_unknown = int(unknownInput);
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;
_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;
_3_x = _1_unknown;
_2_ok = _2_ok && _3_x == _1_unknown;
_3_x = 0;
_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 ? colorGreen : colorRed;
}