Commit Graph

58507 Commits

Author SHA1 Message Date
John Stiles
71f7880bb6 Emit trace_scope ops from SkVM code generation.
These will give the debugger enough information to discard variables as
they fall out of scope.

Change-Id: Ia400e82a3ca9cf0a51a72d819f897d346979226c
Bug: skia:12741
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484556
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-12-15 01:05:34 +00:00
Ravi Mistry
d337cf94a0 Add documentation about GPU Gardener and OSS-Fuzz bugs
Bug: skia:12695
Change-Id: If9b58b1c7f5266e96bae39132886aca23fd1918d
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484676
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-12-14 23:10:02 +00:00
John Stiles
b2284b2b82 Factor out mergeMasks into a helper method.
Change-Id: Iacbfa9c461669733938422d151820da37f78cb6c
Bug: skia:12741
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484678
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>
2021-12-14 22:58:56 +00:00
Brian Osman
fde20db7ca Rename SkSL's 2D cross product builtin function
Note that the 2D cross product isn't defined. There are at least two
possible interpretations of what that might mean. This name makes it
clearer that we're asking for the length of the resulting vector, if
we computed the 3D cross product (assuming Z == 0 for both vectors).

It also eliminates name overlap between builtin functions and actual
intrinsics.

Change-Id: I24e8bc0ab2ec91aaace20f0dd3e8565c10bd44a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484440
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-12-14 22:00:26 +00:00
John Stiles
09adf0bfc3 Add new SkVM trace op 'trace_scope' to track SkSL scope depth.
This CL adds the trace op and tests the builder commands, but it is not
yet hooked up to the SkVM code generator or debugger.

Change-Id: Iaa64293dfd0973e299eb480cb2b43672b0886c32
Bug: skia:12741
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484439
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-12-14 21:56:41 +00:00
Greg Daniel
749cbeb814 Remove workaround for not executing no op discard OpsTask.
This should fix the Vulkan validation warnings about have a render pass
with a 0 area bounds.

There are times in Skia (when not doing reduced op list splitting),
where we get a new offscreen surface, discard it, then get a second
offscreen before submitting any draws to the first yet. This causes us to
have an OpsTask for the first with a discard load but no ops. When we
get back to this first surface to add real ops it will have a load load.
Correctness wise we could drop the first OpsTask since it doesn't have
any affect (what the validation warning in this bug is referring to).

This original workaround was there to appease a different vulkan
validation warning about loading unitialized memory at the start of a
render pass. If we drop the discard then the validation would complain
the load (on the second OpsTask) was happening on unitialized memory.
However, with the workaround removed I no longer am getting such a
warning both with and without reducedOpListSplitting. So either we are
now avoiding this case via something else higher up or maybe this warning
was removed from the validation. Or I just can't get a good test case
for it. It does not repro running Skia gm or tests, or running chromes
test case for the 0 area render pass bounds.

Bug: chromium:1279794
Change-Id: I11ad5ce4e0000da74805a4cd9a0a9207d5adf60a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484562
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-12-14 21:49:36 +00:00
Jorge Betancourt
68e240d9cd add sharpen effect support to skottie player
Change-Id: I3242897c00b3cbe84c5ec964831df0fd4ae45622
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481556
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-12-14 19:44:26 +00:00
Julia Lavrova
f74c7893fc Introduce SkVM Op::duplicate to localize visualization code
Change-Id: Ic343b1dcddb74d31c768afa67ab78955af418c9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483603
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-12-14 18:51:41 +00:00
Derek Sollenberger
04a9672c0a Add Android Framework specific logging to SkSurface::MakeFromBackendTexture
This is an attempt to get more diagnostic information when an SkSurface fails
to be created.

Bug: b/206415266
Change-Id: I536417e1a6d1f0f99e5e9e41e2fee43f7aa9b464
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484338
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2021-12-14 17:04:22 +00:00
Maksim Ivanov
16d3cc04cc Fix use-after-move in GrVkRenderTarget
Fix a use-after-move issue in GrVkRenderTarget, as found by clang-tidy:

  gpu/vk/GrVkRenderTarget.cpp:67:
  'resolveAttachment' used after it was moved
  gpu/vk/GrVkRenderTarget.cpp:62:
  move occurred here

