skia2/tests/sksl
John Stiles 6bef6a7858 Fix flipped array dimensions in SkSL.
The proper approach for creating multi-dimensional array types is
complicated, so I added a function in SymbolTable which does it the
right way (addArrayDimensions). I found all the places in SkSL which
created arrays from base types and size arrays, and refactored them to
call addArrayDimensions instead of doing it manually.

I believe that this approach fixes a bunch of minor issues with multi-
dimensional array types; some are visible in the current codegen output,
and others are latent bugs. e.g. in some instances, a Variable's type()
was silently holding flipped array dimensions, but this never led to
a visible bug because we ended up using the VarDeclaration's baseType()
plus sizes() everywhere that the type was used. (In particular, this
caused debugging headaches in http://review.skia.org/340137 where I'd
use a Variable's type and suddenly its array dimensions would be wrong.)

Change-Id: Idd6a86aa5d1dce8918d02a53bcc2f7d7886e3ac5
Bug: skia:11016, skia:10924
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339860
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-02 20:07:57 +00:00
..
blend Fix SPIR-V and Metal support for enum types. 2020-11-30 18:05:48 +00:00
errors Disallow global variables containing arrays of opaque types. 2020-12-01 20:04:14 +00:00
fp Reland "Remove inliner from IR generation stage." 2020-11-20 18:44:07 +00:00
glsl Add golden outputs for the Metal backend. 2020-09-25 17:46:43 +00:00
inliner Add global struct definitions to SkSL. 2020-11-30 15:26:14 +00:00
metal Enforce layout(location=...) on Metal out variables. 2020-12-01 20:41:15 +00:00
shared Fix flipped array dimensions in SkSL. 2020-12-02 20:07:57 +00:00
spirv Disallow global variables containing arrays of opaque types. 2020-12-01 20:04:14 +00:00
workarounds Avoid inlining functions that are called repeatedly. 2020-11-23 21:51:43 +00:00