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
7591d4b5ef
skia2
/
tests
/
sksl
/
errors
/
InVarWithInitializerExpression.glsl
5 lines
93 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Report an SkSL error if an `in` var has an initializer expression. This resolves the fuzzer error, as the program will fail compilation before reaching the SPIR-V translation stage at all. Change-Id: Ia73af497b1f57314a29878f2d2a29dc80186e630 Bug: oss-fuzz:27300 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333130 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-09 16:19:02 +00:00
### Compilation failed:
Add unit test for fuzzer-detected error with in vars. `in` vars shouldn't support initializer expressions at all. The fuzzer noticed that dead-stripping interacts poorly with `in` var initializer expressions, which makes sense because it's an unsupported and untested path. In a followup CL, lines 1 and 3 will both become errors. Change-Id: Ibb64ca319a046b040eea976acb6798a1402451de Bug: oss-fuzz:27300 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333128 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-09 15:50:35 +00:00
Report an SkSL error if an `in` var has an initializer expression. This resolves the fuzzer error, as the program will fail compilation before reaching the SPIR-V translation stage at all. Change-Id: Ia73af497b1f57314a29878f2d2a29dc80186e630 Bug: oss-fuzz:27300 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333130 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-09 16:19:02 +00:00
error: 1: 'in' variables cannot use initializer expressions
Force global initializers to be constant expressions Prevents us from accepting code that can't be correctly transformed to GLSL, like: uniform float x; float y = x; (Previously, writing code like that in a runtime effect would effectively produce the exact same code all the way through to GLSL, and the driver would fail to compile it). Bug: skia:11336 Change-Id: Iaa797587c4a4a7289ed59ce2736cf0bf0fc5bca3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384698 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
2021-03-05 21:45:06 +00:00
1 error
Reference in New Issue
Copy Permalink