Commit Graph

4437 Commits

Author SHA1 Message Date
Mike Klein
e42af16143 add --stats to start with the stats overlay on
Change-Id: Ibc0a47258009a24bf7d9b378c9e21729b13d0216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286027
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-04-29 13:22:22 +00:00
Robert Phillips
a50ce3c983 Revert "Add BGR_10A2 support to Ganesh"
This reverts commit 44fc53b7f5.

Reason for revert: Test to see if this is causing the linux-rel MediaColorTest.Yuv420pHighBitDepth failure on the Chrome roll

Original change's description:
> Add BGR_10A2 support to Ganesh
> 
> Bug: 1068416
> Change-Id: I40aa84b7f3f770ba550b7bea44c10173ae9a7ddf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285356
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I0ad0197ebd8de9b8761f84ba808c9f90891b9238
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1068416
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285958
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-28 22:30:46 +00:00
Mike Klein
1e0884d07a add --dylib to viewer
This JIT mode helps debugging and profiling by shelling out to an
external assembler then loading its results back in via dlopen(),
so you can see coherent function profiles and not just every
instruction as its own line in the profile.

It's very slow, so viewer will stutter for a second or two before
drawing goes smooth again.  We can paper over this by using the
interpreter while these compiles are in progress, but I haven't hooked
that up yet.

Change-Id: I23e74d65a1a3a6d89649733296db8217be306438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285864
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-28 20:42:49 +00:00
Robert Phillips
44fc53b7f5 Add BGR_10A2 support to Ganesh
Bug: 1068416
Change-Id: I40aa84b7f3f770ba550b7bea44c10173ae9a7ddf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285356
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-28 17:07:57 +00:00
Robert Phillips
11c6767a17 Create DDL for final composition step in DDL test harness
Besides better matching Viz's behavior this also reduces a lot of choppiness in the composition RenderTask DAG.

In the previous approach DDL draws and compositing draws would be interleaved resulting in a lot of render target swaps.

This necessitated some reorganization bc I wanted to reuse PromiseImageCallbackContext to manage the tiles' promiseImages.

Change-Id: I513bf060a69ff2bfe0e7b82ae72f149dfede632e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285056
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-24 12:16:34 +00:00
Chris Dalton
ed6e82796b Add a flag for suppressing tessellation shaders
Change-Id: Ic29618c5eac9b3eed92ce0321162745645240d6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285142
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-23 18:35:48 +00:00
Lepton Wu
710bd4f969 SkQP: Fix broken run_skqp_exe
This fixes several issues:

* sysopen.py was moved to bin/sysopen in previous CL. Change to
use os.system to run it

* "adb push" doesn't follow symlinks.

* SkQP added a new commandline flag for rendertests file.

* The report path was wrong in old code.

Bug: skia:10156
Change-Id: I821a49c49bffe588f34d1216d9406c97ae5a903b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284524
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Auto-Submit: Lepton Wu <lepton@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-21 18:39:45 +00:00
Lepton Wu
1ba00c7121 Allow empty rendertests commandline flags.
When it's empty, just use default rendertests file.

Bug: skia:10156
Change-Id: I406d381570bbd6b348e6364d649d39af5817a56e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284523
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Auto-Submit: Lepton Wu <lepton@chromium.org>
2020-04-21 14:52:54 +00:00
Lepton Wu
e59f718fc2 SkQP: Fix document about running as native executable
Bug: skia:10156
Change-Id: Ic0d89ef4bf01ccadb23a5d123c578dc772bc945a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284522
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Auto-Submit: Lepton Wu <lepton@chromium.org>
2020-04-21 14:48:54 +00:00
Mike Reed
7d45a7ac9c rm unneeded SK_SUPPORT_LEGACY_DIDCONCAT44
Change-Id: I65cec59749f0e7f5fb13675293720afecffa6a80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284321
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-20 20:44:35 +00:00
Robert Phillips
f95e2f42a8 Handle mipmap creation failure in DDL test harness
SkMipMap::Build fails surprisingly often. Fall back to unmipped promise images in that case.

