Commit Graph

60423 Commits

Author SHA1 Message Date
Florin Malita
722d1c0679 SkM44::LookAt: handle zero-length vectors gracefully
Zero-length vectors cannot be normalized.

Bug: oss-fuzz:38738
Change-Id: I6c5f4114f70a8a9f03afc1cd70c871e6b6b520ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536637
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-05-04 15:05:35 +00:00
Brian Osman
efb1290cdf Add Mac ANGLE test bots
Bug: skia:13272
Bug: skia:13289
Bug: skia:13290
Bug: angleproject:7145
Bug: angleproject:7245
Change-Id: I2d56408126bcd40f0aba66b14020cb8e04624c2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536497
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-05-04 14:55:27 +00:00
Michael Ludwig
3afac9e553 Remove patch/HW tessellation concepts from GrTessellationShader
Bug: skia:13263
Change-Id: I045f7c3b5d0ea27fd231309ac4af275257bebf33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534202
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-04 14:07:33 +00:00
Herb Derby
33583b9c36 Add initializer class to improve safety of AllocateClassMemoryAndArena
Change-Id: If5f14828029473afef25c5ef69db3971796cdfc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537076
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-04 14:04:48 +00:00
Kevin Lubick
ad09d4b41d [bazel] Make presubmit for new Bazel files
Change-Id: Ie36fc895736999375d9a4b19fabeea7b64c81631
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537116
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-05-04 14:03:55 +00:00
Ravi Mistry
716447510a [infra] Make bot that runs DM on the oldest supported SKP version
There are two SKP versions we deal with here:
* The min and current supported versions in src/core/SkPicturePriv.h.
* The SKP asset version that is incremented weekly in infra/bots/assets/skp/VERSION.

We will need to update the asset version used by the bot when the min version in src/core/SkPicturePriv.h is updated.
Instructions on how to do that have been documented in src/core/SkPicturePriv.h.

As noted in https://bugs.chromium.org/p/skia/issues/detail?id=13278#c2 DM currently does not fail when it fails to parse an SKP. Till DM is updated to fail, developers will have to look for blank images in Gold via this new bot to determine when we are failing to support the oldest SKP version.

Bug: skia:13278
Change-Id: I8fff62cc289c3bd6abf5179bcee349baf0a8188a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536106
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-05-04 13:35:10 +00:00
Robert Phillips
6cd730f8f2 [graphite] Remove custom glue code for local matrix and blend shaders
We now pass the child output variable names into the snippet code after
all the uniforms.

This leaves the following 3 custom glue code generators:

GenerateImageShaderGlueCode          -- sampler
GenerateFixedFunctionBlenderGlueCode -- prior stage's output
GenerateShaderBasedBlenderGlueCode   -- dst read & prior stage's output

Bug: skia:12701
Change-Id: I9185d8f292cc45d351218b95fa6d7d70d639e2f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536098
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-05-04 13:17:29 +00:00
Kevin Lubick
33fe2f5609 Fix G3 Build
I need to add a presubmit that verifies our BUILD.bazel files
(i.e. the new ones) have the appropriate header.

