N=15 and N=63 make for nice even looking profiles
on ARM and x86 respectively, with N=15 running 3
body loops and 3 tail loops on ARM, N=63 running
7 body loops and 7 tail loops on x86.
Change-Id: Ie7616bd99c949328bbb7d7048fc6f468ff1e3ad2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227220
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I had been setting the REX R bit to select high registers,
but you actually set the B bit. Don't know how I got that
wrong before... the leading byte should be 49 not 4c.
$ cat test.s
foo:
addq $7, %r8
$ clang -c test.s && objdump -d test.o
0000000000000000 <foo>:
0: 49 83 c0 07 add $0x7,%r8
Change-Id: I039e1c4f4ea20523a1e2cc9bcf5f6d9321a6223b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227177
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 8c5c54ceaf.
Reason for revert: bad ANGLE diffs, Chrome roll failing
Original change's description:
> Use saveLayer-determined CT in SkGpuDevice::onCreateDevice
>
> Currently Ganesh always uses the prev render target CT, but saveLayer
> may force a different CT, depending on flags.
>
> This fixes handling of saveLayer/kF16ColorType (added in
> https://skia-review.googlesource.com/c/skia/+/227066).
>
> Change-Id: I8e73fdfdf18eb61f97fadd0504a4bd0f4a71977d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227258
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
TBR=bsalomon@google.com,fmalita@chromium.org
Change-Id: I0c3e74be64d5286b8d95b2aabaa464ad97fcaccf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227262
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Currently Ganesh always uses the prev render target CT, but saveLayer
may force a different CT, depending on flags.
This fixes handling of saveLayer/kF16ColorType (added in
https://skia-review.googlesource.com/c/skia/+/227066).
Change-Id: I8e73fdfdf18eb61f97fadd0504a4bd0f4a71977d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227258
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
https://crrev.com/d3af69947ef036f4db7f78a7e7cb8e5295daf6bd Add failure status on timeouts (debrian@google.com)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I1092d28a32e1d3e11d8ec0a99af2676bac3f8d16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227227
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
https://crrev.com/10e07dd38b9eb13711f12930ab0fc0ba35f6cea2 [depot_tools] Add new tryjob failure types TEST_TIMEOUT and TEST_EXPIRED. (estaab@google.com)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I67e8212ac0e33d0d10f865934a252a588acb9776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227257
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
* Also use DISPLAY=:0 for non-headless chrome via puppeeteer.
* Output gpu-gl-renderer, gpu-driver, gpu-gl-vendor from the trace file. Will be useful for debugging.
NoTry: true
Bug: skia:9237
Change-Id: Ieb70dbe540aeca89e88dbaeace3cdba1b50eb7ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227156
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
If flag is true then run with headless=false and:
* --ignore-gpu-blacklist
* --enable-gpu-rasterization
NoTry: true
Bug: skia:9237
Change-Id: I8c3c40ee34fe3d3e92b41185c30afb91459a3f5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227060
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Add a tail loop to handle elements one at a time.
Just like in the interpreter, the only instructions
that need to be changed are the loads and stores,
16 byte -> 4 byte and 4 byte -> 1 byte.
With this we can mark the interpreter as SkUNREACHABLE,
and it even completely compiles away, saving a few KB.
Example profile for the SkVMTool float-squaring program
running N=15 over and over:
Samples│
│ skvm-jit-3663518994():
42 │40: cmp x0, #0x4
│44: ↓ b.lt 60
51 │48: ldr q0, [x1]
197 │4c: mul v0.4s, v0.4s, v0.4s
135 │50: str q0, [x1]
│54: add x1, x1, #0x10
43 │58: sub x0, x0, #0x4
│5c: b.al 40
150 │60: ↓ cbz x0, 7c
67 │64: ldr s0, [x1]
130 │68: mul v0.4s, v0.4s, v0.4s
135 │6c: str s0, [x1]
18 │70: add x1, x1, #0x4
17 │74: sub x0, x0, #0x1
20 │78: b.al 60
124 │7c: ← ret
Change-Id: I153d7bc247942366a686e30a9cad60c935f754ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227138
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
We're currently running with Puppeteer defaults (800x600), which
doesn't match our animation size.
- set the Puppeteer viewport to 1000x1000
- set the browser window size to the same
The latter is mostly useful for manual/non-headless runs.
Change-Id: Icce975ae89fc9375fdf7d8c458abf7223e844c82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227057
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
These didn't work correctly, and they're extremely tricky to get right
in the vectorized execution model (vs. structured control flow). As a
side effect, determine the maximum stack depth used for the execution
masking - the same idea will be used for the primary stack in a later
CL. Add a unit test to verify the new restriction, and fix two places
that were relying on this feature before.
In addition, boolean external values need to be masks. I may implement
this in the code-gen at some point, but this is already a fringe
feature, so just fix the one unit test for now.
Change-Id: I9607ffaf67c7795dbf42e4009180aea8f3e65c44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226849
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This turned out to be quite an easy transformation
with yesterday's work already done. No codegen changes.
Change-Id: Ife19ab7731514c54cfed963a6d2e9b1ec2246997
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227137
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Found with a GCC compiler warning.
Seems like a sane idea to keep Slots fully initialized.
Change-Id: I7a7bd4ccc4a6800d6e262aa7c616d3cab36d74dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227121
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
gm, slides, and samples no longer need to know about the implementation
details of AnimTimer.
This
virtual bool onAnimate(const AnimTimer&);
becomes this:
virtual bool onAnimate(double /*nanoseconds*/);
which is much easier to reason about.
AnimTimer itself is now part of viewer.
Change-Id: Ib70bf7a0798b1991f25204ae84f70463cdbeb358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226838
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Also rename from GrGLSizedInternalFormat since the compressed formats
aren't really sized internal formats.
Change-Id: I8744f1f4b8156300ab69d89066b44913bce120a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226956
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Found by a GCC warning that
fPhase = that.fPhase; // line 193
was sometimes copying over uninitialized data.
Seems pretty harmless to initialize.
Change-Id: I9011ccf965bea4a702e0cca61f89e0aa644c55a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227122
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
https://crrev.com/b9ad522afc7ff805c27a781d405b33e35f542dab [swarming] Fix task stdout/stderr link (joshuaseaton@google.com)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I911a0151c5f40c76bc0d337650869e040c186144
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227032
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
We were checking 'externalType' twice, and never checking
'internalFormat'. We now check each of them once.
Change-Id: Iae0578a4828fd2a9224e4924245bea0708d8c931
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227028
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit aed8009a6d.
Reason for revert: Flutter's version of Wuffs has been updated. See https://github.com/flutter/engine/pull/9466#issuecomment-510639898
Original change's description:
> Revert "Update Wuffs version"
>
> This reverts commit 42ece2b7c9.
>
> Reason for revert: Requiring the latest version of wuffs broke the flutter roll.
>
> Original change's description:
> > Update Wuffs version
> >
> > The primary purpose of this commit is to track upstream Wuffs more
> > closely.
> >
> > A side effect is to pull in the Wuffs commit
> > 5bea867f72
> > "Allow an LZW literal width of 1", which eliminates a difference between
> > the old third_party/gif decoder and the new third_party/wuffs decoder.
> >
> > As the CodecTest.cpp comment says, the GIF spec explicitly says that the
> > LZW literal width should be at least 2, but in practice, GIF encoders
> > violate the spec. After that upstream commit, Wuffs has followed other
> > GIF decoders in being more liberal in what it accepts.
> >
> > Codec_InvalidAnimated therefore no longer has a separate "#ifdef
> > SK_HAS_WUFFS_LIBRARY" section. The first frame of the test's GIF image
> > data, being the required frame of the third frame, no longer has an
> > invalid LZW literal width according to Wuffs.
> >
> > Bug: skia:8235
> > Change-Id: Ie94537f5232128ffc1d1547f4c0b84992e54ab02
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226476
> > Commit-Queue: Leon Scroggins <scroggo@google.com>
> > Reviewed-by: Leon Scroggins <scroggo@google.com>
>
> TBR=scroggo@google.com,nigeltao@google.com
>
> Change-Id: I9e636e81f57eefd836a53738872ddb9f5c9b13c3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8235
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226697
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
TBR=scroggo@google.com,nigeltao@google.com
Change-Id: Ibeeea1cf9c2e210b5e49dec65037ec8a494209de
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8235
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226851
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Nigel Tao <nigeltao@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Support forward references in Label.
In addition to tracking the current Label offset (used for
backward references essentially just the same as before this CL)
we also store a list of instructions that refer to each Label.
When a Label moves, each instruction gets a new displacement.
To make this a little easier, remove the 8-bit jump form on x86...
this way all x86 displacements are 32-bit and and all ARM 19-bit.
For now only cbz() supports this, just to start somewhere.
More to do but it's worth an early design review.
Change-Id: I23d2bcd7742965ab694ae4828f53409cb9fc807f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226937
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Bug: skia:9253
Change-Id: I5055bb492fe10c35a4d593e4256874e872fc831d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227036
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Not consumed by any scripts ATM, but useful for manual trace inspection.
Change-Id: I2b2e2ad227278f6527454628475143294c655835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226976
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ravi Mistry <rmistry@google.com>
The Mac GLContext is designed to not constantly teardown on resizes
and minor DisplayParams changes. However, for MSAA we do have to
tear it down.
Change-Id: I1a9d765068fa5f6b22dff49f6355c29e1affb686
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226850
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Adds a separate resolve texture to GrMtlRenderTarget, which can be used
to do a resolve for the main multisample color texture. The resolve is
handled by setting a special Store action for the RenderCommandEncoder.
Bug: skia:8243
Change-Id: I1ffd756c01a9b363116ffefee2c4c50ba9a3e637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225536
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This enables us to use the same termination checks as for lottie-web.
NoTry: true
Bug: skia:9237
Change-Id: I9d5d0c450196c3800020e12b45868c656cdcc46a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226858
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Also adds the following to the format table:
*base internal format
*sized internal format
*compressed internal format
*the internal format to use with glTexImage
*the external type to use with glTexImage when there is no data to upload
(i.e., no GrColorType for data)
Bug: skia:6718
Change-Id: Ica51a8d4588bd24078c7d61805f6eef9c02ae14d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226558
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
MakeFromBackendTextureAsRenderTarget is planned to be deprecated, so we
should use MakeFromBackendTexture with a sampleCount parameter instead.
On Vulkan, this ran into issues because we assumed an allocation for the
VkImage and the swapchain doesn't provide us with one. Fixed so we don't
need an allocation for Borrowed textures.
Bug: skia:
Change-Id: Ib26888020e093f4a734a4159eae898539c2273b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226839
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Doing this will avoid the unreliable frames at the start (setup related) and at the end (teardown related). Also:
* Increase timeouts in lottie-web-perf.js and skottie-wasm-perf.js since we are looping twice now.
* Fix bug where ret code was 0 if puppeteer test failed.
NoTry: true
Bug: skia:9237
Change-Id: I0933ecb87113b40c162712076c38fb7379b352d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226836
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Change-Id: I231949c90342a44e9c0b6030818139d3164819da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226837
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This adds a bunch of instructions we'll need to handle the N < 4 tail
within the JIT code on ARM.
- ldrb/strb are 1-byte load and stores
- sub subtracts without setting flags
- cmp just sets flags (actually just subs with an xzr destination)
- add b and b.lt, just like b.ne
- cbz and cbnz... we only need cbz but I accidentally did cbnz first
Once I add support for forward jumps, we'll be able to use these
instructions to restructure the loop to
entry:
hoisted setup
loop:
if N < 4, jump tail (cmp N,#4; b.lt tail)
... handle 4 values ...
jump loop (b loop)
tail:
if N == 0, jump end (cbz N, end)
... handle 1 value ...
jump tail (b tail)
end:
ret
Change-Id: I62d2d190f670f758197a25d99dfde13362189993
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226828
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This identifies a possible bug with font serialization (changing the
typeface on line 444 causes the test to fail).
Change-Id: I4e2c9d21cd03586e043b8d82eeff6607bb02b380
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226510
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
We conflate luminance (dot of linear r,g,b) and luma (dot of
gamma-encoded r',g',b') all over the place in Skia. This one is
possibly the most confusing of any of them, in that the dot-product
coefficients for BT.709 luma were somewhat arbitrarily chosen to be the
same as the coefficients for luminance.
So, big old ridiculously new long name to make it clear it works
for both luma and luminance, but that it's hardcoded to BT.709.
My quick reference when I forget things:
https://en.wikipedia.org/wiki/Luma_(video)
Change-Id: I5a6567de296795f558acc5dd3c39974b8035234e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226762
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>