The prior approach created the mipMaps too late (i.e., at backendTexture creation time) for the test harness to change its mind about the mip status of a promise image. This approach moves the mipmap creation earlier - to when the PromiseImageInfos are created (i.e., at SKP deflation time).

Change-Id: Id3c67a44cc84da7ee76d02f4d44d7f27ce8e39d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284136
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-20 14:11:50 +00:00
Brian Salomon
414782d132 Disable testing of D3D9 ANGLE backend on NVIDIA
Bug: skia:10149

Change-Id: Ia9b0bf2ed2042ba75088409612f6b091c5052ea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284220
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-17 17:28:35 +00:00
Robert Phillips
8472a3d01c Update DDL test harness to use backendTextures to back tiles (take 2)
This better matches Chrome's use of DDLs.

With path, image, and text draws stripped out, here is the perf impact of this change:

           before CL   after CL
w/ DDLs      7.792      1.038
w/o DDLs     0.800      0.876

This perf improvement (in the DDL case) is from backend texture wrapping SkSurfaces being created w/o initialization. The prior method of SkSurface creation was resulting in double clearing of all the surfaces.

This perf improvement won't be seen by Chrome since they've always being using wrapped backend texture SkSurfaces.

TBR=bsalomon@google.com

Bug: 1056730
Change-Id: Ic04d322cad96df845e75437211208495862c6555
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283866
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-17 14:39:44 +00:00
Robert Phillips
4e3ceb96b8 Fix up GPUDDLSink for Vulkan
Change-Id: If38afff3d07f51fd0f5a989c2f59e3c788086f8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284099
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-16 20:17:12 +00:00
Robert Phillips
4508eb992b Make all SkImages mipmapped w/in the DDL testing harness
When timing DDL performance with SKPs, if the mipmapping requirements of a given SkImage are gotten wrong at record time, the mipmaps will keep getting regenerated over and over again. This CL works around the problem by just creating all promise images as mipmapped. A better (but longer term solution) would be to examine the actual draw ops w/in an SKP.

Even more aggressively, we may want to disable mipmap regeneration w/in DDLs.

For desk_nytimes.skp on Windows/gl we have:

           before CL   after CL
w/ DDLs      7.999       3.136
w/o DDLs     1.953       1.863

This perf improvement won't be seen by Chrome since, presumably, they're creating their backend textures w/ the correct mipmappedness. Additionally, they, hopefully, aren't recording the same DDL over and over again (with incorrect mipmappedness).

Bug: 1056730
Change-Id: I8bf9dc9e64bc77159a04d89e5e3ac398e98beaa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283677
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-16 14:49:40 +00:00
Mike Klein
484b63b1a5 report all test errors in fm
Change-Id: Ifa25a44a75c6c193a8bd0780bda0f016fe3cbc31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283675
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-15 18:10:46 +00:00
Robert Phillips
9ff1d841f6 Revert "Update DDL test harness to use backendTextures to back tiles"
This reverts commit 7ae9d2fca6.

Reason for revert: Triggering Vulkan Debug layer errors

Original change's description:
> Update DDL test harness to use backendTextures to back tiles
> 
> This better matches Chrome's use of DDLs.
> 
> With path, image, and text draws stripped out, here is the perf impact of this change:
> 
>            before CL   after CL
> w/ DDLs      7.792      1.038
> w/o DDLs     0.800      0.876
> 
> This perf improvement (in the DDL case) is from backend texture wrapping SkSurfaces being created w/o initialization. The prior method of SkSurface creation was resulting in double clearing of all the surfaces.
> 
> This perf improvement won't be seen by Chrome since they've always being using wrapped backend texture SkSurfaces.
> 
> TBR=bsalomon@google.com
> Change-Id: Ice3993ca125fce37804e58c353c265cf659dbe2f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283456
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ife023ede0774ec2cce4c0d6e7708c036347ebf54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283648
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-15 16:22:17 +00:00
Robert Phillips
7ae9d2fca6 Update DDL test harness to use backendTextures to back tiles
This better matches Chrome's use of DDLs.

