Commit Graph

49243 Commits

Author SHA1 Message Date
Brian Osman
2a4871b80c Implement normalize in ByteCode generator
Change-Id: I82592c5bb3c6fb7a0e61970d0a8980855c04ce50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297798
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-19 17:57:28 +00:00
Brian Salomon
4e37751693 Make it easier to test rectangle textures by using createBackendTexture.
Also allows internal creation of rectangle textures, only used by unit
tests currently.

Previously GrContext::createBackendTexture() would ignore the request
for RECTANGLE or EXTERNAL and always make 2D. Now it makes RECTANGLE if
supported and always fails for EXTERNAL.

Change-Id: Iafbb3f5acddb37bfb8d39740f2590177a07dae78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297472
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-19 17:50:18 +00:00
Robert Phillips
e22c5caa84 Fix wacky_yuv_formats for *ooprddl configs
In OOPR/DDL mode, images wrapping backend textures must be able to exist past the end of the GM - residing in the DDL.

Change-Id: Icc78e407b45f91d3d47eebde2c316ff6bd962afb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297380
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-19 17:42:58 +00:00
Greg Daniel
d4928d03e2 Implement flush finish proc support for d3d backend.
This also adds a GPUTEST_FOR_D3D_CONTEXT macro to help with debugging
tests.

Change-Id: I72db01d148755c3bbbbb4d948d441a31dcf9482b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297717
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-19 16:28:33 +00:00
Michael Ludwig
ce81227c01 Revert "Snap coordinates for shader nearest-neighbor decal filtering"
This reverts commit 4e68ec693f.

Reason for revert: chrome layout failure?

Original change's description:
> Snap coordinates for shader nearest-neighbor decal filtering
> 
> Bug: skia:10403
> Change-Id: I875b1a4bb7cacbe6721a69aa8ed02118b989729d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297596
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=bsalomon@google.com,michaelludwig@google.com

