skia2/resources/sksl
John Stiles 80b02af6ba 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 23:49:04 +00:00
..
blend Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
errors Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
folding Fix alpha channel in SelfAssignment test. 2021-02-11 14:41:15 +00:00
fp Add bool2/bool3/bool4 to GrSLType. 2021-02-02 00:25:29 +00:00
glsl Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
inliner Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
intrinsics Revert "Add intrinsic tests for mod() and fract()." 2021-01-30 13:38:31 +00:00
metal Add default uniform binding value for Metal/SPIR-V. 2021-01-28 19:23:49 +00:00
runtime Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
runtime_errors Reject array-typed vardecls and array ctors in strict ES2 mode. 2021-02-04 19:36:50 +00:00
shared Fix SPIR-V bug with swizzled out parameters. 2021-02-12 15:21:27 +00:00
spirv Improve memory layout handling in SPIRV generator 2021-01-22 22:16:48 +00:00
workarounds Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00
README.txt Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00

This directory contains source files for testing skslc compilation.
The compiled output files are in the /tests/sksl/ directory.