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>
SkVM does not support nonconstant array indexing because this is an ES3
feature, but sksl_large was using the ES3-specific looping binary
colorizer for gradients. This prevented SkVM from compiling the
benchmark. sksl_large has been regenerated with
`nonconstantArrayIndexSupport` set to false in the GrShaderCaps.
Change-Id: If706d9544d1bc0d9c49c59c925a517f677262c85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533956
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
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>
Previously, we used the Imgui paint shader. However, it uses a custom
mesh now. This increases its starting size substantially. The bitmap
text shader is a better example of a compact but still functionally-
useful shader.
(I also checked the medium and large shaders; these have not changed at
all since our last update, since Ganesh rarely changes now.)
Change-Id: I8e41aeaf4241d64910bd8188155ba428a6b0dbaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533879
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
As a virtual method, there isn't a specific reason for deleteFence
to prescribe const-ness onto GrGpu implementations. This function is no
longer declared as const.
Change-Id: I3016769fd7a114e14f7f5b03ba1931e5130e8060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533757
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
https://bazel.build/reference/command-line-reference#flag--remote_download_minimal
This will hopefully speed up CI builds by a few seconds
because we don't have to copy the builds from the
RBE instances to our machines running the bazel task.
Testing locally, a build with an empty local bazel cache
but warm remote cache took 35 seconds with the status
quo and 13 seconds with the new flag.
Change-Id: I04ba4b0d7ba7864746c52d103be14f4f7b238d39
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533756
Reviewed-by: Erik Rose <erikrose@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
This was breaking:
bazel build //tools/skdiff --config=clang
which does not compile with any GPU backend.
Change-Id: I0f95ebbab6542f7ae5ea8f8a87ea2a5a5d01d993
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532760
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This is a reland of commit 866bd64c1b
Original change's description:
> Check that the GrBackendFormat of a promise image is textureable.
>
> Bug: chromium:1311844
> Change-Id: I13bae71305ae9520851cd1ea38a1da737b934dd1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532196
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: chromium:1311844
Change-Id: I01e2d0e4eb01ee7d97798db6eeff73fec76bf521
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532408
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is only referenced by tessellation code now, so it's been moved to
GrTessellationShader.cpp. (In the near future, we may remove this code
entirely, since it is not very impactful for performance.)
Change-Id: Id0f176220efb3eeed63e08c2c1faa48df07cd124
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533676
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This will allow the SkSL compiler to avoid reprocessing it each time
it is used. This reduces the input SkSL for most Graphite vertex
programs to just a few lines of code.
This also deduplicates a lot of identical SkSL between the
TesselateWedges and TesselateCurves render steps.
Change-Id: I697b3284eba1ede8a2643ba9f4d76b699d3fd756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533576
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This will allow the SkSL compiler to avoid reprocessing it each time
it is used.
Unfortunately, Ganesh also uses this code and appears to inject it
directly into GLSL programs (not SkSL), so we can't remove
`wangs_formula::to_sksl` entirely without making significant Ganesh
changes. (We could probably move it into ganesh, though.)
Change-Id: I4468b22f5ef4d19f2afeaff2d6b4fda5cbcfed9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533399
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
At http://review.skia.org/469525, I updated ExpressionStatement::Make so
that it would report errors in the case of an incomplete expression, but
neglected to split it into a Convert/Make pair. Now, like other
statements, it has a Convert path (for clean error reporting) and a Make
path (for already-error-checked IR construction).
Change-Id: Id89b6220beb5d815b5ae5a663b7fc4c0509d0c40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532786
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This reverts commit 8a54d86c78.
Reason for revert: Causing issues with Android CTS
Original change's description:
> Move SkCamera.h to client_utils/android
>
> Android still uses this
> https://developer.android.com/reference/android/graphics/Camera
> but no other client does.
>
> This adds a little adaption layer until Android is updated
> to use the View3D version.
>
> Move SkCamera.h to View3D.h. Change names to android::skia::CLASS
> instead of SkCLASS. (3DView is not a valid class name, so rename it to
> View3D.)
>
> Forward-declare SkMatrix. Do not override SkNoncopyable - just delete
> the copy constructor/operator=. Make fU and fV private in Patch3D.
>
> Make Sk3DView override View3D temporarily until Android can be switched
> over to the new class.
>
> (View3D from http://review.skia.org/291371)
>
> I made Patch3D and Camera3D be private classes as they are
> currently not used by Android and wanted to constrain the
> exposed API as much as possible.
>
> Change-Id: Ibde45478421feeb610e045205c3f20c0e5b1567e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532456
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Change-Id: If6e768524a0e13e14ef886a6f081a09ddc0dc2fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533396
Owners-Override: Kevin Lubick <kjlubick@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>