skia2/tests/sksl/shared/CommaSideEffects.glsl
John Stiles ece1d794b9 Mangle function names in GLSL.
This will be implemented in Metal and SPIR-V in followup CLs.

Change-Id: I397b4db40b15dd54cf1d8a17f414c3fe184b48d2
Bug: skia:10851
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387638
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-22 17:18:26 +00:00

23 lines
490 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorRed;
uniform vec4 colorGreen;
uniform vec4 colorWhite;
uniform vec4 colorBlack;
void setToColorBlack_vh4(out vec4 x) {
x = colorBlack;
}
vec4 main() {
vec4 a;
vec4 b;
vec4 c;
vec4 d;
(b = colorRed , c = colorGreen);
a = (setToColorBlack_vh4(d) , colorWhite);
a *= a;
b *= b;
c *= c;
d *= d;
return ((a == colorWhite && b == colorRed) && c == colorGreen) && d == colorBlack ? colorGreen : colorRed;
}