Change-Id: I368d8e773aa59ff17b6d81812c67cb849c0a08fc
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536881
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-05-04 11:30:35 +00:00
skia-autoroll
b80fb89600 Roll vulkan-deps from 3b9b5a7559f3 to 1ebd98d952fa (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/3b9b5a7559f3..1ebd98d952fa

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC jlavrova@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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: jlavrova@google.com
Change-Id: I4411e5c8b10ac95f2f5bb8e76be6cab4873d403a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537016
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-04 08:14:20 +00:00
skia-autoroll
c4f818e10a Roll ANGLE from 5113ae8ef06a to edd331ebeef5 (12 revisions)
5113ae8ef0..edd331ebee

2022-05-03 abdolrashidi@google.com Traces: Add a device arg to restricted_trace_perf
2022-05-03 m.maiya@samsung.com Consolidate handle list before pushing to mReleasedList
2022-05-03 jmadill@chromium.org infra: Remove some slow *SAN tests.
2022-05-03 senorblanco@chromium.org D3D11: fix BufferToTexture copy when UNPACK_ROW_LENGTH is set.
2022-05-03 antonio.caggiano@collabora.com Re-land: "Vulkan: Support Wayland"
2022-05-03 yuxinhu@google.com Basis Universal Texture Experiment
2022-05-03 jmadill@chromium.org Fix validation cache when deleting a Transform Feedback.
2022-05-03 ynovikov@chromium.org Skip flaky tests on Win ASAN
2022-05-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1cde45b8d7aa to 4ca7acf89869 (6 revisions)
2022-05-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from adef92e7b4c6 to cdf43bd816d7 (8 revisions)
2022-05-03 ynovikov@chromium.org Revert "Re-land: "Vulkan: Support Wayland""
2022-05-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 929311ac6298 to 55c89a3a09ac (470 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 jlavrova@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: jlavrova@google.com
Test: Test: HandleAllocatorTest.ConsolidateRangeDuringRelease
Change-Id: I114db8ed57a7709160a5d1fde121857a453a9443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536957
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-04 05:53:44 +00:00
skia-autoroll
c442a9405b Roll Chromium from 8a1d55bd2528 to 2635a346f46f (504 revisions)
8a1d55bd25..2635a346f4

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 jlavrova@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: jlavrova@google.com
Change-Id: Ic719b530f8a1afaee5753a3292067a501b3f4227
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536959
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-04 04:55:20 +00:00
skia-autoroll
c0ccfe748b Roll SwiftShader from cdf43bd816d7 to ae17ef6d12d8 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/cdf43bd816d7..ae17ef6d12d8

2022-05-04 capn@google.com Always enable MemorySanitizer instrumentation for sampling routines
2022-05-03 capn@google.com Handle instrumentation of scalar single-precision (_ss) intrinsics
2022-05-03 nicolascapens@google.com Revert "Always enable MemorySanitizer instrumentation for vertex routines"

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

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jlavrova@google.com
Change-Id: If48e13a685f46249eaaea833f99139257719bc98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536958
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-04 04:51:24 +00:00
skia-autoroll
7425ab9c6d Roll Dawn from a1a3e0484c48 to 9483b741a884 (10 revisions)
https://dawn.googlesource.com/dawn.git/+log/a1a3e0484c48..9483b741a884

2022-05-03 enga@chromium.org Mark requestDevice_limits:supported_limits:* RetryOnFailure
2022-05-03 enga@chromium.org Roll third_party/webgpu-cts/ 547d67bc2..249f2b79 (8 commits)
2022-05-03 bclayton@google.com dawn/node: Roll to latest IDL
2022-05-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cdf43bd816d7 to c75846ead9a0 (1 revision)
2022-05-03 bclayton@google.com tools: More CTS tooling improvements
2022-05-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from e39dfe0fe61c to 84e42c3b04da (30 revisions)
2022-05-03 bclayton@google.com tint: Fix indentation in code templates
2022-05-03 bclayton@google.com run-cts: Default enable colors iff stdout is a terminal.
2022-05-03 bclayton@google.com tint: Fix `[chromium-style]` auto pointer warnings
2022-05-03 bclayton@google.com tint: Don't generate 'smoothStep' tests

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 amaiorano@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: amaiorano@google.com
Change-Id: Ic7dcca1a1aaf3de4a8a3ebbf4ca1295fa84fb95b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536956
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-04 04:35:24 +00:00
Arman Uguray
47454bb404 Add Dawn Ubuntu18 test job
Added Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn
to exercise the Dawn Vulkan backend.

Change-Id: I3679822a1460eda36654f99c70ba9510e394b40c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536736
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-03 22:21:35 +00:00
Aditya Kushwah
a696f8a925 Plumb label from GrGpu's createTexture function.
In this CL, GrResourceProvider's functions, like createTexture etc,
get label string passed to it which are called from GrGpu which then
passes the label to setLabel method of GrGpuResource.

Bug: chromium:1164111
Change-Id: Icfd88279c0729e36c105c62c05f382aab0a89310
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534778
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-05-03 21:39:19 +00:00
Greg Daniel
16aa3fc458 Update linux_vulkan_sdk asset.
Change-Id: I66042889bb4be891b1168329ff981f869d483d1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536520
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-05-03 21:07:55 +00:00
Brian Salomon
f327ef899d Fixup GrDriverBugWorkaroundsAutogen.h
Bug: chromium:1319451
Change-Id: Ibd0187c4d80fa64f2d9eb3aa61da04857ecb9db9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536836
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-03 20:20:26 +00:00
Jorge Betancourt
72f6c42ed8 [skottie] render particles through transform tracker decorator
Change the way we transform the matrix on render for specific decorations

Change-Id: I3112c38a95cd1473e9e9c5bfff9eac09e20f6016
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536101
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2022-05-03 20:05:21 +00:00
Kevin Lubick
6065793294 [infra] Run generated files check when gpu_workaround_list changed
Change-Id: If7618a57e216790834530b9fdfd09550c35c3bc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536807
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2022-05-03 19:50:58 +00:00
skia-autoroll
fdfdfe3128 Roll vulkan-deps from 4957ae734445 to 3b9b5a7559f3 (7 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/4957ae734445..3b9b5a7559f3

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross from a9d23d765238 to 0c8a79b0b5c7
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers from 46b7918218d0 to b765c355f488
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 46492aa45ae5 to 58dc37ea6af7

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC jlavrova@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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: jlavrova@google.com
Change-Id: I973b0754de6dfee461c74bafce3292912ff36eca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536702
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-03 19:37:49 +00:00
Michael Ludwig
b869c3f16e Delete HW stroke tessellation shaders
Bug: skia:13263
Change-Id: I050bba644886fb714bde2d3a800e99eddf30f5fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534201
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-03 18:58:33 +00:00
James Godfrey-Kittle
2622e03327 [graphite] Unit tests for UploadBufferManager
This also fixes a bug that the tests revealed -- it wasn't resetting the
reused-buffer offset after transferToCommandBuffer.

Change-Id: I75850ab1cb1e63dc88f95783248f70816611cefc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536103
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-05-03 18:48:40 +00:00
Jorge Betancourt
6ed1a2bed6 remove Freetype sources from NO_FONT src list for android
Change-Id: I5c705b1ae4889defd6680cd47118e319afa1f1d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536776
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-05-03 18:37:51 +00:00
Robert Phillips
33ddb180b4 [graphite] Improve local matrix handling and add LocalMatrixShader support
This is accomplished by adding a preamble to each snippet scope that
computes the correct, accumulated, local matrix for the scope.

Bug: skia:12701
Change-Id: Id93bb3fadd72f58c486a1f208cec150d544f8493
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535577
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-03 18:34:57 +00:00
Brian Osman
ced9ccec0e Remove the unnecessary SkPaint parameter to SkParticleDrawable
This was originally present to control filter mode, and was never
removed when filtering decisions were placed on the SkShader.

Change-Id: I2b91f02f994c508fd986cd1b3e28fa97f15d8469
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536496
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-03 17:58:47 +00:00
Bo Liu
3d57a242ce Remove max_texture_size_limit_4096 workaround
Chromium will only apply this workaround to gpu command buffer clients.
So this is no longer needed in skia.

Bug: chromium:1319451
Change-Id: I6b45524420de36a6cd821136c7da8f4405294d9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535816
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-03 17:57:19 +00:00
Brian Salomon
a488fd05c3 Remove INHERITED from style
Change-Id: I7b4ebb9798d141c1453879817f3dbf58b825dd50
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536498
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-03 17:26:23 +00:00
Brian Osman
133f1203c2 Add Mac ANGLE builders
Bug: skia:13272
Change-Id: I6ba8d43a723fddf1ecbc06c6f7d1d8295428d342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536436
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-03 16:18:04 +00:00
Robert Phillips
d3600f81a5 Handle abandoned context in localmatrixshader GM
Change-Id: If73cb25307ee1607470a75789183cdafec28e03a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536477
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-03 14:35:33 +00:00
Ben Wagner
d3a9923ea2 [svg] Add support for var in color parsing.
In OT-SVG `var` support is required for palette use. Even without
palette support this is needed to get the fallback color.

Change-Id: Iea8c4502b57933115f5cbf44fcc183fef19da984
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534140
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-05-03 14:34:35 +00:00
Kevin Lubick
c2f47190c1 [bazel] Add location for G3 define
Change-Id: I7811e0e70e4959be8caa1cab9e4f1fa3421d72d1
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536596
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-03 14:22:33 +00:00
Yotam Hacohen
5ab804aff4 Remove the return value of setDeviceCoordinateSystem
In https://skia-review.googlesource.com/c/skia/+/527505 we removed the
'invert' call from 'SetDeviceCoordinateSystem', removing the only place
where the function might return 'false'. This patch changes the return
value from bool to void, as it is obsolete.

Change-Id: I0262f82d2cf339879ea716bdb5f16ca26d453cb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536097
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-03 14:01:48 +00:00
Robert Phillips
eae1848ec7 [graphite] Update two GMs that use local matrices
Graphite requires graphite images to be graphite-backed.

localmatrixshader_nested, in particular, is useful for ensuring
local matrices are handled correctly.

Bug: skia:12701
Change-Id: Idda51eff6db2bfff68d6b6ca54fc292987b5860c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536037
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-03 13:40:56 +00:00
Herb Derby
8020a24a8c Remove unused parameter from makeAtlasTextOp
The SubRunOwner parameter was used exclusively for the
*NoCache SubRun system. This system has been removed from
the code.

Change-Id: Ic3b4a1e4f49dcbd9b297e5011d2e96dd163a9acb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536437
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-03 13:38:11 +00:00
Herb Derby
39259f5072 A safe Slug/TextBlob + alloc allocator
Change-Id: I4799eb0f6d1c00c220509eadfa16fcb6fabdeebc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536105
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-03 13:35:41 +00:00
Kevin Lubick
1f99c991d8 Manually roll Dawn from 41e4d9a34c1d to a1a3e0484c48 (18 revisions)
https://dawn.googlesource.com/dawn.git/+log/41e4d9a34c1d..a1a3e0484c48

2022-05-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 717818ff1f86 to 4957ae734445 (4 revisions)
2022-05-03 lokokung@google.com Hide blob caching behind a toggle on the device for now.
2022-05-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 02576edd7f4f to cdf43bd816d7 (4 revisions)
2022-05-03 lokokung@google.com Removes device from load/store in caching interface.
2022-05-03 lokokung@google.com Adds pipeline cache and implementation for Vulkan backend.
2022-05-03 lokokung@google.com Wrap get_gitHash in try-catch to prevent failures in tarball builds.
2022-05-02 bclayton@google.com Roll third_party/webgpu-cts/ 21af43c62..547d67bc2 (15 commits)
2022-05-02 bclayton@google.com tools/cts: Bunch of fixes for 'cts roll'
2022-05-02 bclayton@google.com tools: Add the 'cts roll' sub-command
2022-05-02 bclayton@google.com tools: Add the 'cts export' sub-command
2022-05-02 brandon1.jones@intel.com Add External Texture Conversion Constant Params
2022-05-02 bclayton@google.com Fix dawn/node build with make
2022-05-02 amaiorano@google.com Factor out code to flatten bindings for msl
2022-05-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1cde45b8d7aa to 717818ff1f86 (1 revision)
2022-05-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 6fb4e0498abd to 02576edd7f4f (1 revision)
2022-05-02 jrprice@google.com Fix uniformity issue in CopyTextureForBrowserHelper
2022-05-02 jrprice@google.com wgsl: Use commas for structs in helper shaders
2022-05-02 jrprice@google.com tint: Add ProgramBuilder::Else() helper

Change-Id: Iec54e3374ad1cc517a160150eb44b7b286fdb757
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536396
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2022-05-03 13:24:06 +00:00
Robert Phillips
351a46f4fc [graphite] Force all snippets that need local coords to supply a localMatrix
It is also a requirement that the local matrix be the first uniform.
This will let us more generally handle nested local matrices (in a
follow up CL).

Bug: skia:12701
Change-Id: If093363c4820228f139f383b4e2f94dbc473017a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536036
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-05-03 13:23:25 +00:00
skia-autoroll
21bfb4e6a6 Roll ANGLE from e55990e35ddc to 5113ae8ef06a (21 revisions)
e55990e35d..5113ae8ef0

2022-05-03 syoussefi@chromium.org Vulkan: Explicitly enable per-sample shading if `sample` used
2022-05-03 brianosman@google.com Reland "Make SPIRV optional for Metal backend"
2022-05-03 cclao@google.com Vulkan: Add log for buffer pool stats
2022-05-02 cclao@google.com Vulkan: Call cleanupGarbage only if mLastCompletedQueueSerial changed
2022-05-02 b.schade@samsung.com Fix ValidateFramebufferTextureLayer for cubemap arrays
2022-05-02 doughorn@google.com Re-land fixing of commit ID for Android builds.
2022-05-02 abdolrashidi@google.com Vulkan: MSAA swapchain resolve based on renderArea
2022-05-02 romanl@google.com Update Android deqp and end2end sharding
2022-05-02 romanl@google.com Fix presubmit following https://crrev.com/c/3611486
2022-05-02 senorblanco@chromium.org D3D11: recompile all shaders using 10.0.20348.0 toolchain.
2022-05-02 cnorthrop@google.com Tests: Add GFXBench Tessellation trace
2022-05-02 lexa.knyazev@gmail.com OpenGL: Add allow_astc_formats workaround
2022-05-02 syoussefi@chromium.org Remove whitespace from features json files
2022-05-02 brianosman@google.com Test both MSL translators in APPLEClipDistanceTest
2022-05-02 lexa.knyazev@gmail.com Expand Intel GPU detection
2022-05-02 antonio.caggiano@collabora.com Re-land: "Vulkan: Support Wayland"
2022-05-02 gert.wollny@collabora.com Capture/Replay: handle glGetVertexAttrib parameter value
2022-05-02 romanl@google.com Use app data dir instead of /sdcard for writing qpa file
2022-05-02 antonio.caggiano@collabora.com Fix formatting
2022-05-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 7b51f5f85aad to 1cde45b8d7aa (4 revisions)
2022-05-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 3a1ff9044aec to 929311ac6298 (541 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 jlavrova@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: jlavrova@google.com
Test: Test: Run script on Android infra, verify hash is gathered properly.
Test: Test: angle_perftests --gtest_filter="*tessellation*"
Change-Id: I794eedba8c9beef35b8c3f379410e25ad6a34623
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536337
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-03 05:57:21 +00:00
skia-autoroll
0ee380a687 Roll vulkan-deps from 717818ff1f86 to 4957ae734445 (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/717818ff1f86..4957ae734445

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC jlavrova@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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: jlavrova@google.com
Change-Id: I14d87d3507d800c7d4227099d9e874b696402025
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536340
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-03 05:22:57 +00:00
skia-autoroll
b99c39dbfb Roll Chromium from fa9bb0812095 to 8a1d55bd2528 (484 revisions)
fa9bb08120..8a1d55bd25

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 jlavrova@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: jlavrova@google.com
Change-Id: Ie392d0d5995edb5c5656a1bdbe8ba2ae38cbac2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536338
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-03 05:16:39 +00:00
skia-autoroll
1d0cb8fba5 Roll SwiftShader from 6fb4e0498abd to cdf43bd816d7 (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/6fb4e0498abd..cdf43bd816d7

2022-05-02 swiftshader.regress@gmail.com Regres: Update test lists @ 6fb4e049
2022-05-02 capn@google.com Remove legacy build defines
2022-05-02 capn@google.com Document the vk::DescriptorSet memory layout
2022-05-02 capn@google.com Always enable MemorySanitizer instrumentation for vertex routines
2022-05-02 nicolascapens@google.com Revert "Always enable MemorySanitizer instrumentation for sampling routines"

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

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jlavrova@google.com
Change-Id: Id1b2594cf467c96ec70a0cd891066a555dee2d6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536339
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-03 04:53:16 +00:00
Arman Uguray
8b32ca8d83 Manual roll Dawn from cede544df34f to 41e4d9a34c1d (31 revisions)
https://dawn.googlesource.com/dawn.git/+log/cede544df34f..41e4d9a34c1d

2022-05-01 dsinclair@chromium.org Consistent formatting for Dawn/Tint.
2022-04-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 88693e6bf86c to 1cde45b8d7aa (2 revisions)
2022-04-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e617219743aa to 6fb4e0498abd (1 revision)
2022-04-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 8b26c14c04f4 to e39dfe0fe61c (7 revisions)
2022-04-30 shrekshao@google.com Add LoadOp back to emscripten gen bits headers
2022-04-29 brandon1.jones@intel.com Reland ExternalTexture Gamma/Gamut Correction
2022-04-29 bclayton@google.com tools/setup-build: Into the 'active' symlink directory
2022-04-29 bclayton@google.com tools: Add the 'cts update' sub-command
2022-04-29 bclayton@google.com tools: Add the 'cts merge' sub-command
2022-04-29 bclayton@google.com tools: Add the 'cts results' sub-command
2022-04-29 bclayton@google.com tools: Add the 'cts time' sub-command
2022-04-29 bclayton@google.com tools: Add the 'cts format' sub-command
2022-04-29 bclayton@google.com tools: Begin adding the CTS command line tool
2022-04-29 bclayton@google.com tools: Add 'Duration' field to cts.Result.
2022-04-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c9e605688988 to 88693e6bf86c (3 revisions)
2022-04-29 shrekshao@google.com Update default value for map range size to WGPU_WHOLE_MAP_SIZE
2022-04-29 bajones@chromium.org Deprecate dispatch* in favor of dispatchWorkgroups*
2022-04-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from adef92e7b4c6 to e617219743aa (2 revisions)
2022-04-29 bclayton@google.com tools: Add 'subcmd' package
2022-04-29 amaiorano@google.com tint: Update SKIP lines with specific FXC bug
2022-04-29 amaiorano@google.com tint: Update SKIP line for specific DXC failure
2022-04-29 amaiorano@google.com tint: delete e2e tests that fail because Tint detects infinite loops
2022-04-29 amaiorano@google.com tint: delete e2e test for bug/tint/807
2022-04-29 bclayton@google.com tools: Add more functionality to gerrit package
2022-04-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 437053a1635b to 8b26c14c04f4 (4 revisions)
2022-04-29 senorblanco@chromium.org OpenGL: skip depth and stencil tests if readback is unsupported.
2022-04-29 bclayton@google.com tools: Extract getDawnRoot() from run-cts to utils
2022-04-29 bclayton@google.com dawn/native: Fix a bunch of GCC warnings
2022-04-29 bclayton@google.com tools: Add src/cts/expectations Update()
2022-04-29 bclayton@google.com tint/sem: Add abstract int and float types
2022-04-29 bclayton@google.com tools: Add src/cts/results.List.MinimalVariantTags

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 dsinclair@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
Change-Id: I3265cedec1bbb34ab79addd4b04b1df7ef9933ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536104
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-02 21:32:28 +00:00
Ben Wagner
e54df3563d Explicitly cast ints in SkSTArray.
The compiler can complain about these signed to unsigned conversions.
Explicitly cast them in initWithPreallocatedStorage to match the way
this is already done in init [0].

[0] 311b648013 "pack SkTArray"

Change-Id: I0f723094fd356f9c5971b35998c4ecd59c09332f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536099
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-05-02 20:48:30 +00:00
Brian Salomon
432f28c149 Disable anisotropic filtering on P30 GLES
Bug: skia:13286
Change-Id: Icf09efe04add2418832d6e348190b31fefc79c61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536136
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-05-02 20:43:36 +00:00
Arman Uguray
f2cd6e8b36 [ganesh][dawn] Fix -Wreturn-std-move-in-c++11 error
Change-Id: Ic47605588203df2a765b241c5c366973741b8867
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536100
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-02 20:06:29 +00:00
Robert Phillips
ca9ce4de1d [graphite] Make generated SkSL more readable
This CL:
Adds a name to each snippet
Labels the output_%d variables w/ the snippet they are the result of
Labels each set of uniforms w/ the snippet they feed into

Bug: skia:12701
Change-Id: Ib28fe265aaa63affe98386ead83ccdf4fb61c7e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535962
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-02 19:49:52 +00:00
Kevin Lubick
9ef23c2f11 Update public.bzl after GrGlyph move
Change-Id: I44712cd067ce2ded6c28d0a5a4bd6ed6b878744d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536216
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-02 19:44:28 +00:00
Michael Ludwig
c2f683f06a Reland "Delete HW tessellation shaders for curve/wedge tessellation"
This reverts commit 7d9f07c108.

Reason for revert: fixing public.bzl

Original change's description:
> Revert "Delete HW tessellation shaders for curve/wedge tessellation"
>
> This reverts commit 038818ba8e.
>
> Reason for revert: breaking g3 roll, need to update public bzl file I think
>
> Original change's description:
> > Delete HW tessellation shaders for curve/wedge tessellation
> >
> > GrPathTessellationShader_MiddleOut.cpp is just moved into
> > GrPathTessellationShader.cpp, and a few factories are cleaned up since
> > we don't have to differentiate between middle-out or hardware.
> >
> > Bug: skia:13263
> > Change-Id: I420faa614a89ef1a2c0f1075d1f8a067d15e9a81
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534200
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:13263
> Change-Id: I42367a21c2bf1a4283e5d9b8d0e00961f9dea2e7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536039
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: skia:13263
Change-Id: I76101f1dbfee454053c8d7502e83d3b04a768b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536096
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-05-02 18:58:12 +00:00
Arman Uguray
cc046f3cb3 [ganesh][dawn] Fix mapAsync range size invocation
Due to a bug in the WebGPU emscripten bindings, the Dawn backend was
only mapping 0-size region of a GPU buffer when invoking
wgpu::Buffer::MapAsync. To map the entire buffer, we now call it with
wgpu::kWholeMapSize.

Note that due to the same Emscripten bug, wgpu::Buffer::GetMappedRange
must be invoked with "size = 0" to obtaine the entire mapped range. This
inconsistency was the root cause for the mapping failures described in
skia:13266.

Also removed the workaround in the webgpu-bazel demo and made the demo
default to rendering a runtime effect because it's cooler.

Bug: skia:13266
Change-Id: Ia42fd33a4c897a99d37f0a43b065c1dd2f45ec22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534944
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-02 18:41:47 +00:00
Arman Uguray
c908c3a898 [ganesh][dawn] Better handle buffer mapAsync failures
GrDawnGpu tries to guarantee the CPU mapping invariants of GrDawnBuffer
objects that are managed by a GrStagingBufferManager by issuing and
tracking mapAsync requests following command buffer submission. However,
this logic suffered from some issues where:

1. The code always assumed mapAsync succeeds. If a mapAsync request
   failed during shutdown due to a lost GPU connection, the GrDawnGpu
   destructor would spin forever waiting for pending mapAsync requests
   to complete.
2. If a client unmapped and then re-mapped a buffer that isn't managed
   by the async staging buffer logic in GrDawnGpu, the buffer would
   never get mapped and likely hit an assertion for a non-staging
   buffer.

These are now fixed:

* GrDawnBuffer now has more explicit error handling to make it more
  tolerant to mapAsync failures.
* GrGpuBuffer now relies on mapAsync completion callbacks instead of
  spinning on `GrGpuBuffer::isMapped` as a buffer may never get mapped
  in the case of an error. This also has the benefit of tracking the
  mapAsync procedure state on a per-request basis intead of relying on
  state stored in GrDawnBuffer. The existing `fBusyStagingBuffers` has
  been replaced by a single reference counted `GrDawnAsyncWait` object.
* A synchronous/blocking map function has been provided to satisfy the
  `GrGpuBuffer::onMap` contract. This method is not used in the existing
  staging buffer use cases in practice but it solves part of problem #2
  above.
* GrDawnGpu::onReadPixels now uses a GrDawnBuffer's blocking map
  functionality using the public GrGpuBuffer API. This has the same
  behavior as the existing blocking map that created and mapped a
  wgpu::Buffer directly.
* The invariants around GrDawnBuffer lifetime and CPU mapping are
  documented in class level comments.

Bug: skia:12512

Change-Id: I8bb92137fbd60c31066e4071bd696018b3563bb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533758
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-02 17:20:55 +00:00