| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Delete all filegroups that supported legacy (non-buffet) Bazel build We don't need most of the flags and all these file groups which had made a big "ball o mud" build. Change-Id: I690f38c3555e390b7c8d459b4649a270c3e03ce2 Bug: b/40045064 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/889266 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 1 年前 | |
Handle rewrite-matrix-vector-multiply directly in SPIR-V. This will allow us to remove all caps-handling from the front-end. In addition, it also ends up making slightly tighter code. The GLSL output no longer emits a workaround; this is intentional, as the workaround was only ever targeted towards SPIR-V. Change-Id: I33d4f053000cbfbbb52bf69ff6cc166dc085615c Bug: b/40042841 Bug: b/316916102 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/791300 Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 2 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Switch to unique_ptr<> for SymbolTable management. Previously, it was unclear who was ultimately responsible for ownership of a symbol table. Now, symbol tables are owned by the IR node which made them. We have one global scope, and additional scopes can be created by a Block, Switch, or For. Change-Id: Ifce8a7ad7e752cc409487767e3c059357a55ec27 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/800220 Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Switch to unique_ptr<> for SymbolTable management. Previously, it was unclear who was ultimately responsible for ownership of a symbol table. Now, symbol tables are owned by the IR node which made them. We have one global scope, and additional scopes can be created by a Block, Switch, or For. Change-Id: Ifce8a7ad7e752cc409487767e3c059357a55ec27 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/800220 Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Mark more single argument constructors explicit I had a more expansive search pattern and found a few more candidates this time around. Gemini CLI did most of the work here and it does not appear we were implicitly using the conversion. Change-Id: Ia51d127a099dca4f76f7e13012d9f19dd1038e50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1076816 Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Move SkSLDefines to src/sksl/ It has no more uses in include/ Change-Id: Iefdf22e5b88625c84c1305a24184503e96561a98 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/753497 Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 2 年前 | |
Return a span from SkSL::Type::fields(). This makes it possible for code to return an empty span, if they don't have a Field vector. Change-Id: I3632838849a1579e1d781759cbbc2fea856843ab Reviewed-on: https://skia-review.googlesource.com/c/skia/+/673122 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Arman Uguray <armansito@google.com> Reviewed-by: Arman Uguray <armansito@google.com> | 3 年前 | |
Update (some) callers to follow more strict span rules - allows us to migrate to std::span, keeping SkSpan (for now) as an alias. - idea is to land call-site-cleanups separately, so that when we do try to actually throw the switch, that CL only contains the switch (build-flag) itself. Change-Id: I5f9aaafeb297b7adc1d953019fdac6ffda95fe03 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1097896 Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Move SkSLDefines to src/sksl/ It has no more uses in include/ Change-Id: Iefdf22e5b88625c84c1305a24184503e96561a98 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/753497 Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 2 年前 | |
Move SkSLDefines to src/sksl/ It has no more uses in include/ Change-Id: Iefdf22e5b88625c84c1305a24184503e96561a98 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/753497 Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 2 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Convert TArray::reserve_back to reserve_exact in SkSL. In practice, every call site was operating on an empty array, so this was a straightforward fix. (In one case, it was not necessarily clear that the array would be empty--even though it would in fact be empty in practice--so I added array.size() anyway, just in case.) Bug: skia:14316 Change-Id: I126e475fd5417f72c8f7495de37860c2273476f2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/709157 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 3 年前 | |
Move SkSLDefines to src/sksl/ It has no more uses in include/ Change-Id: Iefdf22e5b88625c84c1305a24184503e96561a98 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/753497 Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 2 年前 | |
Fix expression position of redundant casts. The fuzzer discovered that by properly structuring a ternary expression, it could emit a redundant ConstructorScalarCast. This would be optimized away (good!) but the passed-in Position would not be preserved; this triggers an assertion. We now honor the passed-in Position here. ConstructorCompoundCast had a similar issue which is now also fixed. Since the fuzzer has never discovered it, this is probably unreachable right now. Constructor::Convert already has a similar check so it's likely deflecting all such casts before they reach ConstructorCompoundCast. Bug: oss-fuzz:62619 Change-Id: I8ee54457dd115f7916ce83fbe43a9a4e3c55e74d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/759756 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 2 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
[includes] Apply include-what-you-use to sksl/ Change-Id: I964ac2d7d2f1e9d10b0216deb6572b28a26da0fc Bug: skia:13052 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547256 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 4 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
[includes] Apply include-what-you-use to sksl/ Change-Id: I964ac2d7d2f1e9d10b0216deb6572b28a26da0fc Bug: skia:13052 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547256 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 4 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Fix expression position of redundant casts. The fuzzer discovered that by properly structuring a ternary expression, it could emit a redundant ConstructorScalarCast. This would be optimized away (good!) but the passed-in Position would not be preserved; this triggers an assertion. We now honor the passed-in Position here. ConstructorCompoundCast had a similar issue which is now also fixed. Since the fuzzer has never discovered it, this is probably unreachable right now. Constructor::Convert already has a similar check so it's likely deflecting all such casts before they reach ConstructorCompoundCast. Bug: oss-fuzz:62619 Change-Id: I8ee54457dd115f7916ce83fbe43a9a4e3c55e74d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/759756 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 2 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
[includes] Apply include-what-you-use to sksl/ Change-Id: I964ac2d7d2f1e9d10b0216deb6572b28a26da0fc Bug: skia:13052 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/547256 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 4 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Rename SkSL::Type::Field and SkSL::Field. SkSL::Field --> SkSL::FieldSymbol SkSL::Type::Field --> SkSL::Field FieldSymbol is rarely used; it's just a mechanism for putting field names in the top-level symbol table for anonymous interface blocks (so foo can be associated with anonymous IB MyInterfaceBlock.foo). Type::Field is a heavy hitter, and has a matching DSLField type which is removed in the followup CL (http://review.skia.org/696597). Change-Id: I26b3c32c2ad5ccdb4e2146ceb2f0354cb5a5fe05 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/696636 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Arman Uguray <armansito@google.com> | 3 年前 | |
Move SkSLDefines to src/sksl/ It has no more uses in include/ Change-Id: Iefdf22e5b88625c84c1305a24184503e96561a98 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/753497 Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 2 年前 | |
Mark more single argument constructors explicit I had a more expansive search pattern and found a few more candidates this time around. Gemini CLI did most of the work here and it does not appear we were implicitly using the conversion. Change-Id: Ia51d127a099dca4f76f7e13012d9f19dd1038e50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1076816 Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Mark more single argument constructors explicit I had a more expansive search pattern and found a few more candidates this time around. Gemini CLI did most of the work here and it does not appear we were implicitly using the conversion. Change-Id: Ia51d127a099dca4f76f7e13012d9f19dd1038e50 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1076816 Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 8 个月前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Add #ifdef guards to headers to avoid double-declarations Some of these had been working due to not declaring classes (only forward-declaring types/functions), but some were working due to luck (only one place #included them?). To find these, I wrote a small python script which did if "#ifndef" not in contents: and that caught all infractions (and a few false-positives). There are a few non-trivial changes that I noticed while doing this: - missing SK_API in GrGLMakeGLXInterface.h (probably working because Chrome's not using this yet) - no #def guard in GrDriverBugWorkaroundsAutogen (see also tools/build_workaround_header.py) Change-Id: I8834e6343e89ca957e61e8436742221ef3d3e017 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/815099 Owners-Override: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Reviewed-by: Nicolette Prevost <nicolettep@google.com> | 2 年前 | |
Report an error if sk_Caps is used as an SkSL expression. The fuzzer discovered that sk_Caps could exist in a completed program if it were part of a sequence-expression having side effects. Since sk_Caps is not a real structure and doesn't have an lvalue representation, this caused the SPIR-V code generator to assert. This could possibly could have generated bad code in other backends as well. Bug: oss-fuzz:68347 Change-Id: I8bbd60878a78665dd87625fe9b3bc45b464bd2eb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/847196 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 2 年前 | |
Remove unnecessary virtual from method. No Expression overrides Type, nor should any. Change-Id: Ieec50442f0190282b4ff2cb59d4969d4414a5673 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/847596 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Add new 'Statement' level for operator precedence. kTopLevel has been renamed to kExpression because it is no longer considered the top level of precedence. WGSL provides assignments as free-standing statements, not as nestable expressions. When emitting expressions, we need to be able to distingush "statement" level (the top level of an ExpressionStatement) from "expression" level (an expression embedded in any part of a statement). We need this information in order to hoist assignment-expressions properly. This change also happens to slightly improve our generated code when a statement contains a comma-sequence; we no longer add unnecessary parentheses. Bug: skia:14082 Change-Id: If5895649dcc1758cf92ec355f2fd70fb263fff8a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/700676 Commit-Queue: Arman Uguray <armansito@google.com> Reviewed-by: Arman Uguray <armansito@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 3 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Restructure Extension processing. Previously, all error handling was done in the Parser directly, and DSLCore was used to create the Extension object. Now, the Parser parses the extension information and hands it off to Extension::Convert for error handling. DSLCore is no longer involved. This happens to improve error reporting slightly; the UnsupportedExtension test no longer reports the rest of the extension line as unrecognized SkSL tokens. Change-Id: I8a124574c3bb9e183ce00b21695266e9a0f8087c Bug: skia:13821 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/696576 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Move SkSLDefines to src/sksl/ It has no more uses in include/ Change-Id: Iefdf22e5b88625c84c1305a24184503e96561a98 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/753497 Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove ThreadContext::SymbolTable. The symbol table is now available directly from the SkSL::Context. We don't need a dedicated accessor for it anymore (and can avoid a trip into thread-local storage). We can also avoid passing a reference to the current symbol table to functions that already accept a Context. Change-Id: Ic58794f8c29afd8d6eb994ce411ffacbfbb7a68b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/693258 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Arman Uguray <armansito@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 3 年前 | |
Clean up Modifiers, DSLModifiers and ModifierFlags. ModifierFlags have been moved out to a dedicated separate header. Modifiers replaces the old DSLModifiers; it's a simple class holding a position, a layout, and modifier flags. It's used by the Parser and most Convert functions to pass modifiers around. DSLModifiers is now redundant and has been removed. Change-Id: Ib64893fad182b72656eed3da8cc78ce18e64856c Bug: b/40045537 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/732857 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Arman Uguray <armansito@google.com> Commit-Queue: Arman Uguray <armansito@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 2 年前 | |
Hoist variables properly when rewriting for-loop initializers. When for loops contain multiple initializers, we rewrite them, migrating the initializer statements out of the for-statement and wrapping the statement in an enclosing braced block: { init-stmt; for (; test=expr; next-expr) { ... } } Previously, we did not actually create a symbol table for this braced block; we just stole the for-statement's symbol table. We now properly hoist the symbols associated with the variables that we moved into the newly-created braced-block's symbol table. Change-Id: I46445a2c203ee1d64c9e58877601743bb5bfca5d Bug: b/320478438 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/801977 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Switch to unique_ptr<> for SymbolTable management. Previously, it was unclear who was ultimately responsible for ownership of a symbol table. Now, symbol tables are owned by the IR node which made them. We have one global scope, and additional scopes can be created by a Block, Switch, or For. Change-Id: Ifce8a7ad7e752cc409487767e3c059357a55ec27 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/800220 Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Rework stable function calls. Trying to use magic offset values ended up causing issues in other parts of the code, which rightly assume that positions are bounded within the program text. Now we have a stable pointer, which always tracks this except in cases of clone where it preserves the cloned call's value. This is simpler and more directly maps to the problem I am trying to solve. Bug: b/328051548 Change-Id: I5606959dafd8e0d1dfe81e935a0fa2cc53f611f2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/883096 Commit-Queue: Nathan Sanchez <nathanasanchez@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Nathan Sanchez <nathanasanchez@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 1 年前 | |
Rework stable function calls. Trying to use magic offset values ended up causing issues in other parts of the code, which rightly assume that positions are bounded within the program text. Now we have a stable pointer, which always tracks this except in cases of clone where it preserves the cloned call's value. This is simpler and more directly maps to the problem I am trying to solve. Bug: b/328051548 Change-Id: I5606959dafd8e0d1dfe81e935a0fa2cc53f611f2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/883096 Commit-Queue: Nathan Sanchez <nathanasanchez@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Nathan Sanchez <nathanasanchez@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 1 年前 | |
[graphite] Remove placeholder ES2 shader modules Change-Id: I2ec9b27450e1c42054d38c9167a4ab81e5f3c62b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/996117 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: James Godfrey-Kittle <jamesgk@google.com> | 1 年前 | |
Track the originating ModuleType in FunctionDeclaration. In practice, most callers don't need to know the exact Module and are content to differentiate between "program" and "module" code. However, the pipeline-stage code generator actually does need to know, because it shouldn't emit copies of functions from sksl_shared (those will be visible in all programs) but _should_ emit copies of functions from sksl_rt_shader, since that module is not visible from the GPU side. Bug: b/328051548 Change-Id: I2b4e7f38171be52b6ae67529e3c357a01512a8f5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/882436 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Fix fuzzer-discovered issue with duplicate functions. We can't use the position from a different function, since it might come from a different module entirely. This can also assert if the position is off the end of the main program's code. Bug: oss-fuzz:70834 Change-Id: I44faf50bb21cb44d2af7718b83647e12bdddb480 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/885057 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 1 年前 | |
Remove fBuiltin member from FunctionDefinition. Every caller passed false, and isBuiltin() was never called. Change-Id: Ie3719e0d0416ec69d919cc8e7eb2eddb1890670c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/882057 Reviewed-by: Nicolette Prevost <nicolettep@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 1 年前 | |
Remove fBuiltin member from FunctionPrototype. This was not used anywhere. Change-Id: I4d58cbd3b8a8592643ea643295b40d2d194c174f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/881999 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Nicolette Prevost <nicolettep@google.com> Commit-Queue: Nicolette Prevost <nicolettep@google.com> | 1 年前 | |
Minor fixes for buffet build Certain toolchains compile headers independently, and thus noticed some missing #includes. This also removes the default_malloc_impl module, as that gives linking errors in some environments because a symbol is potentially missing depending on link order. See also http://cl/572301023 Bug: b/40045064 Bug: b/237076898 Change-Id: Ia0a3f32bdab9bc92d09eddd3e5dc7c190cb5caf3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/765357 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> | 2 年前 | |
[SkSL] Remove loadFloatBuffer intrinsic There is no longer a use-case for this intrinsic function since we can now pass unsized arrays as parameters in all Graphite backends using storage buffers. Change-Id: I7014562ae7f03c4ab0b6df56095e3e64747a0b86 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/883536 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Nathan Sanchez <nathanasanchez@google.com> | 1 年前 | |
Add an EmptyExpression IR element to SkSL. When the inliner replaces a void-typed function call, it needs to replace the expression with _something_. Since there's no such thing as a void-typed value in GLSL, we didn't have an existing IR node that we could use here, so SkSL arbitrarily inserted a false node since it seemed safe. However, in this test case, there is an outer void-typed comma-expression; it does not get a chance to re-evaluate its type after the inliner replaces its void-typed RHS value with a bool-typed value, and still considers itself to be void-typed, despite evaluating to a value (false). RP would get confused when emitting expressions because the outer comma-expression's type (void: zero slots) mismatched its actual pushed slot-count (false: one slot). RP would push the false (+1 slot) but pop nothing because of the void-typed outer expression, unbalancing the stack. We now have a dedicated EmptyExpression which we can use as a replacement expression for the inliner. It has zero slots. Bug: oss-fuzz:61195 Change-Id: Idd238e52ad644911ea58d8d43d6dffcb8f365b68 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/736716 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Pass Context to SymbolTable::clone() and addArrayDimension(). The context is necessary because it contains the ProgramConfig; the config tells us whether we are currently compiling a module or a program. Bug: b/320462028 Change-Id: I5b835753f128a347949f8586ca88c2bb3b985629 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/805496 Reviewed-by: Arman Uguray <armansito@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Arman Uguray <armansito@google.com> | 2 年前 | |
Remove ThreadContext::SymbolTable. The symbol table is now available directly from the SkSL::Context. We don't need a dedicated accessor for it anymore (and can avoid a trip into thread-local storage). We can also avoid passing a reference to the current symbol table to functions that already accept a Context. Change-Id: Ic58794f8c29afd8d6eb994ce411ffacbfbb7a68b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/693258 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Arman Uguray <armansito@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 3 年前 | |
Pass Context to SymbolTable::clone() and addArrayDimension(). The context is necessary because it contains the ProgramConfig; the config tells us whether we are currently compiling a module or a program. Bug: b/320462028 Change-Id: I5b835753f128a347949f8586ca88c2bb3b985629 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/805496 Reviewed-by: Arman Uguray <armansito@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Arman Uguray <armansito@google.com> | 2 年前 | |
Remove InterfaceBlock::typeOwner(). This turns out to be unused. I'm not sure, but my hunch is that it was originally added as a safeguard to ensure the the SymbolTable associated with the InterfaceBlock's type would not get deleted ahead of time. Since InterfaceBlocks are always created at the top level of a program, it seems like this should be safe either way. Change-Id: I37460414998f9767d6dbfbf49cf4e23994cfdd31 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/799937 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Enforce backend flags on push_constant layout. Just cleaning up an old TODO. Bug: b/40045103 Change-Id: Ia505b60d1e478cea7fc206569b6f8d97f1f8b3ba Reviewed-on: https://skia-review.googlesource.com/c/skia/+/750440 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Arman Uguray <armansito@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Add c++98-compat-extra-semi warning Note that I had to disable the warning in VulkanMemoryAllocatorWrapper.h and VkTestMemoryAllocator.h due to complaints in vk_mem_alloc.h. Bug: b/448789662 Change-Id: Ib300ef12b24a9500091f5d96f3f9eccaa49ead53 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1073036 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> | 8 个月前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Move SkSLDefines to src/sksl/ It has no more uses in include/ Change-Id: Iefdf22e5b88625c84c1305a24184503e96561a98 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/753497 Commit-Queue: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: John Stiles <johnstiles@google.com> | 2 年前 | |
Minor fixes for buffet build Certain toolchains compile headers independently, and thus noticed some missing #includes. This also removes the default_malloc_impl module, as that gives linking errors in some environments because a symbol is potentially missing depending on link order. See also http://cl/572301023 Bug: b/40045064 Bug: b/237076898 Change-Id: Ia0a3f32bdab9bc92d09eddd3e5dc7c190cb5caf3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/765357 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> | 2 年前 | |
Add new modifier pixel_local to SkSL. At this CL, the lexer and parser have been updated to support the new keyword, but the modifier is not allowed in any context. Bug: b/299504320 Change-Id: I754f2a6e82726d0969a174e62d2d1d9eedcd9100 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/754016 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> | 2 年前 | |
Add c++98-compat-extra-semi warning Note that I had to disable the warning in VulkanMemoryAllocatorWrapper.h and VkTestMemoryAllocator.h due to complaints in vk_mem_alloc.h. Bug: b/448789662 Change-Id: Ib300ef12b24a9500091f5d96f3f9eccaa49ead53 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1073036 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> | 8 个月前 | |
Clean up Modifiers, DSLModifiers and ModifierFlags. ModifierFlags have been moved out to a dedicated separate header. Modifiers replaces the old DSLModifiers; it's a simple class holding a position, a layout, and modifier flags. It's used by the Parser and most Convert functions to pass modifiers around. DSLModifiers is now redundant and has been removed. Change-Id: Ib64893fad182b72656eed3da8cc78ce18e64856c Bug: b/40045537 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/732857 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Arman Uguray <armansito@google.com> Commit-Queue: Arman Uguray <armansito@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 2 年前 | |
Reject local-size qualifier of zero. A zero-sized group on any axis would mean no work can be done. Bug: b/299116275 Change-Id: Ib020fcf86bc8060bea885d25ad3ec41092d2094e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/751837 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Arman Uguray <armansito@google.com> Reviewed-by: Arman Uguray <armansito@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Add #ifdef guards to headers to avoid double-declarations Some of these had been working due to not declaring classes (only forward-declaring types/functions), but some were working due to luck (only one place #included them?). To find these, I wrote a small python script which did if "#ifndef" not in contents: and that caught all infractions (and a few false-positives). There are a few non-trivial changes that I noticed while doing this: - missing SK_API in GrGLMakeGLXInterface.h (probably working because Chrome's not using this yet) - no #def guard in GrDriverBugWorkaroundsAutogen (see also tools/build_workaround_header.py) Change-Id: I8834e6343e89ca957e61e8436742221ef3d3e017 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/815099 Owners-Override: Kevin Lubick <kjlubick@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Reviewed-by: Nicolette Prevost <nicolettep@google.com> | 2 年前 | |
Allow pre/post-increment on vectors and matrices. This is explicitly required by the GLSL expression rules (5.9): > The arithmetic unary operators negate (-), post-and pre-increment > and decrement (-- and ++) operate on integer or floating-point > values (including vectors and matrices). This CL allows vector and matrix types in the frontend, and adds tests. Backend support has been added in earlier CLs. Bug: b/40045109 Change-Id: I0d4a817eece833234abe1369ec146922a5adb0f6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/845301 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Add support for ++/-- postfix expressions in WGSL. The logic used here is very similar to prefix expressions, but we also need to copy the value into a temp variable before it is incremented in order to get postfix semantics. Bug: skia:14082, skia:14029 Change-Id: I26f74697e473a4eea01671d8c9029af8f4073ff8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/705017 Reviewed-by: Arman Uguray <armansito@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 3 年前 | |
Allow pre/post-increment on vectors and matrices. This is explicitly required by the GLSL expression rules (5.9): > The arithmetic unary operators negate (-), post-and pre-increment > and decrement (-- and ++) operate on integer or floating-point > values (including vectors and matrices). This CL allows vector and matrix types in the frontend, and adds tests. Backend support has been added in earlier CLs. Bug: b/40045109 Change-Id: I0d4a817eece833234abe1369ec146922a5adb0f6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/845301 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
Switch to unique_ptr<> for SymbolTable management. Previously, it was unclear who was ultimately responsible for ownership of a symbol table. Now, symbol tables are owned by the IR node which made them. We have one global scope, and additional scopes can be created by a Block, Switch, or For. Change-Id: Ifce8a7ad7e752cc409487767e3c059357a55ec27 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/800220 Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Switch to unique_ptr<> for SymbolTable management. Previously, it was unclear who was ultimately responsible for ownership of a symbol table. Now, symbol tables are owned by the IR node which made them. We have one global scope, and additional scopes can be created by a Block, Switch, or For. Change-Id: Ifce8a7ad7e752cc409487767e3c059357a55ec27 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/800220 Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Allow sk_Caps in private runtime effects. Note that SkRP does not actually implement the Setting expression so SkRP will still fail to render them, but that's not a concern yet. Going forward, if we want them to work with SkRP, we can add them on an as-needed basis. Change-Id: I102015d58625e706e8cc184cc1dc3e3c7c2a0c95 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/814797 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Ignore ShaderCaps from Setting::Make. Setting::Make now always generates a Setting node and never bakes in the value of the currently-active caps. This is the last place where the SkSL front-end accessed shader caps. In practice, we didn't have any real-world code which used this path anyway. sk_Caps is always used from module code, which is compiled with ShaderCaps set to null. I wasn't able to find any non-module shader code in Skia which accessed sk_Caps. Bug: b/316916102 Change-Id: I1b3f2da67f5a9e7a69a9797480bdb906c73e56bf Reviewed-on: https://skia-review.googlesource.com/c/skia/+/791496 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Report duplicate-symbol errors without ThreadContext::ReportError. The Parser's symbol-adding code now has two paths: - add/addWithoutOwnership takes a Context& - addOrDie/addWithoutOwnershipOrDie will abort on failure We use the former calls in most places, and the latter calls in cases where we expect failure is impossible (root symbol table creation, adding array dimensions). This should fix for the root-cause of the crash in oss-fuzz:65538. Change-Id: I8a4d3fd46ee443a43af73c303e7d8cd2fa2f33e9 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796557 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Add a PipelineUtils flag to print post-compilation SkSL. This lets us see a program after it has been passed through the SkSL front-end, but before it's been processed by a backend into native code. Functions from modules will be included, and the code will reflect inlining and optimizations. This gives us a view of the "finished" SkSL before it is translated into its final form (GLSL/Metal/WGSL) by the backend. I didn't add an associated #define since I generally don't set these flags via GN (I turn them on as needed, then turn them back off when I'm done), but I could be convinced to add a #define if there is interest. Change-Id: I5a5637b9a7667efa5c19652b492a8312c0d60f61 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/797819 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Remove clone() from Statement and ProgramElements. As it turned out, this code only existed to be tested. We do clone Expressions extensively, but there really isn't a pressing need to clone a Statement or ProgramElement in its entirety. Change-Id: I3f2d618de60f74785a4ecd7d7a424d319e1b0016 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/796857 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Replace bug ids with mapped ids in the new issue tracker Bug references of the form: skia:NNNN crbug.com/skia/NNNN https://crbug.com/skia/NNNN http://skbug.com/NNNN skbug.com/NNNN skbug:NNNN are replaced with skbug.com/MMMMMMMM where NNNN maps to MMMMMMMM in the new issue tracker. Change-Id: Ifdc83c39e95e369135e1daa4ebb157977fecb36f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1002016 Auto-Submit: Shahbaz Youssefi <syoussefi@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brett Somocurcio <brettos@google.com> | 1 年前 | |
Use a Block to hold the body of a switch statement. Conceptually, the body of a switch statement is a braced block with the restriction that it must contain switch-cases. This simplifies some code that deals with blocks and symbol table scopes. Change-Id: Ib3948d2133a3e5c82cdc67366952fee44f82918d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/801837 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 2 年前 | |
Use swizzles to save space during code minification. We can replace half2(foo) with foo.xx, or even float4(5) with 5..xxxx. These swizzles will be converted back into constructors when the minified code is loaded. Change-Id: If2534eadebeab84cc4db4a6e3a2337da2adaeeba Reviewed-on: https://skia-review.googlesource.com/c/skia/+/881480 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 1 年前 | |
Use swizzles to save space during code minification. We can replace half2(foo) with foo.xx, or even float4(5) with 5..xxxx. These swizzles will be converted back into constructors when the minified code is loaded. Change-Id: If2534eadebeab84cc4db4a6e3a2337da2adaeeba Reviewed-on: https://skia-review.googlesource.com/c/skia/+/881480 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 1 年前 | |
Split SymbolTable::instantiateSymbolRef in half. We can now instantiate a Symbol by way of Symbol::instantiate. SymbolTable::instantiateSymbolRef now does a symbol lookup and calls into Symbol::instantiate. This allows for easy instantiation of an already-found symbol. Change-Id: I75ad5c94acfb2d65f62ba84f12175783ab28e874 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/795936 Reviewed-by: Jorge Betancourt <jmbetancourt@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com> | 2 年前 | |
Split SymbolTable::instantiateSymbolRef in half. We can now instantiate a Symbol by way of Symbol::instantiate. SymbolTable::instantiateSymbolRef now does a symbol lookup and calls into Symbol::instantiate. This allows for easy instantiation of an already-found symbol. Change-Id: I75ad5c94acfb2d65f62ba84f12175783ab28e874 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/795936 Reviewed-by: Jorge Betancourt <jmbetancourt@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com> | 2 年前 | |
Fix fuzzer-discovered issue with duplicate array types. The fuzzer attempted to create two array types with the same name but different base types. This triggered an assertion when performing error-checking on the variable declaration. Bug: oss-fuzz:70643 Change-Id: I361cbabc5ef4d4dcccc682415a0867761ff78583 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/884177 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Nathan Sanchez <nathanasanchez@google.com> Commit-Queue: Nathan Sanchez <nathanasanchez@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 1 年前 | |
Pass Context to SymbolTable::clone() and addArrayDimension(). The context is necessary because it contains the ProgramConfig; the config tells us whether we are currently compiling a module or a program. Bug: b/320462028 Change-Id: I5b835753f128a347949f8586ca88c2bb3b985629 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/805496 Reviewed-by: Arman Uguray <armansito@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Arman Uguray <armansito@google.com> | 2 年前 | |
Optimize 'expr ? 1 : 0' into 'cast(expr)'. This improves code generation in SkRP and SPIR-V for some forms of ternary. This does add a bit of complexity, since it involves using our $intLiteral and $floatLiteral types in a new way. Change-Id: Ia688685477a5d3a22e541f45d12f9f814ef59f3c Bug: b/40045456 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/755938 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 2 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
[SkSL] Add check for unsized array in checkForOutOfRangeLiteral This fixes a fuzzer bug that created unsized array variable references and then triggered the switch variable-hoisting code. Within the variable-hoisting we assert that arrays have size when getting the slotCount. This CL makes it so that before trying to get slotCount, we simply check if the array is unsized. This is preferable to not emitting unsized arrays to IR nodes, which can add more errors to the error reporter down the line. Bug: 388312952 Change-Id: I0977c635a842ae32e368a0ad79ff4a4dac3bc01a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/942956 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Daniel Dilan <danieldilan@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Enable C++20 for some Bazel builds (skslc) In particular, our sksl compiler uses Dawn for validating output and that now uses C++20. https://skia-review.googlesource.com/c/skia/+/985223 This uses Bazel "features" [1] [2] to make c++ be turned on or off via the command line. [1] https://bazel.build/docs/cc-toolchain-config-reference#features [2] https://github.com/bazelbuild/rules_cc/blob/main/cc/cc_toolchain_config_lib.bzl Change-Id: I1ecaa64e56c71fa01488e630242d8a0486ee47ce Bug: b/311238827 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/985516 Reviewed-by: Jorge Betancourt <jmbetancourt@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Keep track of the current ModuleType as it is being compiled. Previously, we knew whether or not a module was being compiled (via fIsBuiltinCode), but not _which_ module. Since we have a ModuleType enum now, it makes sense to actually keep it in the ProgramConfig instead of just a boolean. Change-Id: Iedf31a9f3003a40367eb1eca1070b7dc2e782fb1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/879936 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 1 年前 | |
Move verify_type into TypeReference. This is one of the few remaining pieces of functionality that DSLType offers. Moving it out will make it easier to replace DSLType with plain SkSL::Type. Change-Id: I81acf0e88a85b3fee6852ac4ca4d86d797026464 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/733525 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Keep track of the current ModuleType as it is being compiled. Previously, we knew whether or not a module was being compiled (via fIsBuiltinCode), but not _which_ module. Since we have a ModuleType enum now, it makes sense to actually keep it in the ProgramConfig instead of just a boolean. Change-Id: Iedf31a9f3003a40367eb1eca1070b7dc2e782fb1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/879936 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 1 年前 | |
Remove unused 'fIsClone' from VarDeclaration. We no longer support clone() on statements at all, as of http://review.skia.org/796857. Change-Id: I9dc38e9388f36054dcaca811e44b7258a106b3a9 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/881757 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Nicolette Prevost <nicolettep@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Nicolette Prevost <nicolettep@google.com> | 1 年前 | |
[SkSL][Metal] Add unsized array parameter support in Metal As part of enabling unsized array parameters in SkSL, this CL removes some of the checks in the IR frontend and implements the proper type for pointers in Metal. To ensure this is the correct syntax and works in practice, I locally tested the array parameter in a graphite shader module and ran a gm that uses that array and things worked as expected. Bug: b/343510513 Change-Id: I5168fa772f292e7d0acb548b1e72dfc3467010f4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/879259 Reviewed-by: John Stiles <johnstiles@google.com> | 1 年前 | |
Fix inlining of calls with unused inout params. Previously, we would fail to create a scratch variable because of the unexpected out modifier flag. In practice, it's safe to ignore this, and it's necessary to create a scratch variable to preserve the argument if it has side-effects that must be preserved. (In the final output, the variable is actually optimized away, because it was never read from or written to, but the side effect is preserved, and that is the important part.) Bug: oss-fuzz:63170 Change-Id: I953e45eb28545ff94e20e91e6c4eb699c0a9c3bf Reviewed-on: https://skia-review.googlesource.com/c/skia/+/765397 Reviewed-by: Arman Uguray <armansito@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 2 年前 | |
Reland "Move is<T> and as<T> logic into IRNode." This reverts commit da8302ed84dd7a17f053e0b3a730630e69a875b2. Reason for revert: add cast to placate GCC Original change's description: > Revert "Move is<T> and as<T> logic into IRNode." > > This reverts commit c7de283e2a252b782793dd5c00d44de62012ccb6. > > Reason for revert: red on tree > > Original change's description: > > Move is<T> and as<T> logic into IRNode. > > > > Previously, we repeated this logic in four places because the Kind > > enums lived inside the IRNode subtypes. Moving the Kind enums into > > IRNode is fine, and lets us centralize these helpers in one place. > > It also unlocks the ability to work directly with IRNodes, i.e. > > myIRNode->is<ReturnStatement>() is now supported. > > > > Change-Id: I2f65c80686358b50516e8a40834e8760c796154d > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/590539 > > Reviewed-by: Arman Uguray <armansito@google.com> > > Commit-Queue: John Stiles <johnstiles@google.com> > > Change-Id: Iced264f5a62f2421e814f027f71586d685885cf9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/590745 > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Auto-Submit: John Stiles <johnstiles@google.com> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Change-Id: I1771155da59d6d69afa334b3d7975cb6fcd13661 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/590856 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> | 3 年前 | |
Move DSL and most private SkSL headers out of include/. We aren't supporting DSL as public API, so its headers have moved back into src/sksl/. Most SkSL references in include/private/ were in support of DSL, so these have been moved back into src/sksl/ as well. Change-Id: I9b7f965f9e77fb6e24de388d79db82c56b51bad3 Bug: skia:14183 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/671958 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 7 个月前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 |