skia2/tests/sksl/folding/IntFoldingES2.glsl
John Stiles bfc9be0f77 Migrate SkSL test inputs to the resources/ directory.
This will allow us to load these inputs for unit testing in `dm`.

Change-Id: Id256ba7c30d3ec94b98048e47af44cf9efe580d5
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357282
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-22 18:57:29 +00:00

70 lines
1.4 KiB
GLSL

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);
}