This can be re-enabled once the Metal bug with fp_sample_chaining is
diagnosed and fixed.
A pure rollback led to a merge conflict; just commenting out the line
that invokes the inliner serves the same purpose.
Change-Id: I4df556ea8cd44349cbca2ea0ec9995dfffeb8aec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316937
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is also the final wire to connect, so with this CL we will try
using input attachments for dst blends in available.
Bug: skia:10409
Change-Id: I8bd953ea5eb056a55d8bf36d91008a9d7298d84d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315650
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
We always reset the entire command pool so we don't need to create the
pool with support for resetting individual command buffers. This may
or may not give us perf and/or memory wins.
Change-Id: I172362b49444a80f4e91958120d165c130598a98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316656
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Fixes a use-after-free where switch statements were replaced by the
statically-determined case, but there were other (later) blocks in the
list that still had pointers into the no-longer-valid cases.
Bug: oss-fuzz:25554
Change-Id: I23b80d66d49a251b59ce02d74f31996858c04395
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316876
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:10679
Change-Id: If464c48b7c31d0d8440d1231d1983829d54ce598
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315281
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This should fix the chrome roll.
Change-Id: I2de68f972996bf6124cf5cc27dfd538aa1161057
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316877
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This change is in response to the perf regessions we saw when we started
using less dedicated allocations.
Bug: chromium:1127358
Change-Id: Ie0cbf546b92d344712e32b5fc8e56837f49fed67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316836
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
We still occasionally downcast, so this is not airtight,
but it (1) allows us to know where we are downcasting and
(2) lets us move away from GrContext (and hopefully remove
it sooner than later.)
All three canaries are currently broken =( so here we go!
Bug: skia:104662
Change-Id: I84efe132574690b62ea512e194e4f9e318e9c050
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316218
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
separate step.
This ended up uncovering an optimization bug. SkSLNonConstantCase
started failing; it turns out that the optimizer was never being run on
this test, and so we hadn't noticed that it didn't actually work in the
presence of optimization.
Change-Id: Iff1d330be7534113b86f86b00c39f91282903ae3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316568
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This partially unblocks Chrome from migrating from
SkCanvas-getGrContext to SkCanvas-recordingContext.
Change-Id: I1100387497ba8b482005bb1d147e9768590afe95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316449
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Bug: skia:10409
Change-Id: I90c83e03616b76adb887c087f7f22941bd776d8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316356
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
A few first steps toward a Bazel build.
To try it out, I think just
$ bazel test ...
I added third_party to .bazelignore to prevent Bazel from looking there.
It can handle external dependencies itself, so no need to poke into what
we sync from DEPS. Some of those have Bazel configs and we don't want
to be building them yet.
I've started by with libpng using new_git_repository(), mostly because
it's small, with a mildly complex build, and needs dependencies of its
own, zlib. Mysteriously zlib is built-in to Bazel, so that was easy.
Next up is probably a dependency that does support Bazel, using
git_repository(). That should make sure we can handle the full mix.
Change-Id: I5775a1b254d341b9a90630aa1cc433a24167f2fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316636
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Golden SkSL outputs are intended to eventually replace the majority of
our unit tests, since they can automatically update themselves when we
change implementation details of the compiler.
If you change the compiler output without updating the Golden files, the
CheckGeneratedFiles housekeeper will be triggered. Set
`skia_compile_processors` or `skia_compile_sksl_tests` to true in your
GN args to regenerate them.
Almost all of the tests from SkSLFPTests.cpp and SkSLGLSLTests.cpp can
be migrated into separate unit-test .fp/.sksl files in a followup CL.
hcm@ has signed off on removing the copyright boilerplate preamble from
our unit test files.
Change-Id: I9e24a944bbac8f8efd62c92481b022a0b1ecdd0b
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316336
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
In this CL, the IR generator still performs inlining as well; this will
be removed in a followup CL. However, the optimization pass is able to
find more inlining opportunities because it allows itself to exceed
the 50-IRNode limit when a function is only used once. In our test code
this is uncommon, but in SkSL generated from trees of fragment
processors, it is very common; any FP that is only sampled once tends
to qualify.
Change-Id: I8b2f653b2dd05d4de18bb15f3a4c1f034b8252ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315639
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
We had several defines around the code base that were not
very descriptive. Additionally, we had a patch of extra
runtime restrictions living in oss-fuzz that were applied
when fuzzing over there for some fuzzers.
This has all be consolidated and controlled via the defines
documented in site/dev/testing/fuzz.md
As such, we can remove one of the patches that is in oss-fuzz,
taking us closer to being able to fuzz in the CI/CQ.
PS 1 renames existing fuzz defines to the new schema.
PS 2-3 backports skia.diff from oss-fuzz and changes those
definitions to have the _GREATLY modifier.
PS 5+ further condenses the defines so that there is one
define for gating the runtime checks.
Change-Id: Ia4ad96f30c1e9620a2123b510e97c6f501a2e257
Docs-Preview: https://skia.org/?cl=316443
Bug: skia:10713
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316443
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Disambiguates Switch from SwitchCase, and makes is() and as() work.
Change-Id: I9b9b71dabd730247b20ec9b6df02b87e4978d534
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316577
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Allows the user to limit the stream to a subset of the entire file.
SkFILEStream uses the current FILE position as the base position for the
stream; this allows the user to further limit the length of the stream
to a range of bytes in the file.
Change-Id: I36131ff19e75b65d501eabdfd9368f8fbb2e177f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316357
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Rename fSize to fEnd (since it is actually the offset of the end
underlying file, not the size of the file), fOriginalOffset to
fStart, and fOffset to fCurrent. Also initialize in the order fEnd,
fStart, then fCurrent to maintain the invariant that fCurrent should
always be kept within the range of fStart and fEnd, inclusive.
Change-Id: I8801288320cf82b071e4621c0e770ce16016953a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316453
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: oss-fuzz:25584
Change-Id: I3d6007e373f2b3b684065cad276695fb78c0bd8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316537
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This improves perf on ANGLE D3D11 ES3. Will make conditional
if any other config regresses.
Also makes the varyings passed to append_index_uv_varyings be
purely output params.
Change-Id: I332940d9d55be854d3bba72286ca89840ab43d50
Bug: skia:10644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316226
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This change doesn't accomplish anything by itself, but is a necessary
prerequisite for followup changes to node handling. Eventually all data
is going to be stored within IRNode itself, and the subclasses will not
add any fields; this is just the first step in that process.
Change-Id: If2bea4c62bd8f680e9d9f39248bb9679332b245b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315867
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
This is a reland of ff9dc8240e
ASAN errors were resolved at http://review.skia.org/316451
Original change's description:
> Add InlineCandidateAnalyzer to locate candidate functions for inlining.
>
> The analyzer will be enabled in followup CLs. At present, if the
> commented-out code is enabled, it will properly identify candidate
> functions that should be inlined.
>
> Change-Id: Icb6e7c2394a3828df81f75b855c69a25bf297842
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315217
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: I851bde66c5e490c237b88606f23fb3c5077a2393
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316452
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This removes the always use dedicated allocations for newer Mali's
and removes the "small image" check in GrVkMemory. The later is not
needed since the allocators we use have their own heuristics for using
dedicated memory which includes querying the driver itself to see if
it is recommended or not. We can also add a limit back here if we find
it necessary.
Bug: chromium:1127358
Change-Id: Ia7fa6281abb058293805c9c1c3dba9b79e7e12fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314320
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:7647
Change-Id: Ic4709817804610783de8ff3d9eaa32f57fb72729
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313316
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit ff9dc8240e.
Reason for revert: tree on fire
Original change's description:
> Add InlineCandidateAnalyzer to locate candidate functions for inlining.
>
> The analyzer will be enabled in followup CLs. At present, if the
> commented-out code is enabled, it will properly identify candidate
> functions that should be inlined.
>
> Change-Id: Icb6e7c2394a3828df81f75b855c69a25bf297842
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315217
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I1f07b406c4d56f2fdb6d3c5360f15397fc26d783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316448
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We don't expect raw literals to ever appear here; this is a defensive
maneuver. See http://review.skia.org/316440 for an example case where
raw literals accidentally made it all the way to the inlining pass, due
to a missing `coerce`.
Change-Id: I80198f2f135791931aa53e0d6d92f1edfe4fb3b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315970
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This CL adds a new type GrDstSampleType to say how we will sample the dst.
We add tracking of the GrDstSampleType in the recording of GrOps and
then during execution passing the information along to the GrPipeline.
In general the tracking of GrDstSampleType is a global state of a GrOpsTask
so it is kept separate fro the DstProxyView which is more specific to a
single Op on the GrOpsTask.
Bug: skia:10409
Change-Id: Ie843c31f2e48a887daf96cee99ed159b196cb545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315645
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Plumb layer size information and add machinery for retrieving layer
content as an SkPicture.
Implement the effect in SkSL.
Current limitations:
* displacement source layer must be above (on top in stacking order)
of the target layer
* if animated, the displacement layer timeline (in/out points) must
fully cover the target layer timeline
* Hue/Sat/Lightness selectors are not supported at the moment
These will be addressed in follow-up CLs.
Note: Bodymovin does not export hidden layers by default; if the
displacement source layer is hidden, one should select the "Hidden"
export option.
Change-Id: I11a5c760a9df1e75835a51371f60d5b798e7e38a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314798
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Constant propagation wasn't performing type coercions, so we'd end up
propagating a constant into its final location and using the constant's
type rather than the destination type. This allowed things like
$floatLiteral to sneak into final output.
Change-Id: I5b63c70370095e291dea6374e139329b695fa0b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316440
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
'::' is now the only way to access enum members, and it can no longer be
used to do swizzles and other field-access type things. This also
prevents a parser assert when there's a dangling '::' (that fell through
to the float-literal case and didn't see the expected '.').
Bug: skia:10627
Change-Id: I26f6ddeec33e45182a587dbb266ca4b45459cb2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316230
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
29b1f07f4a..0c8f66c716
2020-09-11 jiawei.shao@intel.com OpenGL: Get VendorID and DeviceID with angle::GetSystemInfo()
2020-09-11 jmadill@chromium.org Enable -Wweak-template-vtables.
2020-09-11 courtneygo@google.com Fix mismatch issue with precision qualifiers.
2020-09-11 courtneygo@google.com Refactor to pass ProgramMergedVaryings to link impl
2020-09-11 jmadill@chromium.org De-templatize ResourceManagerBase.
2020-09-10 jonahr@google.com Cleanup disable_program_binary workaround
2020-09-10 hidehiko@chromium.org Expand is_linux to is_linux || is_chromeos.
2020-09-10 sugoi@google.com Added integer overflow detection to ClipRectangle
2020-09-10 syoussefi@chromium.org Make gl::DrawBufferMask a BitSet8
2020-09-10 emaxx@chromium.org Fix useless move() in SizedMRUCache_unittest.cpp
2020-09-10 timvp@google.com Vulkan: Avoid linking to SPIR-V validation if possible
2020-09-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 4ede8ee6e2ec to fcb7ecbe49c5 (5 revisions)
2020-09-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ce08265ba5b7 to b24900a1aa39 (1 revision)
2020-09-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from a715b1b40535 to 2de7d3af0c0e (2 revisions)
2020-09-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e9ccdaed3414 to 30a5da059e5d (421 revisions)
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 reed@google.com on the revert to ensure that a human
is aware of the problem.
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/master/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
Bug: chromium:1091364,chromium:1110266,chromium:1122844
Tbr: reed@google.com
Test: Test: Built locally. Tryjob.Test: Test: CQ
Change-Id: Id9e8104860e66d1b6b46a28901d417a8a57796ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316204
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
The stroke tessellator can't handle inflections and can't handle
rotations greater than 180 degrees. Before this CL we had to use the CPU
to chop curves at their inflections and midtangents in order to meet
these constraints. This CL adds a vertex shader to the tessellation
pipeline that handles all the chopping logic on the GPU.
Bug: skia:10419
Change-Id: I2d3279076bafa415395e014772a305e616fcff71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315797
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
In case the default font family is not there.
Bug: skia:10701
Change-Id: Ie1155d820bfcc25870bedcd0310b0e779d55e942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316087
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>