Commit Graph

50986 Commits

Author SHA1 Message Date
Robert Phillips
331699c9ea Yet more GrThreadSafeUniquelyKeyedProxyViewCache purging tests
This CL also renames dropAllUniqueRefs

Bug: 1108408
Change-Id: Ic39ccfc5efafd60d53524562dd308102fb134d94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318737
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-22 20:02:40 +00:00
John Stiles
a5f3c31490 Create VariableExpression struct for referencing inlined variables.
In this CL, the result expression has been updated to use
VariableExpression; followup CLs will update the VariableRewriteMap to
leverage it as well.

This is intended to allow the inliner to inline simple expressions (such
as literals or swizzles) directly if they are not written to, instead of
making an extraneous copy.

Change-Id: I050057d8c3e940e5e44c22fde2f4bc37bb4c6754
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318576
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-22 19:32:29 +00:00
Robert Phillips
c61c895393 Fix a GrThreadSafeUniquelyKeyedProxyViewCache test
I broke this when I switched over to the SkTDynamicHash

Bug: 1108408
Change-Id: I906b41330440d084ba2e97c0162af38a79da0529
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318696
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-22 19:08:49 +00:00
John Stiles
d0e4840b11 Fix crash when swizzling a bvec with constant 0/1s.
Code like
  bool4 result = val.xy01;

Will now be converted to:
  bvec4 result = bvec4(val.xy, bool(0), bool(1));

Previously it tried to do this, but there isn't an implicit conversion
from int to bool, so it was silently failing and adding nulls into the
constructor:
  bvec4 result = bvec4(val.xy, $coerceToBool(0), $coerceToBool(1));

This CL also cleans up some related code that I was checking while
trying to understand the nature of the error.

Change-Id: I5b7d96760a03170ff78b46251c4182cc4e89836f
Bug: oss-fuzz:25781
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318636
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-22 19:08:42 +00:00
John Stiles
5f35ac9faa Add unit test for swizzling booleans.
This test currently crashes skslc, but will be fixed in the followup CL.

Change-Id: I3683d94a310242e8ca67560296518fd1223b28d0
Bug: oss-fuzz:25781
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318656
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-22 18:47:19 +00:00
Jim Van Verth
772e04d1af Make sure we release all refs in GrD3DTextureResource::releaseResource.
We were holding on to an additional ref to the ID3D12Resource* in the
fInfo struct, so it didn't actually get released until the destructor.

Change-Id: I529daf66ff6caf1516fd21881f9820d7d21bb642
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318657
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-09-22 18:41:50 +00:00
Nathaniel Nifong
3d6d4160ee Reland "include freetype in wasm build, see cl/332073924 for complete change"
This is a reland of 6cc032c12d

Original change's description:
> include freetype in wasm build, see cl/332073924 for complete change
>
> Change-Id: I2f1d6ef2719191fe9a56e31712c058c3207d23a9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317615
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

Change-Id: I7026b40885eb202fa8df1d2ba71e698818b84132
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318577
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-09-22 18:01:09 +00:00
Robert Phillips
187b04b357 Increase testing of GrThreadSafeUniquelyKeyedProxyViewCache wrt GrResourceCache purging
Bug: 1108408
Change-Id: I2d6f89ce71b8d94be22b1ff38b9e205df94ca765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318205
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-09-22 16:54:39 +00:00
Michael Ludwig
84a008fa55 GrClipStack::contains, add fast path for axis-aligned paths
This seems to address the performance regressions seen in the new
GrClipStack for the Missouri seal svg. An alternative was to just
always transform paths to device space, but this hurt other benchmarks.
This CL leaves us with a more efficient contains and but still keeps
the lazy transformation to device space.

Bug: skia:10730
Change-Id: I4494cd24efbce767b2cc981d8942aafe8328dfb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317858
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-22 16:26:39 +00:00
John Stiles
a9be76de8b Reduce the number of inliner temporaries by swizzling.
Ideally the inliner would be smart enough to avoid creating a temporary
at all just for a swizzle, but a good first step is to create fewer of
them.