With path, image, and text draws stripped out, here is the perf impact of this change:

           before CL   after CL
w/ DDLs      7.792      1.038
w/o DDLs     0.800      0.876

This perf improvement (in the DDL case) is from backend texture wrapping SkSurfaces being created w/o initialization. The prior method of SkSurface creation was resulting in double clearing of all the surfaces.

This perf improvement won't be seen by Chrome since they've always being using wrapped backend texture SkSurfaces.

TBR=bsalomon@google.com
Change-Id: Ice3993ca125fce37804e58c353c265cf659dbe2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283456
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-15 16:07:47 +00:00
Mike Klein
45d9cc86b3 remove i16x2 ops
These are neat but mostly just a distraction for now.
I've left all the assembly in place and unit tested
to make putting these back easy when we want to.

Change-Id: Id2bd05eca363baf9c4e31125ee79e722ded54cb7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283307
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-04-13 19:08:11 +00:00
John Stiles
f61ee1ecac Fix assertion in ImGui::NewFrame if getBackbufferSurface returns null.
Previously, in cases where the backbuffer was null, we would call layer->onPrePaint (which starts a new frame with ImGui::NewFrame) without a matching call to layer->onPaint (which calls ImGui::Render). This causes the ImGui frame counter to go out of sync, which leads to an assertion when NewFrame is next called.

(The backbuffer can become null if unsupported settings are used, e.g. a MSAA setting above the maximum supported by your GPU.)

Change-Id: I1b8fbaa1bf78ad5e1aa41fd04eda6be206c952b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283196
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-04-13 14:16:52 +00:00
Brian Osman
95c26efc90 Pure SkSL RNG for particles
Change-Id: I2cb6255a553852a292427d6dc9ef8c5ed7f8286d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252926
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-04-10 17:20:07 +00:00
Greg Daniel
bb776c11a6 Remove vulkan validation layer workaround.
New SDK is out and fixes the underlying issue. Removing workaround as
anyone can just update to the newest SDK.

Change-Id: I75ebde05edc75d98a8b4b1228e75a39bb22670a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282850
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-04-10 16:16:07 +00:00
Corentin Wallez
e2c5bcf868 Remove the dependency on Dawn's SwapChainUtils.
This is not part of the public API of Dawn and will be unnecessary once
Dawn move to "surface based swapchains". DawnD3D12WindowContext didn't
need the include so all that's needed is copying the helper in
DawnMTLWindowContext.

Change-Id: I8d0682b6b0801dc311ad4c7d73d4c07e575ecf4e
Bug: chromium:1064305
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282496
Reviewed-by: Zhenyao Mo <zmo@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-04-09 20:31:30 +00:00
Tyler Denniston
31dc48138c Sort viewer slides by filename when traversing a directory.
Main motivation for this was convenience when rendering directories of
external files (e.g. --svgs) as readdir() does not guarantee any
ordering.

Change-Id: I78dced834e5a3edde4a5e8e0e65ad946c7d3a3fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282617
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-09 16:15:06 +00:00
Florin Malita
d532bdbc86 [svg] Adjust container size on Viewer window resize
It's nice to be able to resize the SVG container on the fly.

Change-Id: I6624e6151aaff7e2a7f6eb07e84aee88c4a2e408
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282418
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-09 12:16:34 +00:00
Mike Klein
5492a0c8d0 stifle leaks in terminator_CreateDevice()
We think this is the driver's problem and not ours, right?

Change-Id: I2c94ee904c7ca4844a5e91291b10b0efa8ce3806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282298
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-08 15:28:48 +00:00
Mike Klein
869ec6a5e6 backup plan for ASAN bots
I can't reproduce the leak locally on my workstation.

