b44185086e
This reverts commit38df4c8470
. Reason for revert: updated ArrayTypes test for ES2 compatibility Original change's description: > Revert "Improve support for arrays in Metal." > > This reverts commitdd904af566
. > > 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> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com Bug: skia:10761 Bug: skia:10760 Bug: skia:11022 Bug: skia:10939 Change-Id: Ia1c4917f5d3c41162d282b3093814d861707ad30 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366144 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
61 lines
680 B
Metal
61 lines
680 B
Metal
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
using namespace metal;
|
|
struct S1 {
|
|
int x;
|
|
};
|
|
struct S2 {
|
|
S1 x;
|
|
};
|
|
struct S3 {
|
|
S2 x;
|
|
};
|
|
struct S4 {
|
|
S3 x;
|
|
};
|
|
struct S5 {
|
|
S4 x;
|
|
};
|
|
struct S6 {
|
|
S5 x;
|
|
};
|
|
struct S7 {
|
|
S6 x;
|
|
};
|
|
struct S8 {
|
|
S7 x;
|
|
};
|
|
struct SA1 {
|
|
array<int, 8> x;
|
|
};
|
|
struct SA2 {
|
|
array<SA1, 7> x;
|
|
};
|
|
struct SA3 {
|
|
array<SA2, 6> x;
|
|
};
|
|
struct SA4 {
|
|
array<SA3, 5> x;
|
|
};
|
|
struct SA5 {
|
|
array<SA4, 4> x;
|
|
};
|
|
struct SA6 {
|
|
array<SA5, 3> x;
|
|
};
|
|
struct SA7 {
|
|
array<SA6, 2> x;
|
|
};
|
|
struct SA8 {
|
|
array<SA7, 1> x;
|
|
};
|
|
struct Inputs {
|
|
S8 s8;
|
|
array<SA8, 9> sa8;
|
|
};
|
|
struct Outputs {
|
|
float4 sk_FragColor [[color(0)]];
|
|
};
|
|
|
|
|