Bug: chromium:1122844
Change-Id: I4f65784cc1d8e39fb60ce3439e316a9dc399eca8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484178
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-12-14 16:49:08 +00:00
Jim Van Verth
5120749c9d Add missing comment.
Meant to add this as part of
https://skia-review.googlesource.com/c/skia/+/483596

Change-Id: I2d5ab327b786d74ad5c96eaad5dde79676fce1ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484340
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-12-14 16:08:01 +00:00
John Stiles
708f28f4b1 Show the stack trace in the Debugger slide.
Right now it is non-interactible, but it's still useful for keeping
track of the flow of execution.

http://screen/4b6WMGdw6j32AGc

Change-Id: I978d9b441c15674c6cae508b123579021c2ecc46
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484076
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-12-14 15:56:44 +00:00
John Stiles
80d2a50d4b Move newly-updated variables to the top of the Variable list.
Previously, the variable pane listed variables in slot order, which was
not very helpful (other than usually mapping to a top-to-bottom order in
the original source code). Now, the variable pane sorts variables to the
top when they are modified, and maintains their relative order
throughout execution. This is much easier to follow.

http://screen/C9odSHV4asFSLZH

Change-Id: Id86adf745207451a38a4dc46756f316e8d86bf81
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483958
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-12-14 15:53:14 +00:00
Maksim Ivanov
e3c0d7356c Fix use-after-move in GrResourceAllocator
Fix a use-after-move issue in GrResourceAllocator::Register, as found by
clang-tidy:

  gpu/GrResourceAllocator.cpp:116:
  'scratchKey' used after it was moved
  gpu/GrResourceAllocator.cpp:111:
  move occurred here

Bug: chromium:1122844
Change-Id: I8f00c6c82ae25a12045b6c101c608b52b90a51d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484177
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-12-14 14:24:19 +00:00
Maksim Ivanov
ecbad28361 Fix use-after-move in GrPixmapBase
Fix a use-after-move issue in GrPixmapBase, as found by clang-tidy:

  gpu/GrPixmap.h:65:
  'info' used after it was moved
  gpu/GrPixmap.h:64:
  move occurred here

Bug: chromium:1122844
Change-Id: I7403805e3e63592119b66c1e5840bc48d5e33832
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484176
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-12-14 14:04:00 +00:00
skia-autoroll
d26057a2c0 Roll ANGLE from a1b9eb68e417 to 42bd4fc29aea (14 revisions)
a1b9eb68e4..42bd4fc29a

