1c7d442b52
SkSL will reject ES2-compatible code because function parameters always require a name in SkSL. (A followup CL relaxes this restriction and allows anonymous parameters in SkSL.) Change-Id: Ifdcf0fcbe0f52d16007c018b545631ca4033a8c4 Bug: skia:12769 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/489537 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
16 lines
282 B
Plaintext
16 lines
282 B
Plaintext
uniform half4 colorGreen, colorRed;
|
|
|
|
struct S { int i; };
|
|
|
|
half4 fnGreen(bool b, float2) {
|
|
return colorGreen;
|
|
}
|
|
|
|
half4 fnRed(int, float f, S) {
|
|
return colorRed;
|
|
}
|
|
|
|
half4 main(float2 coords) {
|
|
return bool(colorGreen.g) ? fnGreen(true, coords) : fnRed(123, 3.14, S(0));
|
|
}
|