This website requires JavaScript.
ReeceSX
Explore
Aurora
Register
Sign In
AuroraMiddleware
/
skia2
Watch
1
Star
0
Fork
0
You've already forked skia2
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
fcbd099bcc
skia2
/
resources
/
sksl
/
errors
/
ArrayTooManyDimensionsInStruct.rts
6 lines
85 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Fix assertion when arrays are double-declared. Multi-dimensional arrays aren't legal in GLSL/SkSL, so this should be caught and flagged as an error. The parser now verifies that a variable's type isn't an array-type before accepting a `[` token to open an array on the variable name. This CL also refactors the IR generator's `convertArraySize` method to make sure that various checks are made for all callers. Originally this restructuring was used to verify array multi-dimensionality, but that didn't detect errors inside struct declarations (which get no error checking inside the IR generator) so the IR generator updates no longer need to check the array dimensions. Bug: skia:11322 Change-Id: Id33f4bdfb544019ddf995a8196c3c09cfe5a4525 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369916 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-12 22:07:51 +00:00
struct S { float x[2][2]; };
Add expected errors to every test file. This was (crudely) automated with shell scripts: http://go/paste/5484300603490304 Change-Id: Ic9e1c93112772d303d1158eb26d995f27b439eba Bug: skia:12665 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505637 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-08 17:19:26 +00:00
/*%%*
multi-dimensional arrays are not supported
*%%*/
Reference in New Issue
Copy Permalink