Change-Id: Icd6f86c294237488f7923dc787bb64a5f99bd0ac
Bug: skia:10737
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318213
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-22 15:43:19 +00:00
John Stiles
a38945abe3 Calculate texture clamping X/Y coordinates in parallel.
The X and Y values of `clampedCoord`, `extraRepeatCoord`, and `snapped`
were being calculated and stored separately, even in cases where work
could easily be done in tandem. Updated the code so that we use .xy when
it makes sense to do so.

Change-Id: I10d85670acb4fec960444b3f3c30f2929c6dcaf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318436
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-22 14:58:39 +00:00
Florin Malita
8b5ed02eb0 Fix skia_use_ffmpeg builds
... post https://skia-review.googlesource.com/c/skia/+/317109

Change-Id: I7286fd6d7598a50a1db452f04a28317c600f4984
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318477
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-09-22 14:25:10 +00:00
Brian Osman
d8efe7029b Change default of fBuiltinFMASupport back to false
Being conservative here is better - it's a feature that's only exposed
on newer GL and ES. This fixes WebGL.

Follow-up from https://skia-review.googlesource.com/c/skia/+/317204

Bug: skia:10745
Change-Id: I319fc6b9379a14c09b9ccce6da8bed2effe09821
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318497
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-09-22 14:23:49 +00:00
Michael Ludwig
b28e141787 Use analytic coverage FPs with MSAA
This addresses the performance regressions on vkmsaa8 and other msaa
locked devices from the new GrClipStack. Now that elements are forced
to upgrade to AA, this allows axis-aligned anti-aliased rects to be
implemented as an FP instead of generating a stencil mask.

This is an alternative to https://skia-review.googlesource.com/c/skia/+/317772
and does not appear to regress visual quality.

Bug: skia:10370
Change-Id: If89b4368fb0c684851e6648bf70e1b608e19852c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317836
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-22 13:54:19 +00:00
Brian Osman
5d8b7e9e49 Remove RTAdjust plumbing
Change-Id: I935784aae438ac767cca03eb25853f4230297bb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318214
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-09-22 13:50:09 +00:00
Greg Daniel
77960d9add Revert "include freetype in wasm build, see cl/332073924 for complete change"
This reverts commit 6cc032c12d.

Reason for revert: breaking some g3 projects

Original change's description:
> include freetype in wasm build, see cl/332073924 for complete change
> 
> Change-Id: I2f1d6ef2719191fe9a56e31712c058c3207d23a9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317615
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

TBR=mtklein@google.com,nifong@google.com

Change-Id: Ib7556494f801441f6770b8175fc818c9a8cdf21d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318496
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-22 13:43:51 +00:00
skia-autoroll
7a1f241c01 Roll Chromium from 688a0b341c70 to 1d6daec3949b (400 revisions)
688a0b341c..1d6daec394

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: csmartdalton@google.com
Change-Id: Idd7214336ffe83ec82da7976e1063f6f2d4a6ba9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318310
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-22 04:53:38 +00:00
skia-autoroll
4395b2a449 Roll ANGLE from 48588bd1810d to f39e0f01aa1f (25 revisions)
48588bd181..f39e0f01aa

