Confirm that GLSL codegen always emits array-size after the identifier.
GLSL ES2 doesn't support the ES3-style `type[size] name;` syntax. SkSL always emits array decls in ES2-compatible syntax, regardless of the ordering in the input code. Change-Id: Ibf591713b2d506db7d63a6db8b79a3246f98c3cc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/491976 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
4cd3ae4009
commit
a5d4541ae5
@ -7,18 +7,18 @@ struct S {
|
||||
half4 main(float2 coords) {
|
||||
float f1[4] = float[4](1, 2, 3, 4);
|
||||
float f2[4] = float[4](1, 2, 3, 4);
|
||||
float f3[4] = float[4](1, 2, 3, -4);
|
||||
float[4] f3 = float[4](1, 2, 3, -4);
|
||||
|
||||
int3 v1[2] = int3[2](int3(1, 2, 3), int3(4, 5, 6));
|
||||
int3 v2[2] = int3[2](int3(1, 2, 3), int3(4, 5, 6));
|
||||
int3[2] v2 = int3[2](int3(1, 2, 3), int3(4, 5, 6));
|
||||
int3 v3[2] = int3[2](int3(1, 2, 3), int3(4, 5, -6));
|
||||
|
||||
half2x2 m1[3] = half2x2[3](half2x2(1), half2x2(2), half2x2(3, 4, 5, 6));
|
||||
half2x2[3] m1 = half2x2[3](half2x2(1), half2x2(2), half2x2(3, 4, 5, 6));
|
||||
half2x2 m2[3] = half2x2[3](half2x2(1), half2x2(2), half2x2(3, 4, 5, 6));
|
||||
half2x2 m3[3] = half2x2[3](half2x2(1), half2x2(2, 3, 4, 5), half2x2(6));
|
||||
|
||||
S s1[3] = S[3](S(1, 2), S(3, 4), S(5, 6));
|
||||
S s2[3] = S[3](S(1, 2), S(0, 0), S(5, 6));
|
||||
S[3] s2 = S[3](S(1, 2), S(0, 0), S(5, 6));
|
||||
S s3[3] = S[3](S(1, 2), S(3, 4), S(5, 6));
|
||||
|
||||
return (f1 == f2) && (f1 != f3) &&
|
||||
|
Loading…
Reference in New Issue
Block a user