Implement on GPU.
Bug: skia:13036
Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This code also checks for recursion and overly-deep call chains, so it's
useful even in cases where we don't care about the program size.
Change-Id: I7f123d95b3881d8738b84c565d0fc46da778314e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534664
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
This looks like a no-op, because we're just moving flags from cflags_cc
to cflags_objcc, and then removing cflags_cc from the compiler command.
However: GN is very specific about which flags it expects to be used by
the toolchain for each file type. It ONLY emits cflags_cc into ninja
files if there is at least one C++ source file in the target. If we had
a target that only contained .mm source files, cflags_cc would be empty
and the various flags it contains would be missing. Note that ninja
silently leaves undefined variables as empty, making this not obvious.
Bug: skia:13272
Change-Id: I8d729699b1bd34b677ec1b657bc34111fa8db2a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534763
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
SkQP tests can now be annotated in unittests.txt as being only enforced
when the device's first API level is >= the level associated with the test.
This change also ensures that unittests.txt does not contain any out-of-date
test names by aborting if an entry in the file no longer has a matching test
in the test suite.
Bug: b/229804433
Change-Id: I45b2ef5e20e45dadfefbb339b0c65c88c2d6bbf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534666
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
We want to run all the tests even if skslc returns a goofy character.
Change-Id: I0ee96ba28fb63204b69b4e01caa069e9ce7cc93e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534672
Reviewed-by: George Wright <wrightgeorge@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: Ic93f264fb556ecf271f9c2642f7c60665669b092
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534499
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
The geometric method for concave shadows seems to be failing in certain
cases. See: https://github.com/flutter/flutter/issues/84262. I've never
been satisfied with this solution and I've been thinking of removing it. This flag allows for Flutter to disable it for the time being until I
can determine if anyone else is using it.
Change-Id: Ia0a3f57002d94928f2baa655c88dc4d10b9edef8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Use SkSTArray instead of stack/deque for fTextStyles
* Use fParagraphStyle for the base style instead of pushing an extra copy
into fTextStyles
* Call endRunIfNeeded only when starting a new styled block
Change-Id: I5f80c052a7589d8da7e6a797b155884efd5449a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533983
Commit-Queue: Jason Simmons <jsimmons@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
In this CL, cache of previously created scratch texture accepts the
label and passes it to the GrGpuResource by making use of existing
resource.
Bug: chromium:1164111
Change-Id: Id798aa5f3fe9baa00c2f409febf4d5fcbe3a675a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532276
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
We were generating .so files, but expect the outputs to be .dylib
(in places where we dlopen, etc.). Further, the file-type of the
libraries was actually DYLIB, not BUNDLE.
This fixes an issue with ANGLE-on-Mac, where we couldn't find libEGL,
and that (in turn) couldn't find libGLESv2.
Bug: skia:13040
Change-Id: I5eb212b9f19698cf0e0459df8ba70e62e87f5a4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534558
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This just plumbs through a flag that allows snippets to request a
dev2Local matrix uniform and uses it for gradients and the image shader.
Bug: skia:12701
Change-Id: If1eadff8d5e40d81d9e3794db4b7f816127c4b75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529810
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Noticed that this check could move outside the loop while working on
http://review.skia.org/534560, but didn't want to muddle such a
straightforward CL with additional changes.
Change-Id: I84e0e3348a782f4f5d1b451a48fb14bae87aa33d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534561
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: I8de02cd5c8d0e70b2cf1ac2d359507814c984ff6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533806
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
An empty viewPort should always send everything to a point. An empty
viewBox should either draw nothing or fill the viewPort with the color
of a single point of no area.
Change-Id: I0d4f0cea3918acc4edc98043f3a7155e4e171bff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533809
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
In SkDOM the predicate "is currently inside an element" is expressed by
`fLevel > 0`. When starting an element this should be tested before
incrementing fLevel since this is testing if the element being started
is top level or not. When ending an element this should be tested before
decrementing fLevel since when ending an element the parser is currently
inside an element.
Previously the decrement when ending an element occured too soon,
causing flushAttributes to fail a pre-condition assert that it is not
run at top level (without an element present). Fix this by moving the
decrement (which may signal a return to the top level) after the call to
flushAttributes in onEndElement.
Change-Id: I1a45a3dae5a5af97ca3340e56ddc18b9ae94d374
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533808
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
At http://go/skiareview/c/skia/+/400622/55/bench/SkSLBench.cpp#84,
during the initial DSL parser land, Nanobench was updated to construct
a DSLParser directly instead of calling SkSLCompiler::convertProgram.
This skipped over some important compiler setup--specifically, applying
optimization flags and resetting the inliner.
Unfortunately this means that our optimized benchmark results for the
past ~9 months are not trustworthy at all. The numbers are wildly off:
http://screen/YfZHDvhs9V9Ka6x
"Unoptimized" benchmarks seem to be correct in practice, due to
redundant flag checks. "Optimized" benchmarks, however, are reporting
much better values than they should. The benchmark would stop inlining
after a few iterations of the test, because we'd quickly hit our
internal inlining limit
(https://osscs.corp.google.com/skia/skia/+/main:src/sksl/SkSLInliner.cpp;l=70)
at which point the inliner would turn itself off.
To fix the root cause, Nanobench uses SkSLCompiler::convertProgram
again. Additionally, Compiler::optimize now defensively calls
inliner.reset() before inlining. A second reset shouldn't be necessary,
but it's harmless and free. (This just sets two int fields to zero.)
Change-Id: I690ead14137e4bf74d0f7aa32812bd5b3c21bef5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534560
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
In practice, libc++ implements stack on top of deque, and is much less
efficient than something like an SkSTArray for our use case. This change
improves my benchmarks locally by ~1% on sksl_large.
Change-Id: Ic5c45344594d658f47bae66c54fa92f916da6cb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534496
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Bug: skia:12703, skia:13056
Change-Id: I84ba265125afb7499d04ca533cf6a2322808aee4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534198
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This should make it so the HW tessellation path renderers are never
used; it will always select the atlas or direct fixed-count renderers
instead. This CL will give us a good indication of what visual diffs
to expect, layout tests to rebase, and any performance regressions.
If those are acceptable, then we can proceed with the rest of the code
removal.
Bug: skia:13263
Change-Id: I273bb231461932047768c1c7233ae4291483bc95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533810
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
9d6b3a7ee4..95c1ff52b1
2022-04-27 j.vigil@samsung.com EGL: Fix EGL_KHR_mutable_render_buffer
2022-04-27 romanl@google.com Log debuggerd $PID output when instrumentation gets stuck.
2022-04-26 yuxinhu@google.com check integer overflow in Texture copyImage
2022-04-26 romanl@google.com Add missing result_skip and result_fail.
2022-04-26 gman@chromium.org Metal:ReadPixels AMD Copy Texture to Buffer optimization
2022-04-26 cclao@google.com Vulkan: Improve GetStorageMemoryType logic
2022-04-26 cnorthrop@google.com Roll chromium_revision 192db13f85..c7e51a124f (995097:996181)
2022-04-26 romanl@google.com Dump logcat if instrumentation doesn't finish in 10 minutes.
2022-04-26 romanl@google.com Configure logging in perf and gold tests to include time.
2022-04-26 cnorthrop@google.com DEPS: Remove deprecated chromium dep
2022-04-26 syoussefi@chromium.org Tests for Nvidia/Vulkan bugs with tessellation control
2022-04-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from f13461dbb23c to 5f5faa3a2aad (1 revision)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC bsalomon@google.com on the revert to ensure that a human
is aware of the problem.
To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: bsalomon@google.com
Test: Test: angle_end2end_test --gtest_filter=EGLSingleBufferTest
Change-Id: I216f78299d32d76f6e0947828751b09309e84fd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534297
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This limits our error reporting to the first 16MB of SkSL code in a
program, and error marks are limited to a run of 255 characters or
less. In practice, these limits do not affect normal code in any way.
This gives us the same tight memory footprint we originally had when
positions were stored as `int32 fLine`.
Change-Id: Idef04344324870a7b92aca154feb5e1a0121d284
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533699
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
In a followup, this will make it easier to save memory.
Change-Id: I33e9838d1b3170362f4e7c58ba5f60a1928a4b55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533698
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Change-Id: I1bf6a41290eebd45e2065fcedf86ef2e20866f54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534197
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ic1723ce7eb760d6b64ca5f694d94283334918899
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533805
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
These were not being generated because they were in the "settings" test
group; we have switch-rewrite settings that also need to be tested.
This was a blind spot in our golden output coverage; without these
tests, there is very little switch-statement usage in our corpus.
They are now in the SPIR-V test group as well.
Change-Id: Ic23b726d00c3047f2d19f7f6dc41e58e600e991c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534141
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Start moving to a single set of SubRuns by unifying the
Blob and the SubRun interfaces. GrSubRun will contain the
API for Blobs.
Change-Id: I0bb8eb2c8f62d243d1b158fcaf94b3bcac37f315
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533982
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Update depot_tools used by Skia to access the new parameter.
Bug: skia:12967
Change-Id: I577545753e43c88dd89bc28fbad916c6a1bed89e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532768
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
The Gazelle extension does not verify the hdr/src name (yet).
Bug: skia:12541
Change-Id: Ibd9fd4663d643e864ccc6977bd3c928f722d6c3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533804
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
When drawing the Slug, aboutToDraw was never called resulting
in strange drawing matrices and broken image filters. Call
aboutToDraw in Slug drawing needs to use the initial paint from
the convert call. Store this in the Slug instead of the paint
resulting from aboutToDraw. Plumb the initialPaint and the
paint from aboutToDraw to where they need to go.
Bug: chromium:1302290
Change-Id: Id921aa37bf8ff2ecd21cdcdaad0012a7b90f5322
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533759
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit 82146a7fcd.
Reason for revert: did not add any useful data about the failure
Original change's description:
> Adjust LSAN_OPTIONS for Vulkan ASAN job
>
> Trying to track down an intermittent failure.
>
> Rerun-Tryjobs: true
> Change-Id: Iaa61db90eae72403972fb8262d271c9f6447786f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533880
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I1cc81a09d882c66e6d60b82fc22e454cf5bdddac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533803
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This will allow perf to give us insights on SkVM code generation
performance, so that any regressions are automatically noticed and
trends over time can be observed.
This CL includes three separate benchmarks:
- skvm: Compile SkSL to SkVM with no optimization pass
- skvm_opt: Compile to SkVM and perform optimization/DCE
- skvm_jit: Compile, optimize/DCE, and generate native assembly via JIT
Change-Id: I54ad20d7adb9c5e66d33a2fb761303a269341ff2
Bug: skia:13259
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533957
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
getType() is super high-traffic, so we need to make sure that we're
avoiding heap allocations by using Words{...} around our op words. This
constructs an SkSTArray<8, Word> instead of just an SkTArray<Word>.
This makes a noticeable difference in optimized performance:
http://screen/zbwLy8xFqfF4CoU
Change-Id: Ic747ae95e02593666c47ba9b80d7c679d51ffa50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533958
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>