Change-Id: Ie7d329b54b19c2c9c2d9e4a5611c9677fe6d2ae5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10403
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297721
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-19 15:48:35 +00:00
Brian Osman
89bf734d87 Add ceil to skvx/skvm/JIT, and floor/ceil intrinsics to ByteCode
This is enough to get the colorcube GM working on the CPU backend.
(It's not blazingly fast, but it works!)

Change-Id: Ic069861bab162ed49f876fd03af2cbaaec2da628
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297718
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-19 15:37:03 +00:00
Kevin Lubick
df4e3ab185 HTML typo egde => edge
Same problem was in infra repo:
https://skia-review.googlesource.com/c/buildbot/+/297738
https://skia-review.googlesource.com/c/buildbot/+/132921

Change-Id: I686e293aaf2a6c09f388eef864d3ea143ca2f69e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297719
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-19 15:12:06 +00:00
Robert Phillips
c869ff7d97 Fix flippity GM for *ooprddl configs (take 2)
The flippity GM doesn't create backend textures but it does perform some custom proxy creation (i.e., using MakeTextureProxyFromData to set the origin) that requires a direct context. This work must be done in onGpuSetup but doesn't entail any fancy lifetime management.

TBR=egdaniel@google.com
Change-Id: I258c0cb66746ca6853a4e228e10407671d7d55d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297697
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-19 14:47:53 +00:00
Brian Salomon
17473756e9 GrTextureGradientColorizer uses GrTextureEffect
Bug: skia:10139

Change-Id: I18bd5c078c785bf7faa3e2e20e93efca082951ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297359
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-19 14:40:23 +00:00
Michael Ludwig
4e68ec693f Snap coordinates for shader nearest-neighbor decal filtering
Bug: skia:10403
Change-Id: I875b1a4bb7cacbe6721a69aa8ed02118b989729d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297596
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-19 14:25:13 +00:00
Robert Phillips
22d9d0b996 Revert "Fix flippity GM for *ooprddl configs"
This reverts commit ddca6ab54a.

Reason for revert: breaking abandoned context bot

Original change's description:
> Fix flippity GM for *ooprddl configs
> 
> The flippity GM doesn't create backend textures but it does perform some custom proxy creation (i.e., using MakeTextureProxyFromData to set the origin) that requires a direct context. This work must be done in onGpuSetup but doesn't entail any fancy lifetime management.
> 
> Change-Id: Ica4f4f7476778cdf934c3be9ef8c9a28d0d4ba2e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297445
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com

Change-Id: Ie66a4187a5ff2efee21f60bb9c0d00e2aab3d1e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297696
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-19 13:27:35 +00:00
John Stiles
5081942c0d Optimize CPP code generation.
Previously, we were limiting our calls to appendVAList to 512-byte
chunks to avoid a potential buffer overflow. This had two problems:
1 - it did not avoid the buffer overflow :(
    see chromium:1092743
2 - every call to appendVAList is expensive; it incurs a resize of the
    code buffer (alloc new, memcpy, free old)

This CL removes the 512-byte cap as the buffer overflow issue was
resolved at http://review.skia.org/297276

This CL also includes a few more minor improvements.
- `codeAppendf` now uses a raw string so the gencode is easier to read.
- Optimized `SkStringPrintf("%s", foo)` to `SkString(foo)`.
- Optimized `strA = strB` to `strA.swap(strB)` where safe to do so.

Change-Id: Ia0909a68719848dd2ca655066a9bc6929c8fd09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297358
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-19 13:25:05 +00:00
Robert Phillips
ddca6ab54a Fix flippity GM for *ooprddl configs
The flippity GM doesn't create backend textures but it does perform some custom proxy creation (i.e., using MakeTextureProxyFromData to set the origin) that requires a direct context. This work must be done in onGpuSetup but doesn't entail any fancy lifetime management.

Change-Id: Ica4f4f7476778cdf934c3be9ef8c9a28d0d4ba2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297445
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-19 13:09:22 +00:00
John Stiles
75c9c5bd26 Add unit tests for untested SkString APIs.
Unit tests for SkString::appendVAList would have preemptively caught the
associated fuzzer failure.

Change-Id: I19a414e5e937f9e3fbe0f75e062b4befa6e2877b
Bug: chromium:1092743
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297473
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-19 13:08:52 +00:00
skia-autoroll
889563cbeb Roll ANGLE from fa3d64bf72d6 to c81f0b7b921f (6 revisions)
fa3d64bf72..c81f0b7b92

2020-06-18 cnorthrop@google.com Tests: Update trace timestamps
2020-06-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from bfa95c7ad8b7 to 23498d296498 (1 revision)
2020-06-18 syoussefi@chromium.org Disable ES3 perf tests on Nvidia/windows7/Vulkan
2020-06-18 syoussefi@chromium.org Fix restricted_traces/.gitignore
2020-06-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from a7112d544b2e to 99651228b238 (2 revisions)
2020-06-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 763957e6b4fc to 7a1d99d0be42 (4 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 djsollen@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:1096510
Tbr: djsollen@google.com
Test: Test: angle_perftests --gtest_filter="*Trace*"
Change-Id: If2cfc7beb35bc2401e3edf149ddcbbec9ecdfb2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297616
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-19 04:45:02 +00:00
skia-autoroll
f667f4319f Roll SwiftShader from 7a1d99d0be42 to eb6824408d08 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/7a1d99d0be42..eb6824408d08

2020-06-18 capn@google.com Assert reserved binding entries aren't accessed
2020-06-18 capn@google.com Optimize out-of-bounds checks with unsigned compare
2020-06-18 capn@google.com Replace instead of add pointer offsets when out of bounds

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC djsollen@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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: djsollen@google.com
Change-Id: I05f84e2f23bf0ab85fcddde5ef6072a8b803a805
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297532
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-19 04:44:52 +00:00
skia-autoroll
f4f1e8d409 Roll Chromium from 2adbb514e789 to 4a914f2106e0 (507 revisions)
2adbb514e7..4a914f2106

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC djsollen@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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: djsollen@google.com
Change-Id: I4ca973d05ecdd4506a9d4ba57354e737fe39acd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297535
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-19 04:39:02 +00:00
skia-autoroll
3d25c77940 Roll dawn from 3f4f35661151 to 581c407cd20b (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/3f4f35661151..581c407cd20b

2020-06-18 cwallez@chromium.org Fix TypedInteger hash compilation failure with stdlibc++
2020-06-17 rharrison@chromium.org Add support for different default branches in roll-shader-deps
2020-06-17 enga@chromium.org Add TypedInteger

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@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-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I0bd9be055408e217dd7ac6e4704dac4ac393feb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297533
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-19 04:37:52 +00:00
Brian Salomon
d610c75156 Fix a unintended shader change in GrTextureEffect
nearest + repeat doesn't need to operate in unnorm coords.

Restores behavior previos to:
https://skia-review.googlesource.com/c/skia/+/297189y

Change-Id: Id78fb1a1526e0703ed17a3c46082209447cac2dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297464
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-06-18 23:13:13 +00:00
Greg Daniel
5ed3c11a80 Reland "Don't release vk memory allocator until context is deleted."
This reverts commit c35c073c80.

Reason for revert: fix benches

Original change's description:
> Revert "Don't release vk memory allocator until context is deleted."
> 
> This reverts commit 11afa63693.
> 
> Reason for revert: breaking perf bots
> 
> Original change's description:
> > Don't release vk memory allocator until context is deleted.
> > 
> > Bug: chromium:1081806
> > 
> > Change-Id: I0a7a92408a3f2119e6b70d8eef6aa4f2d1982d4b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297357
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: I48d200cb72eb30c119359e89c5a9123213e62a5e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1081806
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297457
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

# Not skipping CQ checks because this is a reland.

Bug: chromium:1081806
Change-Id: I6d80af6a1fab2fd6e2e15e9a2c7deefd7a7866ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297475
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-18 22:04:23 +00:00
Brian Osman
304dfa379c Remove swizzling-store instructions from SkSL ByteCode
Another peephole where we're happy to trade a bit of interpreter
performance for less code size and easier translation to SkVM now.

Change-Id: I0de7962194fa4dbbc5d77f68831f1374333de9c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297536
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-18 20:56:32 +00:00
Florin Malita
a83f2d2fa9 [skottie] Add support for unprefixed valign/resizing props
Bodymovin now exports unprefixed vertical alignment and resizing props
("vj", "rs" - corresponding to Skottie's "sk_vj", "sk_rs").  Update to
handle both flavors for now (old props to be phased out).

TBR=
Change-Id: Ib34922c9bf54b6bd46c2ce4aab176c4b9570768e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297281
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2020-06-18 20:22:53 +00:00
Brian Salomon
92b9ccf53e Use child texture effects in ProcessorRefTest
Also remove unused buffers. FPs no longer support reading from buffers.

Bug: skia:10139

Change-Id: Id1e2d7ef2cfa7f11a95cb0ce448c69af755c2b65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297176
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-18 20:18:33 +00:00
John Stiles
3890d3d765 Roll gn.
Change-Id: I44eab9976aa4820a74f9246f1244c1a293e1fff6
Bug: gn:175, gn:158
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297463
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-18 19:33:04 +00:00
Florin Malita
c217f61764 [skrive] Start parsing the node hierarchy
TBR=
Change-Id: I601ad831e69fd26ac8a0fe1f90ce2e9588a7f912
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297056
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-06-18 19:29:42 +00:00
Brian Osman
3711c6603e Remove swizzling-load instructions from SkSL ByteCode
These were peephole optimizations that help the interpreter a bit, but
I'd like to favor code size and ease of translation to SkVM now.
We can now run: sample(child, p.yx) on the CPU backend, for example.

Change-Id: I90f2f649d95d5c4c50e470988590491e3b56ba34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297465
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-18 19:26:02 +00:00
Brian Osman
f847f3106c In SkSLSlide, directly use Viewer's shader error handler
With the CPU backend, there is no GrContext on the canvas, so we were
sending errors to the default handler (SkDebugf + assert), so editing
shaders was impossible. Now they fail gracefully (and produce a popup
window with the message).

Change-Id: I29bad24f201be59ba1cec45f446a433c01cf86dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297461
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-18 19:24:02 +00:00
Mike Klein
92887b5474 allow fallback to skvm blitter
This will let the threshold_rt GM draw even if --skvm isn't forced.
I don't see any GM diffs beyond that.

PS3 expands the same basic idea just a little wider.

Change-Id: I714c0fd2d4e6814c307a189a9f004e8ed729819a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297419
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-18 18:48:38 +00:00
Mike Klein
c950e05baf clean up old idea about nullptr/sRGB
I don't see us ever really saying dstCS == nullptr --> dstCS = sRGB.
It's too handy a feature to have a legacy dst.

Change-Id: I20576962eeb5a2ce7d0da09ffe1bbba860dad086
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297418
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-18 17:51:58 +00:00
Adlai Holler
6f1487fe80 Consolidate GrDrawingManager <-> GrRenderTask lifecycle
This creates a funnel in the drawing manager (removeRenderTasks) that
opens the door for tighter integration between the two classes. Also we
add some assertions about the relationship and cut out duplicated code.

Bug: skia:10372
Change-Id: I0781ba7d45ac090cf7f6d430f0d56afe0f98b7e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297195
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-06-18 17:42:43 +00:00
Greg Daniel
c35c073c80 Revert "Don't release vk memory allocator until context is deleted."
This reverts commit 11afa63693.

Reason for revert: breaking perf bots

Original change's description:
> Don't release vk memory allocator until context is deleted.
> 
> Bug: chromium:1081806
> 
> Change-Id: I0a7a92408a3f2119e6b70d8eef6aa4f2d1982d4b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297357
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I48d200cb72eb30c119359e89c5a9123213e62a5e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1081806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297457
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-18 17:38:31 +00:00
Mike Klein
f8d68fe7d4 runtime shader children on skvm backend
Mostly plumbing and misc instructions to draw threshold_rt.

Backends differ in what we return when sampling alpha-only
images, so I've switched threshold_rt to use the .a channel,
which everyone agrees on.

I'm pretty confused about what CTM and local matrix to pass
to the child program() calls, so I've just passed no-ops.

Change-Id: I004b428b4e5e27f3963a27dea0ef44e1f57bc3e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297384
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-18 17:37:38 +00:00
Greg Daniel
11afa63693 Don't release vk memory allocator until context is deleted.
Bug: chromium:1081806

Change-Id: I0a7a92408a3f2119e6b70d8eef6aa4f2d1982d4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297357
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-18 17:27:48 +00:00
Nigel Tao
b54946b86d Reland "Allow building with Wuffs v0.3, not just v0.2"
This is a reland of c34344989a

Original change's description:
> Allow building with Wuffs v0.3, not just v0.2
> 
> This is step 1 of a multi-step, multi-repository transition:
> 
> 1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
>    defaults to v0.3 but other repositories' defaults remain at v0.2.
> 2. Update users' Skia version (automatic if they update regularly).
> 3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
> 4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
> 5. Remove the option for Skia to work wih Wuffs v0.2.
> 
> Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

Change-Id: Iafc4acf69c3d61d512ffde25cc7e405092e384c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296758
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-06-18 16:02:03 +00:00
Brian Salomon
91dea5168a Merge ShaderMode and FilterLogic enums in GrTextureEffect
Change-Id: I2523b79e6cf5654daba03aa837d05a76d8ca9f66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297189
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-06-18 15:54:53 +00:00
John Stiles
9394dd59b9 Fix stack-buffer overrun in appendVAList.
Cleaned up SkString formatting APIs for consistency and removed hard-to-
use macros. Added printVAList API for orthogonality with existing
(append|prepend)VAList methods. Optimized append/prepend methods to
use printf if appending/prepending to an empty string, a surprisingly
common case.

Change-Id: I6fbc6dc84ebb060ca452f582cb4f13a3c0f7f6ec
Bug: chromium:1092743
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297276
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-18 15:41:23 +00:00
skia-autoroll
7cdcae3a17 Roll ANGLE from 98d0f30c4393 to fa3d64bf72d6 (41 revisions)
98d0f30c43..fa3d64bf72

2020-06-17 ianelliott@google.com Minor edits to top of EGLPreRotationTest.cpp
2020-06-17 ianelliott@google.com Split/refactor the pre-rotation BlitFramebuffer tests
2020-06-17 stuartmorgan@google.com Add newline-eof to warnings
2020-06-17 amaiorano@google.com Move vulkan_headers/entry_points to common/vulkan
2020-06-17 etienneb@chromium.org Active the delegate worker pool for chromium (3/3)
2020-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from 9d2dfca53b75 to f31524575668 (1 revision)
2020-06-17 xiaoxuan.liu@arm.com Vulkan: Update eglDupNativeFenceFDANDROID() implementation.
2020-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 8cbee4107cf1 to 763957e6b4fc (8 revisions)
2020-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 52a5f074e9bb to a7112d544b2e (3 revisions)
2020-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 00965b9fa9a8 to 051c6fed884b (5 revisions)
2020-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 03d0006b6d5e to 04f0b691eb4c (1 revision)
2020-06-17 syoussefi@chromium.org Vulkan: Disable 1xMSAA on integer formats too
2020-06-17 syoussefi@chromium.org Add mipmap generation perftest
2020-06-17 timvp@google.com Vulkan: support format aliasing in texture images
2020-06-17 m.maiya@samsung.com Optimize thread specific storage and retrieval with native ASM
2020-06-16 joefspiro@google.com Fix includes to fuchsia headers
2020-06-16 timvp@google.com Remove ProgramExecutable::mProgram[Pipeline]State
2020-06-16 stuartmorgan@google.com Fixes missing newlines in headers
2020-06-16 syoussefi@chromium.org Vulkan: Use GPU path for copy to sRGB textures
2020-06-16 timvp@google.com Remove mProgramState from ProgramExecutable::isCompute()
2020-06-16 timvp@google.com Remove mProgramState from ProgramExecutable::updateActiveImages()
2020-06-16 m.maiya@samsung.com Vulkan: Ensure tiling mode compatibility while deciding copy path
2020-06-16 jmadill@chromium.org Vulkan: Preserve RPs on XFB changes when possible.
2020-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from a6940c8e6eb0 to 8cbee4107cf1 (1 revision)
2020-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 30bf46dbe06f to 52a5f074e9bb (1 revision)
2020-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from b919bc889e1d to 00965b9fa9a8 (4 revisions)
2020-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from f78d05969e09 to 03d0006b6d5e (4 revisions)
2020-06-16 syoussefi@chromium.org Refactor 3D/2DArray copy texture tests
2020-06-16 syoussefi@chromium.org Vulkan: Fix glCopyTextureCHROMIUM if source is swizzled
2020-06-16 jmadill@chromium.org Tests: Add missing Android build arg.
2020-06-15 m.maiya@samsung.com Vulkan: Set external image's usage flags based on AHB usage flags
2020-06-15 shrekshao@google.com Fix baseVertex and baseInstance with streaming attributes
2020-06-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from a60f89ffcba2 to bfa95c7ad8b7 (7 revisions)
2020-06-15 geofflang@chromium.org Revert "Remove redundant BlendStateArray tracking"
2020-06-15 geofflang@chromium.org Don't expose pixmap support from DisplayEGL.
2020-06-15 m.maiya@samsung.com Vulkan: Addition of ImageRespecificationTest
2020-06-15 jmadill@chromium.org Add timer and frame counter to SimpleTexture2D.
2020-06-15 nguyenmh@google.com Fill in missing GL methods for TextureTest
2020-06-15 nguyenmh@google.com Fill in missing GL methods and fix crashes for MultiviewDrawTest
2020-06-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 5fab7f82a548 to f78d05969e09 (12 revisions)
2020-06-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 458140aed907 to 30bf46dbe06f (2 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 djsollen@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:1078330,chromium:1085996,chromium:1091259,chromium:1094634
Tbr: djsollen@google.com
Test: Test: Build/CQTest: Test: angle_end2end_testsTest: Test: angle_end2end_tests.exe --gtest_filter=ImageRespecificationTest*Test: Test: dEQP-GLES31.functional.image_load_store.*.format_reinterpret.*
Change-Id: Iffef0daccf39d5bfbe5e9e4554562219296ee5c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297377
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-18 15:36:28 +00:00
Ravi Mistry
346f8e0989 Change URL in skia_css3gradients_desktop.py
NoTry: true
Bug: skia:10390
Change-Id: I8afbf6303d9f42966456174381fa56909d9b1f53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296732
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-06-18 15:36:18 +00:00
Brian Salomon
f629a9022f Make Clip test FP use texture effect child
Bug: skia:10139

Change-Id: I32d13b11b613996f4b83e3cf50e28993985bcb08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297061
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-18 15:31:23 +00:00
Brian Salomon
83c2d35155 Use child effects for LUTs in perline noise effects
Bug: skia:10139

Change-Id: Ie7e4cf0cd583c8cb6eafd7ab30b729ee755f5042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297060
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-18 15:31:15 +00:00
Brian Salomon
99b047087d Update generated file
Change-Id: I4c390efa29c0957596c877d34a485975268dfe3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297356
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-18 14:44:23 +00:00
Brian Salomon
71f6cfd654 GrRRectBlurEffect uses child for nine patch
Bug: skia:10139

Change-Id: Ic306775bb8d1f5d8b29cc38c116d0f8c3e0d55a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297193
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-18 14:08:54 +00:00
Dominic Mazzoni
8c662a7d6e Get rid of deprecated API to add children to PDF tag nodes.
fChildren/fChildCount was replaced with fChildVector and Chromium
migrated to the new API a while back, it's now safe to remove the
older interface.

Bug: chromium:607777
Change-Id: I7311d3b51f1b71209dcc024ae51637536d560619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297260
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-06-18 13:57:23 +00:00
Greg Daniel
a85e4bf009 Fix perspective fragcoord value in d3d.
The general issue is that d3d returns a fragcoord with the "w" coord
is given as w. But gl, vulkan, and others get a 1/w. So skia assumes
a 1/w value here. Thus we must flip for d3d.

Change-Id: I4ff9fb363310c1ca52e631246413ab76322def54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297182
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-18 13:52:43 +00:00
Brian Osman
a43d820341 Support sample() in ByteCodeGenerator (but not the interpreter)
This doesn't implement sampling of child shaders (that's going to be
nearly impossible in the interpreter). But it does plumb the information
about sample calls to the byte code, so that SkVM can attempt to
translate those calls into evaluation of child shaders.

Change-Id: I3762eb7a613e4377d482a50f2dc301075d89ce36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297192
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-18 13:42:03 +00:00
Brian Salomon
86b2f39e9e Use child effect for integral in GrRectBlurEffect
Bug: skia:10139

Change-Id: I716e94dfda7091482baeb830e4d2d232cb3fcbcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296857
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-18 13:39:25 +00:00
Derek Sollenberger
74b06275bb Manually update ANGLE DEPS
Recent ANGLE changes require BUILD.gn updates to make use of new
zlib functions as well as changes to SystemInfo that requires adding
new source dictionaries to our list of build sources.

Bug: skia:10391
Change-Id: I993a9f78e4585618ad4cd16b3bfc81874d7b5b17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297116
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-18 12:50:02 +00:00
Brian Salomon
81454dfaa9 Use hardware wrap mode in perlin noise effects.
Previously textures were sampled in clamp mode with
the wrapping ocurring in shader code.

Change-Id: Id4fcba6525e6c0664aa9fafb6c11a4bb62433c72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297059
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-18 12:33:34 +00:00
skia-autoroll
53f973c22a Roll SwiftShader from 763957e6b4fc to 7a1d99d0be42 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/763957e6b4fc..7a1d99d0be42

2020-06-17 capn@google.com Add a benchmark with multisampling enabled
2020-06-17 capn@google.com Refactor multisample benchmark support
2020-06-17 capn@google.com Implement multisample support for the triangle benchmark
2020-06-17 capn@google.com Don't assert thread_local initialization

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC djsollen@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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: djsollen@google.com
Change-Id: If8b154022ac3fffec1d28c472d71102e4d2354f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297266
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-18 04:42:52 +00:00
skia-autoroll
67237c14a6 Roll Chromium from 5af39e89bd12 to 2adbb514e789 (484 revisions)
5af39e89bd..2adbb514e7

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC djsollen@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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: djsollen@google.com
Change-Id: I34d329affa7a6a829bd8697742659d7b40d4863a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297269
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-18 04:39:22 +00:00