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
f7410bd413
skia2
/
tests
/
sksl
/
shared
/
UniformArray.sksl
4 lines
52 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Disallow multi-dimensional arrays in SkSL. GLSL only allows one-dimensional arrays. This CL lowers SkSL's array dimensionality limit from eight to one, and fixes all the tests that this breaks. The rest of the code still technically supports arbitrarily-deep array dimensionality; there are many opportunities for code cleanup and simplification in followup CLs. Change-Id: I0fc31e4626649ec69d40c5f5597b3924de298df0 Bug: skia:11026 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340339 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-03 15:40:28 +00:00
layout(set=0) uniform float arr[3];
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 19:26:04 +00:00
void main() {}
Reference in New Issue
Copy Permalink