Commit Graph

56984 Commits

Author SHA1 Message Date
skia-autoroll
5b37de872c Roll Dawn from 41e3931b04b6 to bd45466c6d4c (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/41e3931b04b6..bd45466c6d4c

2021-08-19 tangm@microsoft.com build: Override angle_has_rapidjson to false
2021-08-19 tangm@microsoft.com Roll third_party/angle/ 835bcb1e2..4aedb71f4 (730 commits; 1 trivial rolls)
2021-08-19 brandon1.jones@intel.com Add Debug Label Functionality For D3D12/Vk Buffers & Textures
2021-08-19 enga@chromium.org Initialize padding on buffer allocations
2021-08-19 tangm@microsoft.com D3D12: use the WGSL binding number as shader register
2021-08-19 cwallez@chromium.org Roll third_party/vulkan-deps/ df0528b58..d74e02442 (227 commits)

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 jrprice@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: jrprice@google.com
Change-Id: Ia9926078a848c28a3fa34b860afd07c071af1696
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440917
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-20 05:17:47 +00:00
John Stiles
fbb736b0dc Pass the return type through to evaluate/coalesce functions.
Previously, it was assumed that the return type from any evaluated
intrinsic would be the same as the input type. This isn't always true;
in particular, this assumption doesn't hold true for the
`floatBitsToInt` family of intrinsics.

We did have the actual return type all along, but we weren't passing it
through to the evaluation helper functions until now.

Change-Id: Idee2bdfc548abd85461a13cdb7594a173b2d551c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440857
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-19 22:05:51 +00:00
Herb Derby
9c682ecfc1 abstract blur pass creation
Change-Id: Iaf34787db3154ebe47ab32618de015b9d2c42788
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440856
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-19 21:54:12 +00:00
Robert Phillips
e453fa063d Move some v1-only gpu/tessellate files to gpu/ops
This CL just moves the files and renames them. It doesn't move them into the skgpu::v1 namespace.

Bug: skia:11837
Change-Id: Iab322d0dc5b5d1cfd32436785081539dc85c18d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440776
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-08-19 19:56:46 +00:00
Ben Wagner
a4625e2260 [pdf] Fully position after emitting Type3 glyph
Acrobat Reader (and no other viewer) appears to have issues applying the
default advances of at least some Type3 fonts. After emitting a glyph
from a Type3 font mark the calculated position after applying the
advance as uncertain, forcing the next emitted glyph to be fully
positioned.

Bug: chromium:1226960
Change-Id: I4008a7ba388e981ba5abbe3aa6fb6cc0c14a0855
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439281
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-08-19 19:43:15 +00:00
Jim Van Verth
cd2c1beb1e Reland "Metal: update to using MTLGPUFamily for caps checks."
This is a reland of a209ba17a1

Original change's description:
> Metal: update to using MTLGPUFamily for caps checks.
>
> MTLGPUFamily provides a cleaner interface, and allows us to detect
> Apple Silicon on Macs. MTLFeatureSet has been deprecated in newer OSes,
> but we fall back to it and programmatically set up the GPU family if
> running on an older OS.
>
> Also removes related code from GrMtlGpu and encapsulates it all in
> GrMtlCaps.
>
> Bug: skia:12086
> Change-Id: Ieb54bf2aca845ea809e86ccc72f34ef2211e1cfb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440517
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:12086
Change-Id: If024803710fb3658420e1b18be3abbf285eef9bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440544
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-08-19 18:40:14 +00:00
Robert Phillips
db0ec08127 Move GrPathRenderer and GrPathRendererChain to skgpu::v1 namespace
Bug: skia:11837
Change-Id: I42abcd3724ac1e2c71d3bd13ff6295a4683af5e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440261
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-19 18:26:57 +00:00
Chris Dalton
eb0195e5b4 Delete all code related to disabling multisample
Bug: skia:12196
Change-Id: Iae403ae28e134e4762fc7f58bbfe22bf8c42ab97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436317
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-19 16:56:48 +00:00
Julia Lavrova
f8e69ca744 SkText: refactoring, also a bug fix
Bug: skia:12355
Also, tofu on \n fixed

Change-Id: I2b1b79eaade5c631f8a88da7dbf155b721eaa401
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440157
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-08-19 16:55:27 +00:00
John Stiles
6ec4701155 Use extract_matrix to shrink code size.
Reusing existing code should be smaller than implementing the same logic
in two different places (and two different ways).

Change-Id: I5ee7768c46d6c28ac163404e9efaf99441bba504
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440717
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-19 16:43:47 +00:00
Robert Phillips
43e70f1913 Move 2 path renderers to skgpu::v1 namespace
Bug: skia:11837
Change-Id: I71c8e5b7221e0eb84400e0ddc1a8126d820d24bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440538
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-08-19 16:16:23 +00:00
John Stiles
ffc0189530 Use string_view for intrinsic-list map.
This allows us to avoid constructing temporary string copies just to do
a lookup in the intrinsic map.

Change-Id: Id5a5f7640cdfa3ece8a6f08a7a3623c1aeb717b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440716
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-19 16:01:11 +00:00
John Stiles
c61d1bf4e6 Implement determinant() in SkSL ES3 public API.
The prototype has been added sksl_public, compile-time optimization is
implemented, and test code has been improved.

Change-Id: I536d6bd7fcae437a03744941b008940bf2a3b1c1
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440524
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-19 15:27:10 +00:00
John Stiles
9af527b337 Move RandomColor and RandomCoverage into GrTest.
These were declared as inline functions outside of the GrTest namespace
for some reason, but they are only used in test code and there doesn't
seem to be any reason for putting them in the header. (It doesn't seem
like they would benefit from being inlined.)

Change-Id: I4ba831168a0220d2eb550e08600159ba68220848
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440519
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-19 15:21:13 +00:00
John Stiles
57bd6191e3 Return the input-matrix determinant from SkInvertNxNMatrix.
This is more useful than a boolean true/false result. A zero return
value can be interpreted the same as a false result (non-invertible).
This will be used in a followup to implement compile-time optimization
of determinants.

Change-Id: I8ccb8c97096cdbceec2d1a47c95fe380fc6f3297
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440523
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-19 14:48:11 +00:00
Robert Phillips
832f3fbcae Move GrTessellationPathFlags to their own header (GrTessTypes.h)
Having this enum on GrTessellationPathRenderer forced it to be over-#included and was blocking making GrTessellationPathRenderer.h v1-only.

Bug: skia:11837
Change-Id: I80660ed659946d7aa555057c9f4fd1136b44cca0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440536
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-19 14:47:45 +00:00
Herb Derby
dfadba8bbf switch to byte size
Change-Id: I9d49b561a335c5a97351c178292b66d8bf67bae0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440596
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-08-19 13:49:57 +00:00
John Stiles
abae275ef7 Fix shadowed-variable warning in PathIter bench code.
This one slips past older versions of LLVM for some reason.

Change-Id: I86792b7fc9f66be6e40ed9f480f8750169b36bbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440522
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-19 13:21:20 +00:00
skia-autoroll
85108183bc Roll ANGLE from 7e040640ef1c to 8ffb4602b3f4 (13 revisions)
7e040640ef..8ffb4602b3

2021-08-19 kbr@chromium.org Turn on the first few direct-to-Metal tests by default.
2021-08-18 gman@chromium.org Use the correct attribute locations in Metal
2021-08-18 lexa.knyazev@gmail.com GL: Add emulateImmutableCompressedTexture3D workaround
2021-08-18 jmadill@chromium.org Fix Texture2DTest.TextureSize.
2021-08-18 jmadill@chromium.org Capture/Replay: MEC consistency improvements.
2021-08-18 jmadill@chromium.org Capture/Replay: Changes to MEC first frame capture.
2021-08-18 ynovikov@chromium.org Reland "Properly report xcb_connect failures in DisplayVkXcb"
2021-08-18 gert.wollny@collabora.com Capture/Replay: Pop only after using values it in endGroup
2021-08-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from df8e98bc8f6e to 40a15381a86b (437 revisions)
2021-08-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 59563d9384fb to 370f9682fb33 (10 revisions)
2021-08-18 jmadill@chromium.org Capture/Replay: Clean up ResourceTracker access.
2021-08-18 jmadill@chromium.org Vulkan: Suppress layered FB validation error.
2021-08-18 jmadill@chromium.org Trace Tests: Skip sakura school sim on Win/Intel.

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 borenet@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: borenet@google.com
Change-Id: Ic80a24c471e4056cdd1b386ab50e7fe6db07701d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440656
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-19 05:32:56 +00:00
skia-autoroll
f47f81b903 Roll SwiftShader from 803ceb58c92c to 15941846e006 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/803ceb58c92c..15941846e006

2021-08-19 capn@google.com Separate analysis info from SPIR-V execution modes
2021-08-18 capn@google.com Update Marl to 49602432d

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 borenet@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: borenet@google.com
Change-Id: I60f858eda366076ad209592ab275bde46154b3d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440658
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-19 05:29:12 +00:00
skia-autoroll
b7ec147a89 Roll Dawn from 71d7c2e6707e to 41e3931b04b6 (1 revision)
https://dawn.googlesource.com/dawn.git/+log/71d7c2e6707e..41e3931b04b6

2021-08-18 hao.x.li@intel.com Fix build failures of new APIs on old macOS SDK

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 jrprice@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: jrprice@google.com
Change-Id: I411b70a42863d9eaa6d8b1089490a09867a1c22a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440657
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-19 05:09:40 +00:00
Brian Osman
cbbe23da20 Revert "Metal: update to using MTLGPUFamily for caps checks."
This reverts commit a209ba17a1.

Reason for revert: Flutter roll.

Original change's description:
> Metal: update to using MTLGPUFamily for caps checks.
>
> MTLGPUFamily provides a cleaner interface, and allows us to detect
> Apple Silicon on Macs. MTLFeatureSet has been deprecated in newer OSes,
> but we fall back to it and programmatically set up the GPU family if
> running on an older OS.
>
> Also removes related code from GrMtlGpu and encapsulates it all in
> GrMtlCaps.
>
> Bug: skia:12086
> Change-Id: Ieb54bf2aca845ea809e86ccc72f34ef2211e1cfb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440517
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=jvanverth@google.com,bsalomon@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I691f05bf58a386b4296fb5abed155d7852c57ada
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12086
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440543
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-19 00:07:20 +00:00
Brian Osman
63618acc5c Revert "Remove maccatalyst available check."
This reverts commit 69ae22db48.

Reason for revert: Flutter roll.

Original change's description:
> Remove maccatalyst available check.
>
> It's not strictly necessary and causes compile issues on early versions
> of Xcode 12.
>
> Change-Id: I39b0b25184bdeb978a31bbede59283b0836751c2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440521
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

TBR=jvanverth@google.com,johnstiles@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: Iac537784aaa4135b49b01dbc22e0936919ae222c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440542
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-19 00:06:44 +00:00
John Stiles
0c12e32fad Reland "Add GM slide for ES3 trig intrinsics."
This reverts commit 282af12ae0.

draw_shader now has a `allowRasterFallback` option and returns an empty
bitmap if no surface can be made.

Original change's description:
> Revert "Add GM slide for ES3 trig intrinsics."
>
> This reverts commit 3cb09c0904.
>
> Reason for revert: Windows ANGLE can fall back to software
>
> Original change's description:
> > Add GM slide for ES3 trig intrinsics.
> >
> > Unlike the other Runtime Effects slides, this only works on GPU, as
> > the ES3 intrinsics aren't implemented in SkVM (today).
> >
> > Change-Id: Icf59e4ed7c1e89aa7b730b43c2fd0fa45d61e71a
> > Bug: skia:12202, skia:12352
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439777
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> TBR=brianosman@google.com,johnstiles@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: Ica2f7af9e479e5cf96603583c6803b646b8dcb4b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:12202, skia:12352
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440558
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Bug: skia:12202, skia:12352
Change-Id: I774635a8b1e526af0be3b68f771496f1cedce13a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440559
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-18 21:42:56 +00:00
Jim Van Verth
69ae22db48 Remove maccatalyst available check.
It's not strictly necessary and causes compile issues on early versions
of Xcode 12.

Change-Id: I39b0b25184bdeb978a31bbede59283b0836751c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440521
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-08-18 21:21:48 +00:00
John Stiles
9078a89b26 Avoid mix-up between MAIN_COORDS and FRAGCOORD.
When compiling test shaders, we were setting SK_FRAGCOORD_BUILTIN on the
`coords` parameter to main() instead of SK_MAIN_COORDS_BUILTIN. These
two built-ins don't have the same type (float2 vs. float4) and don't
mean quite the same thing.

The SPIR-V code generator saw a variable with the SK_FRAGCOORD_BUILTIN
builtin value and assumed the presence of a global variable named
`sk_FragCoord`, which didn't exist (because it was never referenced in
the code, so it was never cloned in from the sksl_frag module).

