skia2/tests/sksl/shared/Functions.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

19 lines
334 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorGreen;
uniform vec4 colorRed;
float foo_ff2(vec2 v) {
return v.x * v.y;
}
void bar_vf(inout float x) {
float y[2];
y[0] = x;
y[1] = x * 2.0;
x = foo_ff2(vec2(y[0], y[1]));
}
vec4 main() {
float x = 10.0;
bar_vf(x);
return x == 200.0 ? colorGreen : colorRed;
}