Change-Id: I54b23b9d040467fabe99af9a3a2d2a0615aac6e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282072
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-07 18:41:47 +00:00
Mike Reed
a735ad98db stage changing didCocnat44 virtual
SK_SUPPORT_LEGACY_DIDCONCAT44

Change-Id: Ie208c245d7121fddc693a7d3c5d6866441c27433
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281864
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-07 15:50:57 +00:00
Greg Daniel
dcd2964e6f Ignore incorrect vulkan valdiation error.
Change-Id: Idcc598af6b3859d33b674402c973438ddfdd632b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282038
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-04-07 14:41:47 +00:00
Robert Phillips
e19babf996 Remove GrAtlasManager.h from all other .h files
Having GrAtlasManager.h in GrContextPriv.h was needlessly propagating dependence on that header.

Change-Id: Idf5836f1e217ecd2da91f751b488a63a884c02ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281739
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-07 12:43:46 +00:00
Chris Dalton
5846ff3c7a Make glDraw*BaseInstance non-optional when extension(s) are present
TBR=michaelludwig@google.com

Change-Id: Ie9fc5eb6aee8cffde5d17a01fc816a1c49d02e9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281881
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-07 04:02:07 +00:00
Chris Dalton
afbf2aa737 Revert "Reland "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""""
This reverts commit 0a51aa55f8.

Reason for revert: chrome

Original change's description:
> Reland "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"""
> 
> This is a reland of 47d03f6ee5
> 
> Original change's description:
> > Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
> > 
> > This is a reland of d84b691950
> > 
> > Original change's description:
> > > Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> > > 
> > > This is a reland of e8c963d474
> > > 
> > > Original change's description:
> > > > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > > > 
> > > > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > 
> > > Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> 
> Change-Id: Id9e3aacaa7c693bef74454aeccbebf367c047fd3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281632
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I227b4f0ec8704bd62f22965ff75aeb337786dbdc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281870
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-06 22:27:42 +00:00
Chris Dalton
0a51aa55f8 Reland "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"""
This is a reland of 47d03f6ee5

Original change's description:
> Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
> 
> This is a reland of d84b691950
> 
> Original change's description:
> > Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> > 
> > This is a reland of e8c963d474
> > 
> > Original change's description:
> > > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > > 
> > > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Change-Id: Id9e3aacaa7c693bef74454aeccbebf367c047fd3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281632
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-06 18:43:10 +00:00
Mike Klein
4067a9429a the return of bit_clear
bit_clear is at least useful as a special case for select(),
which helps with code readability.

Add is_NaN() and use these all together in sweep gradient.

Change-Id: I57a54f8956f85e0db0662b33f8446b8dc7342d8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281685
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-05 16:44:16 +00:00
Chris Dalton
bddf60b423 Revert "Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"""
This reverts commit 47d03f6ee5.

Reason for revert: Chrome GL interface not setting up properly

Original change's description:
> Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
> 
> This is a reland of d84b691950
> 
> Original change's description:
> > Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> > 
> > This is a reland of e8c963d474
> > 
> > Original change's description:
> > > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > > 
> > > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I7df1d60d5b33c84179dbe5391b49a84413cc9ec2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281570
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-03 18:28:54 +00:00
Mike Klein
cca2acfb77 remove little-used bit_clear() and bytes()
bit_clear() is just another bit_and(),
and bytes() is a way of expression pshufb
that we never really use (yet).

Can always add them back later, but there's
some extra complexity to think about for each
that I'd like to not think about now:

  - common sub-expression elimination between bit_and and bit_clear
  - large constant management JIT'ing bytes

Change-Id: I3a54afa963231fec1d5de949acc647e3430ed0d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281557
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 18:16:54 +00:00
Chris Dalton
47d03f6ee5 Reland "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
This is a reland of d84b691950