This is only a concern when compiling test shaders with skslc; real
shaders don't hit these code paths. The generated code here is still
imperfect; if you look closely, you'll see the GLSL and Metal code is
referencing the `coords` variable but it's never declared anywhere.

Change-Id: I3ad249469927ff35eb1e75d6536f95317502708f
Bug: skia:12340
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440520
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-18 20:11:19 +00:00
Herb Derby
384c9dd4d9 encapsulate the gaussian blur as a class
Encapsulate the cpu gaussian blur as a class. This will allow further blur
strategies in the future.

Bug = skia:12338

Change-Id: I846571787e6600832a412ca1753c02c9b760e18c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440556
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-08-18 20:11:16 +00:00
John Stiles
282af12ae0 Revert "Add GM slide for ES3 trig intrinsics."
This reverts commit 3cb09c0904.

Reason for revert: Windows ANGLE can fall back to software

Original change's description:
> Add GM slide for ES3 trig intrinsics.
>
> Unlike the other Runtime Effects slides, this only works on GPU, as
> the ES3 intrinsics aren't implemented in SkVM (today).
>
> Change-Id: Icf59e4ed7c1e89aa7b730b43c2fd0fa45d61e71a
> Bug: skia:12202, skia:12352
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439777
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,johnstiles@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: Ica2f7af9e479e5cf96603583c6803b646b8dcb4b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12202, skia:12352
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440558
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-18 19:35:19 +00:00
Jim Van Verth
a209ba17a1 Metal: update to using MTLGPUFamily for caps checks.
MTLGPUFamily provides a cleaner interface, and allows us to detect
Apple Silicon on Macs. MTLFeatureSet has been deprecated in newer OSes,
but we fall back to it and programmatically set up the GPU family if
running on an older OS.

