Change-Id: I3dc5e5be1cf12c581cce3854d0db7e73db6e1fd9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216681
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
The linear algebra cases are more complex, coming in separate CL.
Change-Id: I5bbc25a126b61eee6f5b9775ab142e103c00f837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216612
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Need to compare all elements, then fold the result to a single bool.
Change-Id: I0ebfaa9d518f29a782701246ada247cb55c01c2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216607
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Per GLSL, constructing a matrix from a scalar produces a matrix
with the scalar value along the diagonal, and zero elsewhere.
Constructing a matrix from another matrix copies the overlapping
values, and fills in the remainder with the identity matrix.
Doing either of these with existing opcodes was going to be quite
verbose and tricky, so I just made new opcodes.
I've also got some (currently disabled) test cases for other
matrix behavior, all of which fail in various ways today.
Change-Id: Ia86a183395f1ac7e2f23ee1d6bb4af461f5ba93a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215823
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: Ic6c16f363c5f2aedaf1aee9b3b8ee23e37ea24e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215448
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Field access and array indexing are supported, including
dynamic indices. Larger types (> 4 slots) can be used as
lvalues, rvalues, etc.
Change-Id: I9bb4ed850be4259c05c8952c6c0a17b71f813772
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214443
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
We were never replicating scalar values when constructing vector types
from a single argument.
Change-Id: I5bdeeb91f5a10c151b18561de6c275f2db2898fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215526
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I418fb05444f9c1ee076ace41a24072c4a5e7ef6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214691
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:
Change-Id: Ie8c873bf7fc795567ad812f56c37bee4c06213bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214307
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Change-Id: I072f5d72f64eb683cc90c2890313ee289487cff3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214403
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Change-Id: I0e6e8205998f3058cb59e279704e23989bccc66b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214192
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: If05661224d4a53e1854180d9b280ebb7a7ac2793
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214191
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Avoids the need for a PushImmediate (which usually also required
a Nop for alignment) on every load/store. And it makes the codegen
for local vs. global identical, which simplifies the byte-code
generator in a few spots.
This means that places previously using DupDown now need something that
dupes the *top* N elements of the stack. Just use Vector + Dup, and
remove the (now unused) DupDown instruction.
Also add/implement kStoreSwizzleGlobal, which was the last missing
load/store op (and add a test case).
Change-Id: Id450272c11f4f1842c9d57bc5114e7f81e9e926e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214062
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I1806e1f6abaef322ecd3ba0d9bfaa9d7ca7a44c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212983
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Also has swizzled loads of globals. Swizzle stores are still broken.
Change-Id: I0c01a309592c0aa460e1459de2636a2e1ef2ee6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213830
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Id009aa32faa40e9847dcf3668f1fd15e8b95dc56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213134
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Also add a test of all three conversions (scalar & vector).
Change-Id: I1671e992760ad538304d2602e37cd9792a49e9cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213660
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I0cf8e12d5ddb9b89aff39f484d8a017f61e4a20f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213465
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Allows updating the global inputs of a cached Interpreter object.
Change-Id: I626e63294a441a7f52ae484755c99f5d04bb614f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212980
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I267c99c8c36b1d39abe9cf196996db43edb2b839
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212721
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I76ff729a887948119ec1ef58221433a6d91e98a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212484
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Not quite feature complete yet, but at a point where it's worth checking
in.
Bug: skia:
Change-Id: I21141d30e8582a79e94450d84e56bacc067249e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201685
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>