skia2/resources/sksl/shared/OperatorsES2.sksl
John Stiles d842feea48 Avoid comma usage in Operators test.
This works around a GLSL compilation bug on the Tecno Spark 3 Pro.

Change-Id: I516bd64745a8e99cccc87ee4bb2e1f5d5b26c130
Bug: skia:11255
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364116
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-02 14:34:24 +00:00

25 lines
544 B
Plaintext

uniform half4 colorGreen, colorRed;
half4 main() {
float x = 1, y = 2;
int z = 3;
x = x - x + y * x * x * (y - x);
y = x / y / x;
z = (z / 2 * 3 + 4) - 2;
bool b = (x > 4) == x < 2 || 2 >= sqrt(2) && y <= x;
bool c = sqrt(2) > 2;
bool d = b ^^ c;
bool e = b && c;
bool f = b || c;
x += 12;
x -= 12;
x *= y /= 10;
x = 6;
y = float(b) * float(c) * float(d) * float(e) * float(f);
y = 6;
z = z - 1;
z = 6;
return (x == 6 && y == 6 && z == 6) ? colorGreen : colorRed;
}