Also removes related code from GrMtlGpu and encapsulates it all in
GrMtlCaps.

Bug: skia:12086
Change-Id: Ieb54bf2aca845ea809e86ccc72f34ef2211e1cfb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440517
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-18 19:16:21 +00:00
John Stiles
0733d48428 Check for SkSL ES3 capabilities in GrShaderCaps.
This lets us set the minimum bar for SkSL ES3 support in one place,
rather than checking this set of bits in multiple spots.

Change-Id: Icba58d8b6a93626ce2ffbe3c4b846cad4749cab5
Bug: skia:12347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440518
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-18 17:12:12 +00:00
John Stiles
3cb09c0904 Add GM slide for ES3 trig intrinsics.
Unlike the other Runtime Effects slides, this only works on GPU, as
the ES3 intrinsics aren't implemented in SkVM (today).

Change-Id: Icf59e4ed7c1e89aa7b730b43c2fd0fa45d61e71a
Bug: skia:12202, skia:12352
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439777
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-18 16:22:07 +00:00
John Stiles
b54ae1fcf8 Explain integerSupport() in a comment.
This was previously a bit unclear, as ES2 supports the `intN` types but
had `integerSupport` returning false.

Change-Id: I148a00c70f7d251641c0571ab4c311ae974cd43d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440516
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-18 16:18:24 +00:00
Robert Phillips
9030a3b1f6 Move GrStencilMaskHelper and GrStencilClip to skgpu::v1 namespace
Bug: skia:11837
Change-Id: I6aee4b5fcdb39a669f1ce9adb143b4562c206e57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440263
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-18 15:59:14 +00:00
Eric Boren
13851a4ba9 [infra] Remove Nexus5x jobs, move Wuffs to Pixel4
Bug: skia:12353
Change-Id: Ia4685f3f5e9e636d9b3b602140d23db6e375929c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440459
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-08-18 15:10:48 +00:00
Brian Osman
fcb5023819 Remove old color space configs from tools
This centralizes the new color-space parsing into SkCommandLineConfig,
and then wires that up in DM, nanobench, and skpbench. It also removes
all of the old config names that encoded both color type and space.