Original change's description:
> Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> 
> This is a reland of e8c963d474
> 
> Original change's description:
> > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > 
> > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Change-Id: I9240c5cc6e58ce196be393c649bbdd86560602f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281077
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-02 20:48:31 +00:00
Brian Salomon
8afde5f395 Rename outputView->writeView and outputSwizzle->writeSwizzle
Change-Id: Ib09550201bc1556e04555fc7dc9408ab469684a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280964
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-04-02 15:06:16 +00:00
Mike Klein
a01c6b0b59 reformat GN files
Change-Id: I2d19c4f0ff1439dcd923a3064eb3ba78432a5113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281043
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-04-01 23:23:03 +00:00
Michael Ludwig
b14b144458 Revert "Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding""
This reverts commit d84b691950.

Reason for revert: seems like chrome's glInterface is maybe not setup correctly. Crashing on intel gpu chrome bots: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8884195221041295328/+/steps/trace_test_on__intel-hd-630-ubuntu-stable__GPU_on_Linux__retry_shards_with_patch__on_linux-intel-stable/0/stdout

snippet: 
Crash reason:  SIGABRT
Crash address: 0x3e8000050b0
Process uptime: not available

Thread 0 (crashed)
 0  libc.so.6 + 0x43ed7
    rax = 0x0000000000000000   rdx = 0x0000000000000000
    rcx = 0x00007ff964c3ced7   rbx = 0x00002cc73685ddc0
    rsi = 0x00007fffb9128960   rdi = 0x0000000000000002
    rbp = 0x00007fffb9128bb0   rsp = 0x00007fffb9128960
     r8 = 0x0000000000000000    r9 = 0x00007fffb9128960
    r10 = 0x0000000000000008   r11 = 0x0000000000000246
    r12 = 0x0000000000000048   r13 = 0x0000000000000000
    r14 = 0x000000000000006c   r15 = 0x0000000000000000
    rip = 0x00007ff964c3ced7
    Found by: given as instruction pointer in context
 1  chrome!GrGLGpu::drawElementsInstancedBaseVertexBaseInstance(GrPrimitiveType, int, unsigned int, void const*, int, int, unsigned int)::$_81::operator()() const + 0x33
    rbp = 0x00007fffb9128bc0   rsp = 0x00007fffb9128bc0
    rip = 0x000055c5c1db6923
    Found by: previous frame's frame pointer
 2  chrome!drawElementsInstancedBaseVertexBaseInstance [GrGLGpu.cpp : 2306 + 0x5]
    rbp = 0x00007fffb9128c10   rsp = 0x00007fffb9128bd0
    rip = 0x000055c5c1db68b6
    Found by: call frame info
 3  chrome!onDrawIndexed [GrGLOpsRenderPass.cpp : 144 + 0x16]

Original change's description:
> Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
> 
> This is a reland of e8c963d474
> 
> Original change's description:
> > Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> > 
> > Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I1d2617f077676b6f36bb723615d527e4aa4b3efe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281057
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-04-01 21:55:43 +00:00
Chris Dalton
d84b691950 Reland "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
This is a reland of e8c963d474

Original change's description:
> Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> 
> Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Change-Id: I79b2d23e5e66d47214898a9068079b6fe2269599
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280806
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-04-01 18:41:53 +00:00
Jim Van Verth
9aa9a683d3 Implement local version of gr_cp and use for GrD3DTextureResourceInfo.
Bug: skia:9935
Change-Id: I4c2d70f69e30f78caca0f49629880565f178f495
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280609
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-04-01 16:06:17 +00:00
Mike Reed
0f5e7581a0 can we remove these entirely?
Change-Id: I3dbf9c25e6e0025cc1686789a089420ebce72bbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280191
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-01 12:13:54 +00:00
Michael Ludwig
7800453ed2 Revert "Use glDraw.*BaseInstance calls to avoid deferred buffer binding"
This reverts commit e8c963d474.

Reason for revert: assert failures: https://logs.chromium.org/logs/skia/4b4b7fcb2ff3fe11/+/steps/dm/0/stdout

Original change's description:
> Use glDraw.*BaseInstance calls to avoid deferred buffer binding
> 
> Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic760a56ca9d112e924baf7e833adb09b371928b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280817
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-03-31 22:34:17 +00:00
Ben Wagner
507e486219 Revert "Enable deprecated-copy-dtor warning."
This reverts commit e990fcc4b0.

