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
130338c9e1
skia2
/
tests
/
sksl
/
shared
/
UniformArray.glsl
5 lines
39 B
Plaintext
Raw
Normal View
History
Unescape
Escape
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
Add default uniform set value to SkSL Program settings. This allows uniforms to be specified without an explicit `layout(set=N)` modifier. They will assume a default set value instead. This turns out to fix a handful of tests in Metal/SPIR-V which were written with GLSL in mind, or adapted from real generated GLSL code, and didn't have layout information specified on their uniforms. It will also make it easier to write SkSL tests using uniforms that can compile either as a runtime effect or as plain Metal/SPIR-V code. Change-Id: Id79ec06f278b913a45c09c2e6211195dc98b42c0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359838 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-01-26 21:22:53 +00:00
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