skia2/resources/sksl/shared/StructMaxDepth.sksl
John Stiles e7a9535247 Enforce basic limits on global size in SkSL.
Much like http://review.skia.org/467759, this CL defensively guards
against programs which consume more space than is reasonable. Globals
exist outside of functions, so they wouldn't be caught by the stack size
checks.

Change-Id: I035f27d57bc329508820a729a1e367ecaadfe156
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467760
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-11-04 18:34:19 +00:00

20 lines
403 B
Plaintext

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; };
in S8 s8;
struct SA1 { int x[2]; };
struct SA2 { SA1 x[2]; };
struct SA3 { SA2 x[2]; };
struct SA4 { SA3 x[2]; };
struct SA5 { SA4 x[2]; };
struct SA6 { SA5 x[2]; };
struct SA7 { SA6 x[2]; };
struct SA8 { SA7 x[2]; };
in SA8 sa8[2];