2021-12-14 johncunningham@apple.com Metal: add ANGLE_metal_create_context_ownership_identity.
2021-12-13 j.vigil@samsung.com EGL: Add queries for EGL_KHR_protected_content
2021-12-13 gman@chromium.org Metal:Add debug info for shaders
2021-12-13 jmadill@chromium.org Frame Capture: Merge small frames into single sources.
2021-12-13 syoussefi@chromium.org Vulkan: Remove VK_EXT_swapchain_colorspace check
2021-12-13 jmadill@chromium.org Reduced "rx::vk::kInFlightCommandsLimit" from "100" to "50".
2021-12-13 lfy@google.com Vulkan: fix crash when clearing stencil
2021-12-13 ynovikov@chromium.org Skip GLSLTest_ES31.StructAndArrayEqualOperator on Pixel 4
2021-12-13 jmadill@chromium.org Frame Capture: Don't unmap regenned buffers in reset.
2021-12-13 jmadill@chromium.org Frame Capture: Clear array buffer binding in MEC.
2021-12-13 bsheedy@chromium.org Suppress Mac 12 failure
2021-12-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 267fa481ccad to a0a6270b47e4 (7 revisions)
2021-12-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4c62980da8c1 to 592d413edb56 (4 revisions)
2021-12-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 6214b401e0c5 to 30aeba8927a2 (473 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 bungeman@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: bungeman@google.com
Change-Id: I7d6687c3777f1dfe83717d2ce04f84764debbc83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484197
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-12-14 05:31:55 +00:00
Maksim Ivanov
2ca96704ee Fix use-after-move in SkPDFDocument
Fix a use-after-move issue in SkPDFDocument, as found by clang-tidy:

  pdf/SkPDFDocument.cpp:222:
  'metadata' used after it was moved
  pdf/SkPDFDocument.cpp:213:
  move occurred here

Bug: chromium:1122844
Change-Id: Ibcc09353af431f1389a2c80a3b94acb345b4f809
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484179
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-14 04:51:47 +00:00
skia-autoroll
c176f42d37 Roll Chromium from 97fa68dda69c to 2a828cdcb654 (441 revisions)
97fa68dda6..2a828cdcb6

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 bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Chromium: https://bugs.chromium.org/p/chromium/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: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: bungeman@google.com
Change-Id: I92eaea2c6cf3ee9483726694c96ba7f37c5ca58c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484216
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-12-14 04:48:57 +00:00
skia-autoroll
33c28b9fa9 Roll Dawn from ffb0024a8970 to d3cac111b662 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/ffb0024a8970..d3cac111b662

2021-12-14 junwei.fu@intel.com Template hardcode functions in webgpu_cpp.cpp
2021-12-14 shrekshao@google.com Further api.h license issue fixes
2021-12-13 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 8991bf5460b6 to ea03bf47e50f (7 revisions)
2021-12-13 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d733fdb85cbf to 654149fd6938 (3 revisions)
2021-12-13 cwallez@chromium.org dawn.json revert to the "callback" name for callback arguments
2021-12-13 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5923803f7e84 to d733fdb85cbf (1 revision)
2021-12-13 cwallez@chromium.org Roll GN
2021-12-13 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from a1b9eb68e417 to 8991bf5460b6 (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 5923803f7e84 to 654149fd6938

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 enga@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/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-Debug-Dawn
Bug: None
Tbr: enga@google.com
Change-Id: I10798a47a43ae1f50b6752e6111f95e68bb342ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484196
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-12-14 04:38:57 +00:00
Jason Simmons
ddbf93159f Move Run per-glyph data into an object held in a shared_ptr
This will reduce memcpy overhead when runs are copied into a paragraph
or when paragraph cache entries are read or written

Change-Id: Id81725f3d8fc70daa17d154093ae7bc8b519118c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483022
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2021-12-13 22:24:30 +00:00
John Stiles
0745d19ae3 Hide function return values after a step.
Previously, return values like `[func].result` would stick around in the
Variables table indefinitely. This felt very counterintuitive. Now they
only appear for one step, then vanish.

Change-Id: Iedfc7d2ddf136111005b26aaefb380ffc6281d05
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483605
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-12-13 22:14:35 +00:00
Michael Ludwig
fdae1b765f [graphite] Clear depth/stencil attachments to 0
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12700, skia:12703
Change-Id: I0d32b2542bf779c2e2229ad3f56eca2129ff3b8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483521
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-12-13 21:55:48 +00:00
Michael Ludwig
3ad6e531c3 [graphite] Fix instance vs. non-instanced detection
Previously, non-instanced draws that needed a base vertex because of
dynamic state would cause useNonInstancedDraws to be false, and then
the recorded draw calls are wrong.

This also tweaks the logic to be useInstanceDraws instead since the
layers of negation were getting annoying to reason through.

Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I370d06528055de5412e29710906ce1a76e1bd7c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483520
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-12-13 21:30:58 +00:00
Michael Ludwig
64ed6fdc87 [graphite] Embed SkPathFillType into Renderer definitions
The fill types require different stencil settings to implement, but
the stencil settings are fixed for a RenderStep. This means that each
fill type requires its own Renderer.

Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I9a8e3546555308835c2a11d7e2b54f36470dc297
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483518
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-12-13 21:19:46 +00:00
John Stiles
49cb6d7668 Add a Variables pane to the SkSL debugger.
The currently-active stack frame is always shown. Values which were
modified during the last step action are highlighted.

http://screen/4E4BLXYJsDR5bhk

Change-Id: I521d92fa6c1eabd64aaeeb188c71f04a79f827f5
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483602
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>
2021-12-13 20:29:26 +00:00
John Stiles
0385de0f88 Add helper method to get the human-readable value of a slot.
We already had this logic in SkVMDebugTrace::dump; it just needed to be
factored out so that it could be accessed directly.

Change-Id: Ib497b82a7722b8ac2285de74f1937379c2f9a51b
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483600
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-12-13 19:57:28 +00:00
Jim Van Verth
c46b4d0a48 Add divide-by-zero check to GrGenerateDistanceFieldFromPath
Bug: oss-fuzz:32768
Change-Id: I9273ba1242a0f61dc5b26b2651400b4b46dd3992
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483596
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-12-13 19:54:28 +00:00
John Stiles
9247feb52c Report slot updates using a dirty mask.
By tracking slot writes using a dirty mask, and reporting these in the
VariableData, we will be able to highlight assigned-to variables in the
debugger.

Change-Id: I93a767095c9c1b6dedc55a08424649f83aa1c960
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483598
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-12-13 19:26:43 +00:00
Jim Van Verth
e4bccab4ac Fix divide-by-zero in AAConvexTessellator.
Bug: oss-fuzz:32385
Change-Id: I048e5a55430c0c968b858b0ac25d077a35332e02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483519
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-12-13 19:10:34 +00:00
Herb Derby
5d6e51dbec remove SK_EXPERIMENTAL_ADD_ATLAS_PADDING from Skia
As of the following Chromium CL the flag
SK_EXPERIMENTAL_ADD_ATLAS_PADDING is no longer used.

https://chromium-review.googlesource.com/c/chromium/src/+/3332838

Change-Id: I026b736dc26268fbe888fd3a8b56d056f4127e36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483597
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-13 18:52:03 +00:00
Herb Derby
8dc9a337ab rename GrTextBlobCache to GrTextBlobRedrawCoordinator
Change-Id: Ib1ea2936f7a9431bc62c04b1931cf6da2c213b36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483496
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-13 17:38:00 +00:00
John Stiles
fbb743377a Add method to get the suffix for a trace's slot.
We already had this logic in SkVMDebugTrace::dump; it just needed to be
factored out so that it could be accessed directly.

Change-Id: Idd6c92d23ab4dddc60fdc3c7b1693a0d89b1c992
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-12-13 16:54:33 +00:00
John Stiles
5d3060ed94 Add support for stepping out from a function.
Stepping out is extremely similar to stepping-over, so this was mostly
working already.

Change-Id: Ib1c1ba96b45a732500e72b6da4cbfe41a1f75307
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483196
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-12-13 16:43:49 +00:00
John Stiles
a26ba3e51b Improve the debugger code view.
The raw text has been replaced with a proper table. Stepping through
code now scrolls properly to focus on the current line. The ASCII "->"
arrow has been replaced by a focus highlight. The top controls no longer
scroll away when browsing code.

http://screen/BnTa3thYzUgTTdG

Change-Id: Ieaa3a479099bbd09d9ba2cb5552befdd5307f9c5
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483156
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-12-13 16:43:23 +00:00
John Stiles
00b3fcccdf Create Debugger slide for Viewer.
This is a very rough first draft which provides the bare minimum. Shader
source is dumped to the window as static text, along with an arrow
tracking the current trace line. Two buttons allow for single-step and
step-over. There aren't yet any GUI affordances for the stack or
variables.

http://screen/44WAnxchjy8MPjM

Change-Id: Ifad4a146b54d334113b02132eec2238af4fd8580
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481681
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-12-13 16:28:06 +00:00
skia-autoroll
507884bf3d Roll ANGLE from 3be551d7c2c5 to a1b9eb68e417 (18 revisions)
3be551d7c2..a1b9eb68e4

2021-12-11 gman@chromium.org Replace IOSurfaceSurfaceEAGL.mm table with less strict padding
2021-12-11 kpiddington@apple.com Metal: Fix M1 and iOS synchronization for readPixels
2021-12-11 gman@chromium.org Metal: Add maximum render target size validation
2021-12-11 gman@chromium.org Add early out validation in drawArraysCommon
2021-12-11 gman@chromium.org Metal: Refactor restartRange cache
2021-12-11 gman@chromium.org Metal: Fix Instanced Draw feature support on Simulator
2021-12-11 gman@chromium.org Metal: Refactors from Webkit
2021-12-10 gman@chromium.org Metal: Merge changes to mtlPixelFormatTable
2021-12-10 lubosz.sarnecki@collabora.com Reland "system_utils: Add memory protection functionality."
2021-12-10 jmadill@chromium.org Trace Tests: Ensure zillow runs on SwiftShader.
2021-12-10 abdolrashidi@google.com Update the arg types for glMultiDraw*IndirectEXT()
2021-12-10 sugoi@google.com Add debug info when loading EGL entry points fails
2021-12-10 penghuang@chromium.org Enable GL_ANGLE_texture_usage extension
2021-12-10 penghuang@chromium.org Use STL container for vulkan memory allocator
2021-12-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 38603b300bce to 267fa481ccad (8 revisions)
2021-12-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4625f84e8d56 to 4c62980da8c1 (6 revisions)
2021-12-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e1fa86b1827a to 6214b401e0c5 (1064 revisions)
2021-12-10 polynomialspace@gmail.com fix typo: 'choromium' -> 'Chromium'

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 bungeman@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: bungeman@google.com
Test: Test: angle_unittests --gtest_filter="SystemUtils.PageFaultHandler*"
Change-Id: I005ca3156433898e15c5a1189f08868e38ce054b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483377
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-12-13 05:24:55 +00:00
skia-autoroll
a99933139d Roll Chromium from ef37f0f232c3 to 97fa68dda69c (498 revisions)
ef37f0f232..97fa68dda6

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 bungeman@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Chromium: https://bugs.chromium.org/p/chromium/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: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: bungeman@google.com
Change-Id: I4c7e622bfad8010bbd9465e9ce0b05f11240e6f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483378
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-12-13 05:00:25 +00:00
skia-autoroll
19f7b34f4b Roll Dawn from 1f25ea94bbb7 to ffb0024a8970 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/1f25ea94bbb7..ffb0024a8970

2021-12-13 jie.a.chen@intel.com Support NV12 via ExternalImageDescriptorDmaBuf on CROS
2021-12-11 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 56aee5d6407f to a1b9eb68e417 (8 revisions)
2021-12-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from ac9b2703e8fa to 56aee5d6407f (9 revisions)
2021-12-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 30d55fabc91f to 5923803f7e84 (1 revision)
2021-12-10 cwallez@chromium.org Vulkan: make PNextChainBuilder require pNext==nullptr
2021-12-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 0fe30b52a5c9 to 30d55fabc91f (18 revisions)
2021-12-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 663831aa676c to ac9b2703e8fa (2 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 0fe30b52a5c9 to 5923803f7e84

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 file a bug in Dawn: https://bugs.chromium.org/p/dawn/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-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I45bb2fbb41e78a900fc66532f9b8d83f191e7e0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483376
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-12-13 04:38:32 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
87025fe5b3 Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I558f07c9ee81d7179764235847754be346812b2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483267
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Bot-Commit: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-12-12 08:20:26 +00:00
skia-autoroll
d393ab3972 Roll SK Tool from a3fbba5857f1 to 6380ad5ed012
https://skia.googlesource.com/buildbot.git/+log/a3fbba5857f1..6380ad5ed012

2021-12-12 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update CIPD Packages

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC erikrose@google.com on the revert to ensure that a human
is aware of the problem.

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

Tbr: erikrose@google.com
Change-Id: I8e71fd2675394cec5c0c97311b068199afbdcff5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483257
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-12-12 05:54:55 +00:00
Jim Van Verth
454c04e8f3 [graphite] Add shader error handling
Change-Id: I21743290128140bef729eef967e841a65f9fdc67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482702
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-12-11 00:18:22 +00:00
Jim Van Verth
db9f95c888 Move ShaderUtils out of Ganesh.
This will allow us to use ShaderUtils in both Ganesh and Graphite.

Change-Id: I78e34c4eb969a0d827c459d7fb945d17fdc22efa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482696
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-12-10 23:10:25 +00:00
John Stiles
5d5f24e814 Move SkVMDebugTrace into src/sksl/tracing.
Change-Id: Id4fc455f0eb23aa8d9b6f5474be7f6eba71c48de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482698
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-12-10 21:58:01 +00:00
John Stiles
f3b4617828 Create SkVMDebugTrace player class.
This class is responsible for interpreting a debug trace and allowing it
to be stepped through, like a debugger. It tracks the current line
number, call stack, slot values, and associates slots with stack frames.
It supports stepping forward or stepping over (i.e., stepping to the
next line in the current function, hiding function calls).

Change-Id: I2b7d90c3b38b0006bebdfbf65a7bf678d5227d56
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-12-10 21:57:58 +00:00
Herb Derby
c279e7640b add bilerp atlas support flag
Move the compile-time flag SK_EXPERIMENTAL_ADD_ATLAS_PADDING,
to a runtime flag in GrContextOptions.

Bug: chromium:1275890

Change-Id: I7e051cd4834ac44958b1431976535519e8bdaa3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482416
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-10 20:33:57 +00:00
Herb Derby
0f2390f7fb move SkRemoteGlyphCache.h to private
Chromium has been using the remote glyph cache for a few years now.
It's time to give it a proper home.

This is an intermediate CL. The old .h file includes the new .h file.
After I change the include paths in Chromium, I will delete the old
file.

Change-Id: Iaf00c46aa0698326c0bdec9a0eed218bcc3e334e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482700
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-10 20:20:56 +00:00
John Stiles
1786647583 Improve debug trace generation speed by clipping the paint.
When generating a debug trace, we disable most optimizations, pessimize
the SkVM code with many additional instructions, and run the interpreter
instead of the SkVM JIT. Additionally, while under development, viewer
is generally compiled in -O0. All of these changes made it painfully
slow to generate the debug trace of a complex shader, even though we
only care about tracing a single pixel of the paint.

Now, when taking a debug trace, we clip the paint to a small 4x4 area
surrounding the trace coordinate for a single frame. This makes debug
traces run very quickly, even on a modest laptop CPU.

Change-Id: Ibcadc20a8d83a3a241e05408b8af31d61cf03d4c
Bug: skia:12666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482701
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>
2021-12-10 20:13:00 +00:00
Herb Derby
4d35c0d31d relocate GrTextBlob creation to GrTextBlobCache
Move the GrTextBlob creation code to GrTextBlobCache allowing
more cache calls to be private.

Change-Id: I9ecb732c066ef7dadf8bc478a8b4d3dea8c292a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482697
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-12-10 18:56:35 +00:00
John Stiles
b1a97caf71 Revert "Trace function return values after function-exit."
This reverts commit 85cc1bece7.

Reason for revert: ends up not being useful after all

Original change's description:
> Trace function return values after function-exit.
>
> This will allow function return values to be easily seen when stepping
> "over." This has the unexpected side benefit of generating slightly
> fewer ops when a function has unoptimizable conditional returns.
>
> Change-Id: I48d23de635d3caaddff91aa595593d0371dfcdcb
> Bug: skia:12708
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481076
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Bug: skia:12708
Change-Id: I61ebb175b60d2060f6ad21b170238b37557b80be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482458
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-12-10 18:06:04 +00:00
Brian Osman
f693b20c37 Add gdbserver instructions to site docs
Change-Id: I13ba477d5b390a0fc03cd4960b6a19bcaa4266d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482699
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2021-12-10 16:41:09 +00:00