Change-Id: I9a63a97f1d153e7636a1fb974cc4071f5ada3184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438377
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-18 14:34:44 +00:00
Robert Phillips
74b943237e Move GrClipStack to skgpu::v1 namespace
Bug: skia:11837
Change-Id: I42dfaf795ec6afe9d648b0715457a3a38ef8c7a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439943
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-18 13:58:45 +00:00
John Stiles
1e45dcd12f Add compile-time optimization for transpose().
Change-Id: I9ddb80b8886827250e243dc9174bb3679e70df9b
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440262
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-18 13:49:04 +00:00
Michael Ludwig
2ed4a3671a Reland "Correctly downgrade per-entry filter/mm local variables"
This reverts commit 03f17cd210.

Reason for revert: original CL modified 'filter', which was actually
the aggregate requested filter level (and 'netFilter' represented the
optimal filter up to a certain point). Once 'filter' was modified for
a quad, all subsequent entries in the batch would start with the wrong
filter (even if they should have remained bilerp).

Original change's description:
> Revert "Correctly downgrade per-entry filter/mm local variables"
>
> This reverts commit 628c91302d.
>
> Reason for revert: causing layout test failures?
>
> Original change's description:
> > Correctly downgrade per-entry filter/mm local variables
> >
> > If skia-renderer submitted a non-AA pixel-aligned rect with local coords
> > and identical texture domain, but with filter = bilerp, the batch
> > ctor would correctly identify that the netFilter could be dropped to NN,
> > but never updated the filter local var. Later, this value is used to
> > decide if the domain/subset is necessary and since it erroneously thinks
> > it's still bilerp, the subset is preserved.
> >
> > By changing filter to match the downgraded filter quality, these quads
> > will automatically become non-AA, non-clamped texture draws, meaning
> > that the varying texture coords are passed directly to sample(), so they
> > remain in high precision on devices like the Mali 400.
> >
> > Bug: chromium:1125298
> > Change-Id: I79f3d33246b6f897449c2a09015e1eb7a3e968b1
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439778
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: Iec686d90985e73f53a830a09ee675b6b8160ab85
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1125298
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440236
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