2020-09-22 syoussefi@chromium.org Vulkan: Use subpass to unresolve render-to-texture attachments
2020-09-21 jmadill@chromium.org Add restricted trace golden image script test.
2020-09-21 jmadill@chromium.org Trace/Replay: Reset replay after taking a screenshot.
2020-09-21 ianelliott@google.com Vulkan: Further refine invalidate for depth/stencil
2020-09-21 syoussefi@chromium.org Vulkan: Disallow loadOp=LOAD for MSRTT depth/stencil textures
2020-09-21 lehoangq@gmail.com Metal: Implement PBO.
2020-09-21 ianelliott@google.com Vulkan: Fix copy-paste error in hasCopyImageView
2020-09-21 lexa.knyazev@gmail.com Metal: Implement ASTC LDR support
2020-09-21 jmadill@chromium.org Vulkan: Optimize Attribute Change Perf (5/5)
2020-09-21 jmadill@chromium.org Fix early fragment tests optimization condition.
2020-09-21 lexa.knyazev@gmail.com Metal: Implement BPTC support
2020-09-21 ynovikov@chromium.org Skip Texture2DTest.TexStorageWithPBO on Win NVIDIA GL
2020-09-21 jmadill@chromium.org Test Runner: Fix default config grouping.
2020-09-21 jmadill@chromium.org Test Runner: Add more timeout logging.
2020-09-21 lehoangq@gmail.com Metal: Fix wrong FormatID enum order used by PBO autogen shaders.
2020-09-21 jmadill@chromium.org Test Runner: Allow empty sharding parameters.
2020-09-21 jmadill@chromium.org Remove zlib from export_target exceptions.
2020-09-21 jmadill@chromium.org Give trigger.py executable bit.
2020-09-21 jmadill@chromium.org Suppress Linux GL Compute Tests on Intel.
2020-09-21 jmadill@chromium.org Disable slow max uniform count test on D3D11/Intel.
2020-09-21 jmadill@chromium.org Rename ShaderImpl::mData to mState.
2020-09-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from d6935becabad to 0a863bc36554 (1 revision)
2020-09-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from f0e102e48197 to 7f9879b1b1fa (1 revision)
2020-09-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 9eaa69c21c45 to 4dcc12d1a441 (1 revision)
2020-09-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 50ae4c5f4427 to 60ce96e2ff10 (2 revisions)

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: chromium:1032721
Tbr: csmartdalton@google.com
Test: Test: DrawCallPerfBenchmark.Run/vulkan_attrib_changeTest: Test: tested with trigger.py
Change-Id: Ie8179a2ae1f3ccbbbe597e35fe7dc8646eb14cf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318309
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-22 04:42:43 +00:00
skia-autoroll
6f1356d608 Roll SwiftShader from fe878dedd5ad to 6aadd31a5f98 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/fe878dedd5ad..6aadd31a5f98

2020-09-21 srisser@google.com Implement VK_KHR_image_format_list

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: csmartdalton@google.com
Change-Id: Ibb4a7e827fdf8e43a3b89176d1cd918c0535928c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318308
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-22 04:40:38 +00:00
skia-autoroll
3bb94e74a8 Roll dawn from dcd37fa4f476 to 52a588f3c9ba (1 revision)
https://dawn.googlesource.com/dawn.git/+log/dcd37fa4f476..52a588f3c9ba

2020-09-21 enga@chromium.org Disable debug layer logger

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I3fab6e50a979f88736268c3362eeb8f720175bf1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318307
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-22 04:37:38 +00:00
John Stiles
1a49a5334c Restructure blend functions to allow for smarter inlining.
Early returns can cause the inliner to generate suboptimal code. We
control our built-ins, so let's avoid them where we can.

Patterns like this challenge the inliner:
    if (x) return y;
    return z;

But this can be replaced by equivalent code that inlines better:
    return x ? y : z;

Or, if a ternary can't be used, this also does a better job:
    if (x) return y;
    else return z;

In several cases, this allows the inliner to avoid generating a
do-while(false) block for control flow.

Change-Id: I921c929122297c40476ff15b4da631fc1581e308
Bug: skia:10737
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318211
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-21 22:42:01 +00:00
John Stiles
371fde549e Rename 'DefaultSettings' golden outputs to 'StandaloneSettings'.
I realized that "DefaultSettings" as a name suffix was unclear, because
"Default" is a different settings mode from skslc running with
--nosettings.
In --nosettings mode, skslc uses "standalone" settings.

Change-Id: I1f5d80df0a21cec55948c4ad146169bcb34f4999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318210
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-21 22:15:51 +00:00
Jim Van Verth
5fba9ae0cb Revert "Reland "Use Microsoft's ComPtr to wrap D3D12 objects.""
This reverts commit b8ae7fa12a.

Reason for revert: Introduced a memory leak

Original change's description:
> Reland "Use Microsoft's ComPtr to wrap D3D12 objects."
> 
> This is a reland of 0ef049177f
> 
> Original change's description:
> > Use Microsoft's ComPtr to wrap D3D12 objects.
> > 
> > Change-Id: I4bd173428a2b65f0bc1994fb794ef9d4d68d5ba0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314957
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 
> Change-Id: Id0199db4061c67ed53da35e74dc31a004744be95
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315655
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I3f8744668558f6b8f4f367eeeeff2f6aa2c36992
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318209
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-09-21 22:02:12 +00:00
John Stiles
2b788b11e0 Create golden outputs for SkSL blend functions.
Several blend functions generate a surprisingly large amount of code,
and appear to have opportunities for further optimization. At any rate,
if we make compiler changes that would affect the output of a blend
function, I think we would want to see the changes reflected in our
golden outputs.

