6bef6a7858
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> |
||
---|---|---|
.. | ||
blend | ||
errors | ||
fp | ||
glsl | ||
inliner | ||
metal | ||
shared | ||
spirv | ||
workarounds |