ee40ec6dd6
pack(x,y,bits) as an alias for x|(y<<bits) only existed originally to implement it with the SLI arm64 instruction, but I've since realized that was misguided. I had thought the assumption on pack ("(x & (y << bits)) == 0"), i.e. "no overlap between x and the shifted y", was enough to make using SLI legal, but it's actually not strong enough a requirement. The SLI docs say "...inserts the result into the corresponding vector element in the destination SIMD&FP register such that the new zero bits created by the shift are not inserted but retain their existing value." The key thing not mentioned there happens with zero bits _not_ created by the shift, the ones already present at the top of y. They're of course inserted, overwriting any previous values. This means SLI (and so pack()) become strictly order dependent in a way I had never intended. This will work as you'd think, skvm::I32 px = splat(0); px = pack(px, r, 0); px = pack(px, a, 24); but this version swapping the two calls to pack() will overwrite alpha, skvm::I32 px = splat(0); px = pack(px, a, 24); px = pack(px, r, 0); I find that error-prone, so I've removed Op::pack and replaced it with a simple expansion to x|(y<<bits). That of course works in either order. This new test can't JIT at head, but if we implement the other missing instructions (soon, dependent CL) it would start failing when JIT'd. The interpreter and x86 were both fine, since they're both doing what's now the only approach to pack(), the simple x|(y<<bits). I've left assembler support for SLI in case we want to try it again. Change-Id: Iaf879309d3e1d0a458a688f3a62556e55ab05e23 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337197 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@google.com> |
||
---|---|---|
.. | ||
android_fonts | ||
diff_canvas_traces | ||
empty_images | ||
fonts | ||
icc_profiles | ||
images | ||
invalid_images | ||
nima | ||
particles | ||
skottie | ||
text | ||
Cowboy.svg | ||
crbug769134.fil | ||
nov-talk-sequence.txt | ||
pdf_command_stream.txt | ||
README | ||
SkVMTest.expected |
The resources directory includes some third party content used by Skia. Licenses for that code are included in this file. Openclipart Openclipart uses the Creative Commons Zero 1.0 Public Domain License every time an artist uploads a piece of clipart to Openclipart to make it clear the artist is releasing the creative work for anyone to use for any reason, even commercially. This act of "sharing" is the foundation Openclipart is based upon. More details on the license can be found at https://creativecommons.org/publicdomain/zero/1.0/. LGPL or compatible (as implied by inclusion in KDE SVN) http://websvn.kde.org/trunk/tests/ksvgtests/custom/cowboy.svg