Change-Id: Iff612dcd4bad8824b5e6e97413ffce19e5ea1c0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318336
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-21 21:53:41 +00:00
John Stiles
eed481a0dd Add convenience methods to CFG builder.
This doesn't change the meaning or intent at all, just makes the code
easier to read.

Change-Id: I998498de8fba625d86eadc2fba119c29a1e1d29a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318202
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-21 20:47:01 +00:00
Greg Daniel
9a48697bd7 Allow client to pass in VK_IMAGE_LAYOUT_UNDEFINED into mutable state change requests.
Passing in VK_IMAGE_LAYOUT_UNDEFINED will tell Skia to not update the
layout when doing the state change.

Bug: skia:10742
Change-Id: Ic59b7c95d3a73e29dcd6eec16a2fd138e1a1d95f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318204
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-09-21 20:38:42 +00:00
Greg Daniel
e77162ea89 Make GrStencilAttachment derive from GrSurface.
This is the start of trying to have all our different types of "surface"
allocations share a common class. we will soon follow up with also having
an msaa attachment class derivie from GrSurface.

Bug: skia:10727
Change-Id: I50e78d232a454b1dd35cf9606791390ce5a6396b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317392
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-21 20:06:41 +00:00
John Stiles
4e5c3dae9f Remove needless do-while(false) block from inlined blend methods.
The optimizer still doesn't understand how to remove an unnecessary do-
while loop, but this change will prevent blend_src_in and blend_dst_in
from having an early return at all, and won't otherwise pessimize the
output. This will also allow these blends to be inlined on systems which
don't support do-while loops at all.

Change-Id: I44ef7b3a50571e1a2fe6214f5821ab886471b4aa
Bug: skia:10737
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318236
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-21 18:19:31 +00:00
John Stiles
44dff4f201 Optimize early-return detection.
Previously, `has_early_return` would count all of the return statements
in the program, and then compare that against the number of return
statements detected at the end of the program's control flow.

However, that's overkill; we don't actually need to know the full number
of returns. We only need to know if there are more returns than what we
found at the end of control flow. i.e. if a program has 1 return at the
end of its control flow, we can stop as soon as we find 2 returns and
say "yes, there's an early return somewhere."

Change-Id: I332810a7fd411d08acd6f8488ce128b5ee9eff09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318199
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-21 17:23:21 +00:00
Ethan Nicholas
a02ce0cee3 Fixed a bug with SkSL ternaries in binary files
Change-Id: Ic6b30ea9052a762959fec600d5132c6409a80fed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318201
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-21 17:16:31 +00:00
Adlai Holler
731f67cf16 Migrate skottie to GrDirectContext
Almost forgot this one!

Change-Id: I325d25dcfffc872a4931c19ca53a0387c3771496
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318200
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-21 17:13:41 +00:00
Nathaniel Nifong
6cc032c12d include freetype in wasm build, see cl/332073924 for complete change
Change-Id: I2f1d6ef2719191fe9a56e31712c058c3207d23a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317615
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-09-21 17:05:41 +00:00
John Stiles
b61ee905fd Remove duplicate copy of ensureScopedBlocks.
The original plan was for the IRGenerator to remove its inlining logic
entirely, but that looks like it might be difficult to accomplish
without a performance hit. Since we might be stuck with IRGenerator
inlining for a while, let's remove the duplicated logic.

Change-Id: I17151b9a3a000a119393bce19335fd7398db3db8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318197
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-21 17:03:11 +00:00
Adlai Holler
d8ca58a332 Remove SkCanvas::getGrContext & GrRecordingContext::backdoor
These are no longer needed now that we've migrated away.

Change-Id: Id308af7d40ffe0d539a3c6fd201220d145080928
Docs-Preview: https://skia.org/?cl=317281
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Android,Canary-G3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317281
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-21 16:46:21 +00:00
Brian Salomon
6c6678f78e Separate YUVATextures, YUVATexturesCopy, and YUVAPixmaps in wacky GMs.
Skips all but the generator flavor on CPU since the others were all
falling back to the generator anyway.

Uses the new MakeFromYUVAPixmaps signature.

Rename domain to subset.

