For posterity, here's my initial, wrong thinking:
If we squint at "return foo" and read it as "result = foo; goto
end_of_program", and then remember we can always skip forward jumps (and
where's further forward than end of program?), early returns turn out to
work just like a store.
The reason this is wrong is that by the time we reach a final return,
the entire mask stack has been popped back down to its original default
ffffffff (active) state. But that return shouldn't override any prior
returns. So that scheme isn't quite right.
Instead we accumulate the result by disabling updates to lanes that have
already returned. By the time we're done, all lanes should have hit
_some_ active return, now asserted.
Bug: skia:10852
Change-Id: I27b05f04a60ff4a5f2fe5f59bf398c3f7224a41b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327457
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We will need this functionality in TriangulatingPathOp::onPrePrepareDraws as well as at the
current locations
Bug: 1108408
Change-Id: I2a65f07f47a549531d84dbf2afd82ad9d9b35225
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328536
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is useful because we can clone FunctionDefinitions without cloning
the matching FunctionDeclaration. The FunctionDeclaration will remain a
builtin, but the definition should be a malleable clone.
Change-Id: Icfc1e0855fb8fcd6914a5d657f5098986fcf19ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328396
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This picks up a new version of the CIPD deps and a new helper for
writing task drivers.
Bug: skia:10812
Change-Id: I8b9b57acd4d8eee9cdea86008da1f3039af0cdc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328496
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Using `return` instead of assigning to the output color removes an
unnecessary temporary variable from the output.
Change-Id: Ica31e290f8745a7309ae32c7148516d2189308ea
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328386
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The JS starts a web server and then uses puppeteer to load the html
page. The page will load the compiled JS+WASM to run the GMs,
calculate the md5 hash of the pixels using the exact same algorithm
as DM and then get those encoded as a PNG. The HTML then makes
a post request with that image data (assuming it's not an image we
have seen before) and keeps all the test results in a simple
JSON array.
The JSON array will be read in by a task driver in a followup CL.
Bug: skia:10812
Change-Id: I90e8ed42bd96ae11fa75ce84ef2ee1a97ab93d5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328378
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
We just make a global set of known png digests and expect that the test
harness will load this with the appropriate data.
Bug: skia:10812
Change-Id: I8e1fc987d36cc57386167410514803f8c3b90a69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328379
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This adds the budgeted parameter to the GrAttachment ctors. Currently
we only have stencil and msaa attachments which are always budgeted
but this will soon change as more things get added.
Along the same lines this fixes the gpu memory size calculate on
render target. The msaa attachment was getting double counted in
the RT and the attachment itself.
Bug: skia:10727
Change-Id: I3520de9627eadaa4074f7425df509a6c1ccbe07f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327337
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:10419
Change-Id: I74429ceb1fc03e68872c74eb62f64675e1bd55cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327476
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Was missing this virtual so when we were registering attachments in the
cache we were never setting a scratch key on them.
Bug: skia:10727
Change-Id: Id505fcea17ed83b9f9f33739ded518adbcc2acb7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This causes a ~4% regression on sksl_large, but some of that
can be bought back in two ways:
1) Removing (now unnecessary) cloning of program elements
2) Hoisting the new analysis passes, with (nontrivial)
logic to update/maintain the call counts as we edit IR.
Also, this fixes bugs where we were emitting functions that
had "calls" from no-longer called functions.
Bug: skia:10776
Change-Id: I4f8c29957be2e4233a883c9a1125f363b82ee40c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327198
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Previously, we'd add UnresolvedFunction symbols wherever the original
FunctionDeclaration was found, but that can alter shared SymbolTables
(e.g. the root table) and the node will not be cleaned up when the
program is deleted. The pooling system expects that any node created as
part of a Program will go away when the Program does.
This change puts the UnresolvedFunction symbol as close to the
FunctionDeclaration as possible without changing builtin symbol tables.
Change-Id: I4c80cfba734047f11b50c86829d95d8e393c3060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327921
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is desired for a short term memory improvement on low memory
devices.
Bug: chromium:1138979
Change-Id: I7df41a9c4d21b7a7f62b738e6358b36dd262f77d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327345
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This flag is set on anything rehydrated and on the root symbol table;
that is, anything that will outlive your Program's tree.
Change-Id: Idd9a167ee69f1fb9e526aecbee733ce1ccb5d265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327920
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
By the time we do this check, we've consumed all the bytes for the
branchIfAllFalse instruction, so ip is pointing at the next instruction.
If that next instruction is itself the jump target, we classify that as
a backward jump instead of the zero-sized forward jump that it is.
Switching to >= fixes that.
Change-Id: I537131bfb0d213c8407734184b78a510624d60c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327458
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Looks like this code got a little dusty.
Change-Id: Iac0f475abac9d0891e34bba59ddbde3ec63d065a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328176
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
b4fb7cc9ec..2be35682cd
2020-10-18 m.maiya@samsung.com Add sRGBOverrideFormats end2end test
2020-10-18 m.maiya@samsung.com Vulkan: Implement EXT_texture_sRGB_decode
2020-10-18 jmadill@chromium.org Fix VertexAttributeTest.DrawArraysWithBufferOffset.
2020-10-18 jmadill@chromium.org Make Metal shader-gen cross platform.
2020-10-18 lehoangq@gmail.com Metal: don't precompile default shaders.
2020-10-18 jmadill@chromium.org More Mac/AMD/GL dEQP suppressions.
2020-10-17 jmadill@chromium.org Change Android atomic counter tests to skip.
2020-10-17 syoussefi@chromium.org Regression tests for vertex attribute aliasing
2020-10-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 618e41c871d6 to 483a71c5130e (11 revisions)
2020-10-17 timvp@google.com Reland "Vulkan: Fold deferred clears into current clears"
2020-10-17 jmadill@chromium.org Suppress Mac/AMD/GL GLES2 failures with standalone mode.
2020-10-16 timvp@google.com Revert "Vulkan: Fold deferred clears into current clears"
2020-10-16 cnorthrop@google.com FrameCapture: Move shader and program source to shared cache
2020-10-16 jmadill@chromium.org Trace Tests: Add vsync-limited mode with a GPU timer.
2020-10-16 jmadill@chromium.org Perf Tests: Add offscreen mode.
2020-10-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 14ad927e679a to 970c132746b1 (1 revision)
2020-10-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from 1abaced34b84 to ee0de094ddff (1 revision)
2020-10-16 jmadill@chromium.org Suppress Mac/AMD/GL dEQP failures with standalone mode.
2020-10-16 jmadill@chromium.org Remove flaky check in TimerQueriesTest.
2020-10-16 cnorthrop@google.com Capture/Replay: Fix GL_HALF_FLOAT_OES vertex attrib type name
2020-10-16 jmadill@chromium.org Suppress fragment out int tests on Intel/Mac/GL.
2020-10-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 20073b8681d2 to 7e36b15b99a7 (145 revisions)
2020-10-16 lehoangq@gmail.com Metal: autogen blit & clear shaders for integer textures
2020-10-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 312a2b1c9d05 to 20073b8681d2 (419 revisions)
2020-10-16 lehoangq@gmail.com Metal: Support 2D array textures and base & max levels.
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 egdaniel@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
Tbr: egdaniel@google.com
Test: Test: Free Fire MECTest: Test: GLES31/functional_android_extension_pack_extensions_ext_texture_srgb_decodeTest: Test: GLES31/functional_debug_negative_coverage_*_srgb_decode_*Test: Test: GLES31/functional_state_query_sampler_*_srgb_decode_*Test: Test: GLES31/functional_state_query_texture_*_srgb_decode_*Test: Test: PUBG MECTest: Test: angle_end2end_testsTest: Test: angle_end2end_tests --gtest_filter=SRGBTextureTest.*Vulkan*Test: Test: dEQP.GLES31/functional_srgb_texture_decode_skip_decode_*
Change-Id: Ie814a8466e29818a1931b6f00ae5986b59f422a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328078
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This reverts commit fea12238ed.
Reason for revert: MSAN/SwiftShader failure
Original change's description:
> New variant of SkImage::MakeFromYUVATextures.
>
> Takes a new type GrYUVATextures. This a set of GrBackendTextures and
> SkYUVAInfo that have been pre-validated to be compatible.
>
> Bug: skia:10632
>
> Change-Id: Id252f8662ede0f268e88fd40dc1b0b8f4ab6345f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317762
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I5350d4f9b1eda0503fb0af9db8575a734bdc811f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327922
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
It's just much easier to remember and think about
max(lo, min(x, hi)) than max(min(hi, x), lo), and
both pin NaN to one of the two limits. I'm not sure
if anything in Skia depends on which limit we pin to.
Change-Id: Iceca36a8fffd7072180e82b8b6eb81cbdb5ac97f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327788
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Steps taken to produce this CL:
- add the 'removeFromArgs("svg")' call in dm_flags.go
- run 'make train' in infra/bots directory
Bug: skia:10848
Change-Id: Ie7178e5c2fe446b3727a8b38a61d8205faf5369f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327918
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Takes a new type GrYUVATextures. This a set of GrBackendTextures and
SkYUVAInfo that have been pre-validated to be compatible.
Bug: skia:10632
Change-Id: Id252f8662ede0f268e88fd40dc1b0b8f4ab6345f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317762
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I70b2fdea570a9091afc81a1455fa61f90b0357a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327786
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Minimized from fuzzer case (rr is amazing). Verified that this test
failed before the fix 712d3a57e "Cannot create SkFontData with no data."
and now succeeds with the fix.
Bug: oss-fuzz:26254
Change-Id: I985ba3ab61e5824d6a61ede04880692ecc69ce44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327916
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
I experimented with passing in a rectangle and computing a geometric
mean of the scale factors for the 4 corners and center. The downside
to that approach is that callers either know the parameter-space bounds
or the device-space bounds. In the latter case, we have to map by the
inverse CTM, which opens up a can of worms. In practice it seemed using
just the center point worked out just as well.
This also updates the sample to draw the axes in the layer space instead
of parameter space. I found this helps display the scale effects of the
parameter-to-layer matrix better.
Bug: skia:9074
Change-Id: I855c85cdbe1072c451aa3a0601571f2e137e5203
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327624
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Also adds GrGLSLVertexGeoBuilder::appendRawFunctionDefinition(). This
allows us to define functions in vertex and geometry shaders whose names
don't get mangled.
Bug: skia:10419
Change-Id: I90319b54bcbbb7000c7809cb6ce8d1969a3bd8c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327456
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:9074
Change-Id: Icdac64276e0a403950fd990a619d523b0ee784de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326942
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: oss-fuzz:26254
Change-Id: Ia4ce4eabacbd9811bc0fdf09b509fd69650cce53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327816
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Don't skip deps from modules/. The initial exclusion was added long
ago, when Skottie deps were causing build issues.
Now it doesn't seem to be needed anymore, and it actually gets in the
way (see exceptions for various modules).
Change-Id: Ibb944fc5ab4754bf4006ebb3b75d9d8e5e0d8312
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327620
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
- Reword the comment to explain how it differs from std::clamp().
- Document and test an alternative form using std::{min,max}.
Change-Id: I3a97b98a15303478a5a7ff8d0536829f6d5f1586
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327696
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit db0288d747.
Reason for revert: undeclared tuple size
Original change's description:
> Move all YUVA image creation in GMs into sk_gpu_test::LazyYUVImage.
>
> LazyYUVImage now supports making images from a generator and from
> textures. It uses ManagedBackendTexture to manage texture plane
> lifetime via ref-counting.
>
> Adds some supporting utility functions to SkYUVAInfo and
> SkYUVAPixmaps.
>
> Eases transition of forthcoming MakeFromYUVATextures API change.
>
> Bug: skia:10632
>
> Change-Id: I8cfd747c27076d1627da6ea8a169e554a96049e0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326720
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Icdfb70f7dadd97eace8f88d5a886d31534102f5f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
LazyYUVImage now supports making images from a generator and from
textures. It uses ManagedBackendTexture to manage texture plane
lifetime via ref-counting.
Adds some supporting utility functions to SkYUVAInfo and
SkYUVAPixmaps.
Eases transition of forthcoming MakeFromYUVATextures API change.
Bug: skia:10632
Change-Id: I8cfd747c27076d1627da6ea8a169e554a96049e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326720
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.
As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.
This reverts commit d6cf56fd34.
TBR=
Change-Id: Ibadd7c8dc0464ec0c27841530ade0c2098305d20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327344
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>