9ea48e3965
GLSL only allows one-dimensional arrays. This CL lowers SkSL's array dimensionality limit from eight to one, and fixes all the tests that this breaks. The rest of the code still technically supports arbitrarily-deep array dimensionality; there are many opportunities for code cleanup and simplification in followup CLs. Change-Id: I0fc31e4626649ec69d40c5f5597b3924de298df0 Bug: skia:11026 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340339 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
19 lines
259 B
Plaintext
19 lines
259 B
Plaintext
/*#pragma settings NoInline*/
|
|
|
|
float foo(float v[2]) {
|
|
return v[0] * v[1];
|
|
}
|
|
|
|
void bar(inout float x) {
|
|
float y[2], z;
|
|
y[0] = x;
|
|
y[1] = x * 2;
|
|
z = foo(y);
|
|
}
|
|
|
|
void main() {
|
|
float x = 10;
|
|
bar(x);
|
|
sk_FragColor = half4(half(x));
|
|
}
|