Reason for revert: Build-Win-Clang-x86_64-Release-Shared

Original change's description:
> Enable deprecated-copy-dtor warning.
> 
> In C++11 a user declared destructor still requires the compiler to
> implicitly default the copy constructor and copy assignment operator,
> but this is deprecated. Note that a user declared destructor suppresses
> the move constructor and move assignment operator; a user declared
> destructor exists if any '~Foo' method declaration appears inside
> 'class Foo' (even if defaulted); if the copy and move operations are the
> same then copy operations that take 'const Foo&' will do fine double
> duty as move operations.
> 
> Clang seems to have an issue with this warning, in that it does not
> appear to distinguish between compiler defaulted and user defaulted
> destructors. As a result, it does not always warn when it should.
> There may yet be places in the code where a move operation is desired
> but may be suppressed because the implicitly defaulted  moves are not
> declared because a destructor has been declared.
> 
> This wraps dawn and shaderc configs in 'third_party' so that their
> headers will be included through '-isystem' in order to avoid the
> warnings generated by including their headers.
> 
> Change-Id: I681524cd890d86305aa99b6b765a52113b4dfa4b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280406
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=mtklein@google.com,bsalomon@google.com,bungeman@google.com

Change-Id: Icd6a2487637d21fcf7c4c7ab7cba7a8adfda5afd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280836
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-31 22:32:07 +00:00
Ben Wagner
e990fcc4b0 Enable deprecated-copy-dtor warning.
In C++11 a user declared destructor still requires the compiler to
implicitly default the copy constructor and copy assignment operator,
but this is deprecated. Note that a user declared destructor suppresses
the move constructor and move assignment operator; a user declared
destructor exists if any '~Foo' method declaration appears inside
'class Foo' (even if defaulted); if the copy and move operations are the
same then copy operations that take 'const Foo&' will do fine double
duty as move operations.

Clang seems to have an issue with this warning, in that it does not
appear to distinguish between compiler defaulted and user defaulted
destructors. As a result, it does not always warn when it should.
There may yet be places in the code where a move operation is desired
but may be suppressed because the implicitly defaulted  moves are not
declared because a destructor has been declared.

This wraps dawn and shaderc configs in 'third_party' so that their
headers will be included through '-isystem' in order to avoid the
warnings generated by including their headers.

Change-Id: I681524cd890d86305aa99b6b765a52113b4dfa4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280406
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-31 22:15:07 +00:00
Chris Dalton
e8c963d474 Use glDraw.*BaseInstance calls to avoid deferred buffer binding
Change-Id: I968dab317673051acc65f87ea76a0d657d89b3d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279538
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-31 21:09:57 +00:00
Brian Osman
01e6d17fe8 Stop including SkCanvas.h from GrTypesPriv.h
It was too easy to get into circular include chains. Added static
asserts to ensure we keep our quad AA flags in sync. Also, IWYU.

Change-Id: I01aefa264aa56420ab5a46a8ecd9e63c021c79ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280405
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-30 20:43:34 +00:00
Sean Gilhuly
695f57da6c Roll Dawn and add dependencies
Add Dawn's dependencies shaderc and glslang, and roll SPIRV. Update the
BUILD.gn files to match upstream changes.

Bug: skia:9939, chromium:1064563
Change-Id: Ie9720806efe823312da10f7911688f12cad0713e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278770
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
2020-03-30 18:52:06 +00:00
Chris Dalton
80f865fa6d Use GL_ANGLE_base_vertex_base_instance
Adds the ANGLE extension to our list of options for
glDraw*BaseInstance.

Removes glDrawElementsInstancedBaseInstance since this method is not
supported by the ANGLE extension.

Change-Id: Ifd25324feeaad55a4d141b5064bcd8e059948ef7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280388
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-30 17:59:05 +00:00