Bug: skia:10632
Change-Id: Ie6afe0e7927dc3d0b121df094c1ccb6f0db3b815
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318198
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-21 16:19:51 +00:00
Kevin Lubick
1a42d52712 [canvaskit] Fix Debug build
Change-Id: I028075fd523f5fe2af0a42d051d4471d4800cfb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318158
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-21 16:15:41 +00:00
John Stiles
8614e49258 Replace VariableReference::copy_constant with clone().
This does not appear to affect any tests or cause any meaningful
differences.

Change-Id: I8ce53838a87bec72acb8167f8e41bf21f52b85ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317618
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-21 15:41:01 +00:00
Brian Salomon
32d41b7e45 Stop building GL backend on Android Vulkan builders
Should reduce build time and avoid running GL unit tests redundantly
on Vulkan bots.

Change-Id: I67379e6820dab2f038175a825ee1461086a2da84

Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan
Change-Id: I67379e6820dab2f038175a825ee1461086a2da84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318196
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-21 14:54:00 +00:00
Jim Van Verth
eb70946feb Fix D3D non-dev release build.
operator== for D3D12_CPU_DESCRIPTOR_HANDLE was undefined if building a
non-dev release build. Pulling out of the #ifdef DEBUG || GR_TEST_UTILS
block fixes it.

Change-Id: I3088b8e0c6ce7271074d1b255bbac02d0516da9f
Bug: skia:10651
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318160
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-09-21 14:53:00 +00:00
John Stiles
c1cb27023c Allow a BasicBlock to be dumped, outside the CFG.
Change-Id: I54a65806c65b5df5bfbc2603859cdb2b7de0836c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317899
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-21 13:52:00 +00:00
Robert Phillips
4559368cc4 Add MRU to GrThreadSafeUniquelyKeyedProxyViewCache
Bug: 1108408
Change-Id: I54ae1512340408e61c2fb2f408b006d6f7697cf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317860
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-21 13:31:40 +00:00
skia-autoroll
d970d657aa Roll ANGLE from 8d4331eeb5ea to 48588bd1810d (27 revisions)
8d4331eeb5..48588bd181

2020-09-21 m.maiya@samsung.com Vulkan: Add GL_EXT_buffer_storage extension entry points
2020-09-20 m.maiya@samsung.com Vulkan: Implement a SharedResourceUse pool
2020-09-19 jmadill@chromium.org Test Runner: Really reuse displays with --bot-mode.
2020-09-19 jmadill@chromium.org Test Runner: Fix "--bot-mode" error level return value.
2020-09-19 jmadill@chromium.org Vulkan: Allow no validation layers in ExternalImageTest.
2020-09-19 jmadill@chromium.org Vulkan: Optimize Attribute Change Perf (4/5)
2020-09-19 timvp@google.com Remove setting a default value for use_custom_libcxx
2020-09-18 jmadill@chromium.org Vulkan: Optimize Attribute Change Perf (3/5)
2020-09-18 jmadill@chromium.org Test Runner: Fix sharding and --bot-mode.
2020-09-18 jmadill@chromium.org Vulkan: Optimize Attribute Change Perf (2/5)
2020-09-18 jmadill@chromium.org Vulkan: Optimize Attribute Change Perf (1/5)
2020-09-18 ianelliott@google.com Vulkan: Additional "invalidate" white-box tests
2020-09-18 courtneygo@google.com Vulkan: lock around accesses to mSharedGarbage
2020-09-18 adetaylor@chromium.org Add CPEPrefix for rapidjson.
2020-09-18 courtneygo@google.com Vulkan: need to serialize access to mFenceRecycler
2020-09-18 jmadill@chromium.org Tests: Allow tests to function without VVLs.
2020-09-18 geofflang@google.com Refactor IsMipmapFiltered to take the min filter directly.
2020-09-18 jmadill@chromium.org Traces: Move up from tests/perf_tests/ to tests/.
2020-09-18 jmadill@chromium.org Fix roll script for CIPD deps.
2020-09-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 6ccc0d9ba0ff to c9f4fb2fccda (7 revisions)
2020-09-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 399f7fd741f7 to a148cdd49041 (1 revision)
2020-09-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 46fc663a1cb3 to d6935becabad (6 revisions)
2020-09-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 34ef0c3fdc8e to 50ae4c5f4427 (3 revisions)
2020-09-18 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from b045bf7d3b6a to 6ccc0d9ba0ff (1 revision)
2020-09-18 syoussefi@chromium.org Vulkan: Workaround oldSwapchin bug on Android
2020-09-18 jmadill@chromium.org Guard against data race with MemoryProgramCache.
2020-09-18 syoussefi@chromium.org Vulkan: Add perf warning for mid-RP clear

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: chromium:895969
Tbr: csmartdalton@google.com
Test: Test: CQTest: Test: DrawCallPerfBenchmark.Run/vulkan_attrib_changeTest: Test: DrawCallPerfBenchmark.Run/vulkan_null_attrib_changeTest: Test: angle_unittests with --bot-mode, sharding, and filter
Change-Id: If3aed2fd189de0c3c8e7b0470aad899c281a34fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318097
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-21 04:44:40 +00:00
skia-autoroll
7c8b0c37b0 Roll Chromium from 33c87dade16e to 688a0b341c70 (560 revisions)
33c87dade1..688a0b341c

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: csmartdalton@google.com
Change-Id: I41c18b6e3ec13522202efd252b251cf8bc5a901e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318098
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-21 04:38:10 +00:00
skia-autoroll
8e660dd467 Roll dawn from d6498a41ab4e to dcd37fa4f476 (4 revisions)
https://dawn.googlesource.com/dawn.git/+log/d6498a41ab4e..dcd37fa4f476