# Not skipping CQ checks because this is a reland.

Bug: chromium:1125298
Change-Id: Iab131bd256c828b633afd1c350eff099b23ab929
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440356
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-18 13:24:38 +00:00
John Stiles
a7ea66372d Revert "Use generation() to detect ES3 support."
This reverts commit fdde20d3ec.

Reason for revert: generation() can promise things that it can't deliver

Original change's description:
> Use generation() to detect ES3 support.
>
> Desktop GLSL 1.30 supports the things we currently consider as "ES3
> only"--nonsquare matrices, derivatives, and unsigned integers.
>
> Change-Id: I4b5a844cf3aabee6b6d2c562e78859a29efc36fc
> Bug: skia:12347
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439937
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,johnstiles@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I118e08da078090f404a4fdf33c3a16a48c702753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440457
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-18 13:21:57 +00:00
skia-autoroll
f61ec43f84 Roll ANGLE from 0be285c6ee72 to 7e040640ef1c (12 revisions)
0be285c6ee..7e040640ef

2021-08-17 jmadill@chromium.org libANGLE: Minor cleanups.
2021-08-17 b.schade@samsung.com Prevent separable programs from relying on attached shaders
2021-08-17 jmadill@chromium.org GN: Disable unreachable code warnings in GLES 1 tests.
2021-08-17 gman@chromium.org Add depth fix to convert from GL to Metal
2021-08-17 jmadill@chromium.org infra: Increase sharding in CI angle_perftests.
2021-08-17 jmadill@chromium.org Skip a flaky test on SwANGLE.
2021-08-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from aeae79104c34 to df8e98bc8f6e (460 revisions)
2021-08-17 jmadill@chromium.org dEQP: Remove Pixel 2/XL test expectations.
2021-08-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 526b987888fb to 803ceb58c92c (2 revisions)
2021-08-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 510c98092bc0 to 59563d9384fb (18 revisions)
2021-08-17 jmadill@chromium.org Manually roll android bundle tool.
2021-08-17 jmadill@chromium.org Perf Runner: Properly merge histograms.

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 borenet@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: borenet@google.com
Test: Test: GeometryShaderTest.RecompileSeparableVSWithVaryings*
Test: Test: ProgramBinaryES31Test.SeparableProgramLinkedUniforms*
Test: Test: ProgramPipelineTest31.VaryingLocationMismatch*
Change-Id: I279c1c66ff4dadaa0dbbbeeddd78b533e2a7aea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440376
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-18 05:32:44 +00:00
skia-autoroll
df62189fe5 Roll Dawn from e7e8d5c48611 to 71d7c2e6707e (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/e7e8d5c48611..71d7c2e6707e

2021-08-18 tangm@microsoft.com D3D12: Include serializer error messages in pipeline layout creation
2021-08-17 senorblanco@chromium.org Remove unused SPIRV-Cross shader reflection bits.
2021-08-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 91181b906f3b to d47a7ef0cf0c (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 91181b906f3b to d47a7ef0cf0c

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 jrprice@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: jrprice@google.com
Change-Id: I8f188d1970800c3d4dd32e93b6cde7e968213f90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440377
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-18 05:02:47 +00:00
Robert Phillips
db857ce628 Make GrSmallPathAtlasMgr and GrSmallPathShapeData v1-only files
This is part of making everything in the gpu/ops directory be v1-only.

Bug: skia:11837
Change-Id: I9709ffc140a77d4d68f3838e3d30374df0913889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-17 23:42:26 +00:00
John Stiles
b0697081b5 Improve SPIR-V handling of RTFlip when running the fuzzer.
If the passed-in shader references RTFlip (i.e., sk_FragCoord is used),
the settings must contain RTFlip layout info; otherwise, an error
occurs. Originally, the fuzzer detected this as a problem because the
error was being delivered via SK_ABORT, but it's failing more cleanly
now that Ethan's new error handling code is in place (causing the fuzzer
to report that the bug was "fixed"). With this CL, the oss-fuzz shader
will actually compile successfully in SPIR-V instead of leading to an
error.

Change-Id: I3268e84bd8e01c95a25ed0845a37324e98033c4b
Bug: oss-fuzz:35916
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439779
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-17 22:31:10 +00:00
Robert Phillips
461c539a04 Move several more PathRenderers to skgpu::v1 namespace
Bug: skia:11837
Change-Id: Ifa1da88aafcaa96e0e885facaeb849cc9963bcfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439938
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-17 22:19:11 +00:00
John Stiles
fdcf153f6c Fix crash when inverse() is passed a constant variable.
Optimization for inverse() uses some custom logic which neglected to
look up the value of a constant variable before assuming it was a
FloatLiteral; our tests were not exercising this case.

Change-Id: Idc8f2cc24f6a8df7234062f5f15e8c39a08457e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440260
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-17 21:11:24 +00:00
John Stiles
bc9222b615 Add caps bit for inverse-hyperbolic support.
HLSL doesn't expose asinh/acosh/atanh intrinsics.

Change-Id: I116728adb9a9643034b962a1af44767782fac775
Bug: skia:12352
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440259
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 21:06:29 +00:00
John Stiles
39822cf1e6 Add transpose() to public ES3 API.
We don't have compile-time optimization for this intrinsic yet, but
otherwise everything is working as expected.

Change-Id: Id9c678699baa1d9867848459bf680cc40f29b4bd
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440257
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 20:57:40 +00:00
John Stiles
7020699e38 Simplify declaration of transpose() built-in.
We can use the generic $squareMat type to replace three declarations
with one, saving a bit of memory. For the non-square versions of
transpose, we need to continue using individual declarations as the
input and output types don't match.

Change-Id: I8b3046dd0eb7d976ba2b62bf04c79dcf14113c90
Bug: skia:12202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440177
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-17 20:47:39 +00:00
John Stiles
5e3c1f4f89 Improve testing of transpose() intrinsic.
This intrinsic uses non-square matrices, so it will be useful in
confirming that we can use ES3 types in sksl_public intrinsics. Bulking
up this test (which we don't run in SkSLTest today) is a good first
step.

Change-Id: I8178f13d5ca376d7cae3d1a4350b2bc0397efb1f
Bug: skia:12348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440256
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-17 20:44:59 +00:00
John Stiles
de8602df95 Enable nonsquare matrix support in Direct3D.
This was accidentally missed in http://review.skia.org/403078.

Change-Id: I0eda81d8225942e1b3dfee4bfcb01ba591b40707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440258
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-08-17 20:26:18 +00:00