639e812d9f
In the majority of cases, a uniform is an equally good substitute, and replacing `sqrt(N)` with `unknownInput` actually makes the test clearer. Change-Id: I7bcb477571972d7aa2ce8c49b3674471f7310748 Bug: skia:12034 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411306 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
75 lines
1.9 KiB
GLSL
75 lines
1.9 KiB
GLSL
|
|
out vec4 sk_FragColor;
|
|
uniform vec4 colorRed;
|
|
uniform vec4 colorGreen;
|
|
uniform float unknownInput;
|
|
vec4 main() {
|
|
float _0_unknown = unknownInput;
|
|
bool _1_ok = true;
|
|
float _2_x = 34.0;
|
|
_1_ok = _1_ok && _2_x == 34.0;
|
|
_2_x = 30.0;
|
|
_1_ok = _1_ok && _2_x == 30.0;
|
|
_2_x = 64.0;
|
|
_1_ok = _1_ok && _2_x == 64.0;
|
|
_2_x = 16.0;
|
|
_1_ok = _1_ok && _2_x == 16.0;
|
|
_2_x = 19.0;
|
|
_1_ok = _1_ok && _2_x == 19.0;
|
|
_2_x = 1.0;
|
|
_1_ok = _1_ok && _2_x == 1.0;
|
|
_2_x = -2.0;
|
|
_1_ok = _1_ok && _2_x == -2.0;
|
|
_2_x = 3.0;
|
|
_1_ok = _1_ok && _2_x == 3.0;
|
|
_2_x = -4.0;
|
|
_1_ok = _1_ok && _2_x == -4.0;
|
|
_2_x = 5.0;
|
|
_1_ok = _1_ok && _2_x == 5.0;
|
|
_2_x = -6.0;
|
|
_1_ok = _1_ok && _2_x == -6.0;
|
|
_2_x = 7.0;
|
|
_1_ok = _1_ok && _2_x == 7.0;
|
|
_2_x = -8.0;
|
|
_1_ok = _1_ok && _2_x == -8.0;
|
|
_2_x = 9.0;
|
|
_1_ok = _1_ok && _2_x == 9.0;
|
|
_2_x = -10.0;
|
|
_1_ok = _1_ok && _2_x == -10.0;
|
|
_2_x = 11.0;
|
|
_1_ok = _1_ok && _2_x == 11.0;
|
|
_2_x = -12.0;
|
|
_1_ok = _1_ok && _2_x == -12.0;
|
|
_2_x = _0_unknown;
|
|
_1_ok = _1_ok && _2_x == _0_unknown;
|
|
_2_x = _0_unknown;
|
|
_1_ok = _1_ok && _2_x == _0_unknown;
|
|
_2_x = _0_unknown;
|
|
_1_ok = _1_ok && _2_x == _0_unknown;
|
|
_2_x = 0.0;
|
|
_1_ok = _1_ok && _2_x == 0.0;
|
|
_2_x = _0_unknown;
|
|
_1_ok = _1_ok && _2_x == _0_unknown;
|
|
_2_x = _0_unknown;
|
|
_1_ok = _1_ok && _2_x == _0_unknown;
|
|
_2_x = 0.0;
|
|
_1_ok = _1_ok && _2_x == 0.0;
|
|
_2_x = _0_unknown;
|
|
_1_ok = _1_ok && _2_x == _0_unknown;
|
|
_2_x = 0.0;
|
|
_1_ok = _1_ok && _2_x == 0.0;
|
|
_2_x += 1.0;
|
|
_1_ok = _1_ok && _2_x == 1.0;
|
|
_1_ok = _1_ok && _2_x == 1.0;
|
|
_2_x -= 2.0;
|
|
_1_ok = _1_ok && _2_x == -1.0;
|
|
_1_ok = _1_ok && _2_x == -1.0;
|
|
_1_ok = _1_ok && _2_x == -1.0;
|
|
_2_x *= 2.0;
|
|
_1_ok = _1_ok && _2_x == -2.0;
|
|
_1_ok = _1_ok && _2_x == -2.0;
|
|
_2_x /= 2.0;
|
|
_1_ok = _1_ok && _2_x == -1.0;
|
|
return _1_ok ? colorGreen : colorRed;
|
|
}
|