2020-09-18 enga@chromium.org Rolling 5 shader dependencies
2020-09-18 enrico.galli@intel.com Handle debug markers commands on command encoder
2020-09-18 cwallez@chromium.org Add -Wduplicate-enum and -Wrange-for-analysis
2020-09-18 cwallez@chromium.org Remove wgpu::BindingType::StorageTexture

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 517f39eee46f to 4dcc12d1a441

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I0eedc99732f1021bf152f97e4a12e873e3b55535
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318096
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-09-21 04:32:10 +00:00
skia-recreate-skps
822d3abc13 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I3297f8e1c01f9e547a0256a351ccdce4fc742746
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318036
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-09-20 08:49:17 +00:00
John Stiles
046828f239 Fix generated file.
This wasn't rolled back automatically by the revert at
http://review.skia.org/317976, because this unit test did not exist yet
when that CL was submitted.

Change-Id: Ib887e74ddd32c1e576908bbe3d588205e26cdaa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317978
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-19 14:53:43 +00:00
John Stiles
881a10c6e8 Revert "Add program-settings flag to disable the inliner."
This reverts commit 910845fac1.

Reason for revert: IRGenerator inline change reverted

Original change's description:
> Add program-settings flag to disable the inliner.
>
> Change-Id: I6c4e7f6a2aab6710221029022a3a5f3ec323c5e2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317856
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Ie38a29495ea8497f9db26d2603df179e696ac5ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317977
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-19 14:13:54 +00:00
John Stiles
941fc7174f Revert "Remove inliner from IR generation stage."
This reverts commit 21d7778cb5.

Reason for revert: Pinpoint absolutely hates this change

Original change's description:
> Remove inliner from IR generation stage.
> 
> There is no need to inline code during IR generation, as the optimizer
> can now handle this.
> 
> Change-Id: If272bfb98e945a75ec91fb4aa026e5631ac51b5b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315971
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I62c235415bcdc92a088e2a7f9c3d7dbf7e1bf669
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317976
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-19 12:47:25 +00:00
John Stiles
ca4d074d54 Fix unit test for InlinerWrapsEarlyReturnsWithDoWhileBlock.
This resolves the following TODO block:
   TODO(johnstiles): the skslc standalone caps bits do not enable
   do-while support, so this test does not actually perform as
   described; the `returny` function is not inlined at all. This will
   be fixed when customizable caps-bit support is added to the golden
   tests.

Change-Id: I3495e4813b9be37264a8fda978453594c1f5fa13
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317859
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-18 21:08:52 +00:00
John Stiles
64fc15a279 Add unit test for a dead do-while loop.
Ideally the optimizer should be able to detect and remove this loop.
This CL establishes a baseline.

Change-Id: I6aba0b52fe49552f170fca25d81c29c515044ef5
Bug: skia:10737
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317861
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>
2020-09-18 20:57:12 +00:00