38df4c8470
This reverts commit dd904af566
.
Reason for revert: breaks ANGLE
Original change's description:
> Improve support for arrays in Metal.
>
> Arrays in Metal now use the `array<T, N>` type instead of the C-style
> `T[N]` type. This gives them semantics much more in line with GLSL,
> so they can be initialized and assigned like GLSL arrays.
>
> This allows the ArrayTypes and Assignment tests to pass, so they have
> been added to our dm SkSL tests. (ArrayConstructors also passes, but
> is not ES2-compliant so it is not enabled.)
>
> Change-Id: Id1028311963084befd0e044e11e223af6a064dda
> Bug: skia:10761, skia:10760, skia:11022, skia:10939
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365699
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: If6a18dea7d6a45fa7836e9129bf81c2e536f07e3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10761
Bug: skia:10760
Bug: skia:11022
Bug: skia:10939
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365976
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
47 lines
1.0 KiB
GLSL
47 lines
1.0 KiB
GLSL
|
|
out vec4 sk_FragColor;
|
|
struct S {
|
|
float f;
|
|
float[5] af;
|
|
vec4 h4;
|
|
vec4[5] ah4;
|
|
};
|
|
void main() {
|
|
vec4 x;
|
|
x.w = 0.0;
|
|
x.yx = vec2(0.0);
|
|
int ai[1];
|
|
ai[0] = 0;
|
|
ivec4 ai4[1];
|
|
ai4[0] = ivec4(1, 2, 3, 4);
|
|
mat2x4 ah2x4[1];
|
|
ah2x4[0] = mat2x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0);
|
|
ai[0] = 0;
|
|
ai[ai[0]] = 0;
|
|
vec4 af4[1];
|
|
af4[0].x = 0.0;
|
|
af4[0].ywxz = vec4(1.0);
|
|
S s;
|
|
s.f = 0.0;
|
|
s.af[1] = 0.0;
|
|
s.h4.zxy = vec3(9.0);
|
|
s.ah4[2].yw = vec2(5.0);
|
|
s.f = 1.0;
|
|
s.af[0] = 2.0;
|
|
s.h4 = vec4(1.0);
|
|
s.ah4[0] = vec4(2.0);
|
|
sk_FragColor = vec4(0.0);
|
|
sk_FragColor = vec4(ivec4(1, 2, 3, 4));
|
|
sk_FragColor = mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)[0].xxyz;
|
|
sk_FragColor = x;
|
|
sk_FragColor = vec4(float(ai[0]));
|
|
sk_FragColor = vec4(ai4[0]);
|
|
sk_FragColor = ah2x4[0][0];
|
|
sk_FragColor = af4[0];
|
|
sk_FragColor = vec4(0.0);
|
|
sk_FragColor = vec4(s.f);
|
|
sk_FragColor = vec4(s.af[1]);
|
|
sk_FragColor = s.h4;
|
|
sk_FragColor = s.ah4[0];
|
|
}
|