Commit Graph

49594 Commits

Author SHA1 Message Date
Ravi Mistry
1781c18f06 Rename G3 framework bot to Canary-G3
Adds new builder name schema for "Canary-*".

Bug: skia:10477
Change-Id: I0906c6e2df0af405ae3a2138b0fdeb99a9375853
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300700
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-07-16 15:32:38 +00:00
Mike Klein
f56e1c317a add HALF support to PixelFormat
This is somewhat speculative; the newly supported F16 alpha and F16
red-green formats are not widely used or tested.  This will become
better covered soon by F16 RGBA when I add support for 64-bit pixels.

Change-Id: Ie1260e2bb5e9c057064e3133937ff6910ab84269
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303297
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-07-16 15:29:28 +00:00
Herb Derby
fee89ccefd SkSpan cleanup
* Check index in operator[]
* Use begin/end in const versions
* Remove returning SkSpan{} when empty for first, last, and subspan.

Change-Id: I0348ff8effb01e9175c5afaa52ddb0724f86218d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303259
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-07-16 14:48:58 +00:00
Mike Reed
c47778631e Revert "Revert "remove support for serialized pictures before aug 2019""
This reverts commit 59e1602a52.

Change-Id: Id43c23f80294c42b4f15fe2f3b65247d6e1baac3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302836
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-16 14:32:48 +00:00
Robert Phillips
4e105e2e06 Clean up GrContext references in the src/gpu
This CL tries to remove all uses of GrContext - replacing them with
either GrDirectContext or GrRecordingContext. Preferring the recording
context wherever possible.

Change-Id: I61af94928aa37bc82ff9923acffd57586610f695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302904
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-07-16 14:14:08 +00:00
Mike Klein
2b4404b14b JIT to_half/from_half
Tricky parts:
   - remembering that we're carrying these 8 half floats around
     in a ymm as an I32, not the more natural dense xmm;
   - remembering to fix up the middle 64-bit lanes after vpackusdw
     leaves things in an order you'd have to be Intel to love.

The tests from the previous CL cover this, and pass.

Change-Id: I5dfde54c1392388c82ee9c8274b83bc1d63b6577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303045
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-16 13:43:58 +00:00
Brian Salomon
d198711e46 Revert "Don't avoid disabling subset for planar image draws"
This reverts commit 8f32f1300d.

Reason for revert: changes on chrome roll

Original change's description:
> Don't avoid disabling subset for planar image draws
> 
> Change-Id: Icb34f14d1103a7849813d4b80e7733ba9b743a99
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302638
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I6f7aff58e3e5fd4c6ff6997bf3e13a0191bc2d28
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303257
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-16 13:20:30 +00:00
Greg Daniel
9d02a4c0a9 Using staging buffers for vulkan texture uploads.
Change-Id: I166755b3e385fcea919a6daad8cc8407fda8c27a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303016
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-07-16 13:10:18 +00:00
skia-autoroll
88f65ceefd Roll ANGLE from 4ad0f250a010 to 6fe87f4a226d (14 revisions)
4ad0f250a0..6fe87f4a22

2020-07-15 cnorthrop@google.com Tests: Change screen orientation for traces on Android
2020-07-15 nguyenmh@google.com Add buffer serialization capability
2020-07-15 jonahr@google.com GL: Fix issue with EXTBlendFuncExtendedES3DrawTest
2020-07-15 jmadill@chromium.org Test Runner: Accept Chromium args.
2020-07-15 kbr@chromium.org Revise documentation on adding EGL extensions.
2020-07-15 cnorthrop@google.com Capture/Replay: More ES 3.1 support
2020-07-15 shrekshao@google.com Fix ANGLE_base_vertex_base_instance baseInstances type
2020-07-15 lehoangq@gmail.com Metal: Compile default shader source files separately.
2020-07-15 lehoangq@gmail.com Metal: Implement MSAA default framebuffer.
2020-07-15 jmadill@chromium.org Fix stale validation cache on buffer deletion.
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from fe24a54808c2 to b481744aea1e (5 revisions)
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 94667fbf66ee to 4c33fb0d3dba (12 revisions)
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cd0af6456eb1 to 1de497cc50ab (3 revisions)
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 0bc4c2ae7012 to d8f34456c819 (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 nifong@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:1099763,chromium:1105202
Tbr: nifong@google.com
Test: Test: Capture from beginning of Asphalt 8 and Aztec Ruins
Change-Id: I42c068c939ac8612f1d68fd545a6b40a1bd55357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303196
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-16 05:25:04 +00:00
skia-autoroll
78a1e68458 Roll SwiftShader from 1de497cc50ab to 0a8f44c514ce (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1de497cc50ab..0a8f44c514ce

2020-07-15 bclayton@google.com Regres: Collate and add new documentation for Regres

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 nifong@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: nifong@google.com
Change-Id: Iedff0106b4044d803dab0d1c8f0cd6d9c35482d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303197
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-16 04:52:24 +00:00
skia-autoroll
7d4fbc5f64 Roll dawn from b31f5e717e2d to 1b9b53a39576 (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/b31f5e717e2d..1b9b53a39576

2020-07-16 cwallez@chromium.org dawn.json: Noop fixup for writeTexture.
2020-07-15 kainino@chromium.org Use canned CheckPatchFormatted instead of our own linting
2020-07-15 tommek@google.com Adding TextureZeroInitTests for WriteTexture
2020-07-15 kainino@chromium.org Add .clang-format files and format more files
2020-07-15 natlee@microsoft.com [D3D12] Add DXGIAdapter to AdapterDiscoveryOptions
2020-07-15 tommek@google.com Implementing Queue::WriteTexture in Metal
2020-07-15 sdefresne@chromium.org Convert GN libs lists to frameworks
2020-07-15 kainino@chromium.org Fixes for Emscripten generators
2020-07-15 jiawei.shao@intel.com Optimize B2T and T2B copies with multiple texture layers on D3D12

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: Iaf4735447bea7e6a62e3bf3473107f28857d84e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303138
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-16 04:48:24 +00:00
Florin Malita
cd11a51a11 [skottie] Fix mask difference
Difference [1]:

  The mask is added to the masks above it in the stacking order. In
  areas where the mask does not overlap the masks above it, the mask
  operates as it would alone on the layer. In areas where the mask
  overlaps the masks above it, the influence of the mask is subtracted
  from the masks above it.

^ sure sounds like XOR

[1] https://helpx.adobe.com/after-effects/using/alpha-channels-masks-mattes.html#mask_modes

Bug: skia:10502
TBR=
Change-Id: I8aea937224cfadce54c4fc1d014b63d00efdbec4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303025
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-07-16 01:05:24 +00:00
Jim Van Verth
14982c8e15 Change hairline pathrenderer to avoid vertex buffer reads.
Makes add_quads iterative rather than recursive, and uses
a secondary buffer to handle vertex processing before
writing out to the vertex buffer.

Change-Id: I26606a34b7bfea2dc9c32d7b4ed4651d633e78a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303021
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-15 23:21:23 +00:00
Robert Phillips
07531a0f97 Switch the DDLRecorder over to holding a GrRecordingContext ...
and related changes. This is another CL in the series that is replacing
GrContext with the GrDirectContext/GrRecordingContext pair.

Change-Id: Id0a3cfd5a5f92f7680d9c58f3a1753322311221c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302637
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-15 23:17:03 +00:00
Brian Salomon
a3b02f5278 Rename GrSamplerState::Filter::kBilerp to kLinear
Aligning with SkSamplingMode.

Bug: skia:10344

Change-Id: Ie303c3ca1d664d4c23f779b84c9a661076bd74d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303022
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-15 23:14:14 +00:00
Ben Wagner
c0693db3f5 Remove SkFontArguments::Axis.
Replaced with SkFontArguments::VariationPosition and
SkFontArguments::VariationPosition::Coordinate since the arguments are
about a variation specification and it's coordinates.
SkFontParameters::Axis actually deals with axes and their properties.

Change-Id: I377c9c5efa8e7b7e2649fc038f765062e30391e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302905
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-07-15 20:59:22 +00:00
Mike Klein
4d680cdf07 a bunch of half-related stuff
- add f32<->f16 functions to skvx
  - add f32<->f16 x86 instructions to skvm::Assembler
  - add f32<->f16 ops to skvm,
    using the skvx functions in the interpreter

Still TODO:
    use the new x86 instructions in the JIT

(For now like in many other ways, the aarch64 JIT
continues to languish.  Will pick that back up one day.)

Change-Id: Ib8dc1ccdc75ecb23769ea4947d66d3ab22520f23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302942
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-07-15 20:47:31 +00:00
Elliot Evans
72b8aea019 Fix experimental_simd CanvasKit build.
Although it appeared that the experimental_simd CanvasKit build was
working, the build was not producing actual wasm SIMD operations. This
CL fixes that issue by changing the build arguments.

This issue also fixes an incorrect type issue with the SkVx wasm SIMD
implementation.

Bug: skia:10453
Change-Id: If26f84b09e4d84df36be589245878c821972dffc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302669
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-15 20:39:42 +00:00
Adlai Holler
3de2a56407 Remove makeSubset compatibility flag
The migration landed in Chrome CL 2295982

Bug: skia:104662
Change-Id: I3e79759059e81577d80bc98d67f1d76da3f38ed7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303017
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-15 20:08:33 +00:00
Greg Daniel
5ee964e2a2 Reland "Roll dawn from 0d52f800a1d1 to b31f5e717e2d (4 revisions)"
This reverts commit 06980dba90.

Reason for revert: probably wrong guess on revert

Original change's description:
> Revert "Roll dawn from 0d52f800a1d1 to b31f5e717e2d (4 revisions)"
> 
> This reverts commit 14fdcdc891.
> 
> Reason for revert: speculative revert to see if this is cause the d3d failures.
> 
> Original change's description:
> > Roll dawn from 0d52f800a1d1 to b31f5e717e2d (4 revisions)
> > 
> > Also includes a build file fix for glslang.
> > 
> > https://dawn.googlesource.com/dawn.git/+log/0d52f800a1d1..b31f5e717e2d
> > 
> > 2020-07-14 enga@chromium.org Remove kMaxBindingsPerGroup limit
> > 2020-07-14 rharrison@chromium.org Roll 5 dependencies
> > 2020-07-14 kainino@chromium.org Skip clang-format on Windows
> > 2020-07-14 cwallez@chromium.org Rolling build dependencies.
> > 
> > Also rolling transitive DEPS:
> >   https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 29c9135d06f1 to b481744aea1e
> >   https://chromium.googlesource.com/external/github.com/google/shaderc from 1402ed576596 to 5515d2a0c20c
> > 
> > Change-Id: I8af4c9a0bcd031fde120c9b2108b3bd2c1db0174
> > Bug: None
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302796
> > Reviewed-by: Eric Boren <borenet@google.com>
> > Commit-Queue: Eric Boren <borenet@google.com>
> 
> TBR=borenet@google.com,bsalomon@google.com,cwallez@chromium.org
> 
> Change-Id: Ieae7fe809da0a9b9404da26163c96015f97e9761
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: None
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302898
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=borenet@google.com,egdaniel@google.com,bsalomon@google.com,cwallez@chromium.org

# Not skipping CQ checks because this is a reland.

Bug: None
Change-Id: I8aa7e8740eb7c7da2197b3fd19bd19b9d94124cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303018
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-07-15 19:42:03 +00:00
Ben Wagner
e80a595401 Implement SkFontMgr::onMakeFromFontData in subclasses.
The current serialization format for variations stores only the values
(without the axis names) and relies on the order of the axes for
deserialization. Even after this deficiency is corrected, it will still
be needed for legacy skps.

Add a real test which ensures variable font printing works correctly
in Chromium. The old test was essentially testing MakeFromFontData
against itself instead of creating a font with variations as a user
would.

Bug: chromium:1070089
Change-Id: Ia6eaac91b2ac58795b7ba61c2b52b2f22ef079bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299457
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-07-15 18:29:23 +00:00
Michael Ludwig
0e15cfb585 Support releasing blocks while iterating them
This makes reset() a little easier to follow, and enables more complex
use cases on top of GrBlockAllocator down the road.

Change-Id: Id79d20e2b394248c997259d6d5b5494fc1456acc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302678
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-07-15 18:27:53 +00:00
Jim Van Verth
b46105539e Add new GM to test hairline subdivision.
As I'm changing the subdivision method, I want to have a baseline to
make sure I don't break anything.

Change-Id: I655c658589c7229ae37d7b8588ff70325afeaa61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302907
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-15 18:16:24 +00:00
Julia Lavrova
70258c79be add SkParagraph to public headers and fix warnings
Change-Id: Icb62636e96f1fecb97c4f4c918d073ab611420f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-07-15 17:56:43 +00:00
Florin Malita
cd241f1b6a [skottie] Improved pucker/bloat center heuristic
AE appears to use the center of the shape bounding box.

TBR=
Change-Id: I965175dcc28cc9a8903b959a42b108d72767ef28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302639
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-07-15 17:38:33 +00:00
Michael Ludwig
26b4ffd362 Generalize iterator in GrTAllocator to be useful for other data types
This allows the iterator type/boilerplate to be reused for any other
data collection that sits above GrBlockAllocator, as long as its a fixed
"type" with indices into a block.

Also adds reverse iteration (which is useful for stack-like use cases).

Change-Id: Id9a205e8fb396a8558e360439240fd20c92c9700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302665
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-15 17:30:43 +00:00
Adlai Holler
3a22017402 Reland "Add a direct context arg to makeColorTypeAndColorSpace"
This reverts commit 779813a239.

Reason for revert: Avoid null dereference in DDL test case

Original change's description:
> Revert "Add a direct context arg to makeColorTypeAndColorSpace"
>
> This reverts commit a56da9ee92.
>
> Reason for revert: UBSAN complains in Vulkan OOPRDDL mode
>
> Original change's description:
> > Add a direct context arg to makeColorTypeAndColorSpace
> >
> > This is part of a larger effort to de-power SkImage and force users to
> > specify the GPU context for all new images.
> >
> > Staging flag landed in Chrome CL 2296632.
> >
> > Bug: skia:10466
> > Change-Id: I6b7bbec10369f7d8ee884dd1bcc234d332c30a6c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302290
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: Ide36bed6966d3d92ad6b8d05f897d22d287b40b1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10466
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302824
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

Bug: skia:10466
Change-Id: I59de0bd2b33989b1af08e8af2f8a52542b6b5db0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302829
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-15 17:21:44 +00:00
Mike Klein
b2290d7a8b minor skvm cleanup
This is just minor little stuff I've been meaning to do,
with essentially no impact anywhere.

   - Add an easy-to-flip switch to disable the JIT.

   - Stop checking so carefully whether we hasJIT()
     in test_jit_and_interpreter().  This was helpful
     for making progress but now just gets in the way.

Change-Id: I08065ba1f42700f9d7d63f8303af357ec5fe11ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302944
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-07-15 17:10:03 +00:00
Brian Osman
44fafa6b74 Clean up some boilerplate in runtimeshader.cpp
Change-Id: I068f71d94d506213e6c9b24d7fe5c6d6187e5ac0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302902
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-07-15 16:50:13 +00:00
Mike Klein
e552f925da add store(PixelFormat,...)
Add store(PixelFormat,...) to mirror earlier load/gather.
Use store() in SkVMBlitter to let us to write to any format
supported by SkColorType_to_PixelFormat().

This means we can read and write all the same formats now.  There's a
note on the SkColorType enum about some SkColorTypes being read-only,
but I've taken that to be descriptive and not proscriptive.

It's worth paying attention to grayscale.  Gray PixelFormats hold the
same bit size and shift for each of r,g,b so load/gather just naturally
unpack the same value into each channel.  When we want to store gray we
need to dot r,g,b together, here back into the red channel to
accommodate future gray-alpha.

Change-Id: I81ad252a35e2534d2d8c6123354b1d19c7018898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302330
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-07-15 16:43:13 +00:00
Mike Klein
03c932c74f generalize skvm pixel unpacking
Add a PixelFormat struct and use it to load/gather_unorm().  This handles
loading all pixel formats that are unorm and can fit in 32 bits, with
float and larger formats to follow.  That means this adds SkVMBlitter
support for reading A8, G8, 4444, R8G8, A16_unorm, and R16G16_unorm.

Next step will do the same for stores, allowing arbitrary destinations.

Change-Id: Iabbf6171ee6d5abb44cf131eda6647980767c396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302252
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-07-15 15:45:50 +00:00
Michael Ludwig
1846ba3f08 QoL improvements to GrTAllocator
-Adds main comment
-Simplify constructor
-Avoid running trivial destructors (maybe compilers would know to remove the entire loop, but this helps make that clearer).

Change-Id: I3825ef21c0d74933df54ca4f532492e5c997f0e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302642
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-07-15 14:45:00 +00:00
Herb Derby
af3ae69335 Reland "rename MakePath to Make"
This is a reland of 36132b2aea

Original change's description:
> rename MakePath to Make
> 
> Change-Id: Ibdee0835308401fce99ff9e4d98486c4808f84a2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302683
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: I36c1c0625af8e9afff34d891995ca7aff8f169bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302896
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-07-15 14:43:50 +00:00
Brian Salomon
8f32f1300d Don't avoid disabling subset for planar image draws
Change-Id: Icb34f14d1103a7849813d4b80e7733ba9b743a99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302638
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-15 14:34:50 +00:00
Greg Daniel
06980dba90 Revert "Roll dawn from 0d52f800a1d1 to b31f5e717e2d (4 revisions)"
This reverts commit 14fdcdc891.

Reason for revert: speculative revert to see if this is cause the d3d failures.

Original change's description:
> Roll dawn from 0d52f800a1d1 to b31f5e717e2d (4 revisions)
> 
> Also includes a build file fix for glslang.
> 
> https://dawn.googlesource.com/dawn.git/+log/0d52f800a1d1..b31f5e717e2d
> 
> 2020-07-14 enga@chromium.org Remove kMaxBindingsPerGroup limit
> 2020-07-14 rharrison@chromium.org Roll 5 dependencies
> 2020-07-14 kainino@chromium.org Skip clang-format on Windows
> 2020-07-14 cwallez@chromium.org Rolling build dependencies.
> 
> Also rolling transitive DEPS:
>   https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 29c9135d06f1 to b481744aea1e
>   https://chromium.googlesource.com/external/github.com/google/shaderc from 1402ed576596 to 5515d2a0c20c
> 
> Change-Id: I8af4c9a0bcd031fde120c9b2108b3bd2c1db0174
> Bug: None
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302796
> Reviewed-by: Eric Boren <borenet@google.com>
> Commit-Queue: Eric Boren <borenet@google.com>

TBR=borenet@google.com,bsalomon@google.com,cwallez@chromium.org

Change-Id: Ieae7fe809da0a9b9404da26163c96015f97e9761
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302898
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-07-15 14:24:02 +00:00
Greg Daniel
a58db7f87e Add GrStagingBufferManager and use GrGpuBuffers to manage caching.
With this change if a backend Gr*Gpu wants to using staging buffers
they just add a generic GrStagingBufferManager member object. This
object can be used to get slices of upload buffers. Then they just need
to implement the virtual for taking ownership of buffers during submit.

We rely on our GrResourceCache to handle caching and reuse of these
buffers.

This change allows us to remove all other virtuals on GrGpu around
managing staging buffers.

Change-Id: I5db9a3c52133978ea89d6c0de440f434fbf91a51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300226
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
2020-07-15 14:17:50 +00:00
Mike Reed
13711ebe68 rename SkMipMap to SkMipmap
Change-Id: I1fa8a0482a717847236a30b4851061f4074b7755
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-15 13:26:13 +00:00
Adlai Holler
779813a239 Revert "Add a direct context arg to makeColorTypeAndColorSpace"
This reverts commit a56da9ee92.

Reason for revert: UBSAN complains in Vulkan OOPRDDL mode

Original change's description:
> Add a direct context arg to makeColorTypeAndColorSpace
> 
> This is part of a larger effort to de-power SkImage and force users to
> specify the GPU context for all new images.
> 
> Staging flag landed in Chrome CL 2296632.
> 
> Bug: skia:10466
> Change-Id: I6b7bbec10369f7d8ee884dd1bcc234d332c30a6c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302290
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ide36bed6966d3d92ad6b8d05f897d22d287b40b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10466
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302824
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-07-15 13:02:55 +00:00
Kevin Lubick
79d88fe4d1 [canvaskit] Quick fix for older skp format
As a quick fix, this SKP was downloaded from https://fiddle.skia.org/c/cbb8dee39e9f1576cd97c2d504db8eee

I intend to land a bit of code that will programmatically
regenerate this (and potentially other SKPs that we test
against)

Change-Id: Iaea23c3ec9c42117e851bee5e6d423366ab7c669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302837
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-15 12:30:50 +00:00
Corentin Wallez
14fdcdc891 Roll dawn from 0d52f800a1d1 to b31f5e717e2d (4 revisions)
Also includes a build file fix for glslang.

https://dawn.googlesource.com/dawn.git/+log/0d52f800a1d1..b31f5e717e2d

2020-07-14 enga@chromium.org Remove kMaxBindingsPerGroup limit
2020-07-14 rharrison@chromium.org Roll 5 dependencies
2020-07-14 kainino@chromium.org Skip clang-format on Windows
2020-07-14 cwallez@chromium.org Rolling build dependencies.

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 29c9135d06f1 to b481744aea1e
  https://chromium.googlesource.com/external/github.com/google/shaderc from 1402ed576596 to 5515d2a0c20c

Change-Id: I8af4c9a0bcd031fde120c9b2108b3bd2c1db0174
Bug: None
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302796
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-07-15 12:16:50 +00:00
skia-autoroll
b92d53afbe Roll ANGLE from d98afb787a24 to 4ad0f250a010 (9 revisions)
d98afb787a..4ad0f250a0

2020-07-14 jmadill@chromium.org Revert "Vulkan: Enable VK_KHR_get_memory_requirements2 extension"
2020-07-14 timvp@google.com Update README.md to indicate GLES 3.1 conformance
2020-07-14 lehoangq@gmail.com Metal: Create a dedicated class for Window Surface.
2020-07-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from 2a164e9680a5 to 858b13a1220a (1 revision)
2020-07-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from d704d1bc0e11 to 0bc4c2ae7012 (1 revision)
2020-07-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ad65826a2ab1 to cd0af6456eb1 (5 revisions)
2020-07-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 4e13c90944e9 to fe24a54808c2 (3 revisions)
2020-07-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from 68bfbc219497 to 521eaacef67a (1 revision)
2020-07-14 syoussefi@chromium.org Vulkan: Fix resolve draw path

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 nifong@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:1105609
Tbr: nifong@google.com
Change-Id: I787e953d2ad8e3f3696ff4acc265612b724befb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302764
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-15 05:16:59 +00:00
skia-autoroll
97e24e31d1 Roll Chromium from 2a68959faa37 to c28de0e53968 (434 revisions)
2a68959faa..c28de0e539

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 nifong@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: nifong@google.com
Change-Id: I5808b9bdf22a6b3a54f5966f30426a2acce7d4d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302763
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-15 05:00:00 +00:00
skia-autoroll
6e7083de35 Roll SwiftShader from cd0af6456eb1 to 1de497cc50ab (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/cd0af6456eb1..1de497cc50ab

2020-07-14 natsu@google.com Support Gralloc3 in SwiftShader
2020-07-14 swiftshader.regress@gmail.com Regres: Update test lists @ cd0af645
2020-07-14 capn@google.com Undefine Bool after the headers that define them

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 nifong@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: nifong@google.com
Change-Id: I30a871a2cc3f8b7a8f20315a945902d514a86c76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302766
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-15 04:47:49 +00:00
Herb Derby
9421094d01 Revert "rename MakePath to Make"
This reverts commit 36132b2aea.

Reason for revert: Draws so wrong.

Original change's description:
> rename MakePath to Make
> 
> Change-Id: Ibdee0835308401fce99ff9e4d98486c4808f84a2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302683
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=herb@google.com,robertphillips@google.com

Change-Id: I6af8bca927fd791b6b5020b0ac14660e206f640c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302776
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-07-15 01:47:11 +00:00
Herb Derby
36132b2aea rename MakePath to Make
Change-Id: Ibdee0835308401fce99ff9e4d98486c4808f84a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302683
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-07-15 01:31:49 +00:00
Mike Reed
59e1602a52 Revert "remove support for serialized pictures before aug 2019"
This reverts commit 380fba6e4b.

Reason for revert: try to fix android-pie-arm64-rel for chrome roll

Original change's description:
> remove support for serialized pictures before aug 2019
> 
> Change-Id: I9b2a2dbac4110665e06882b9cbbc6f59e6bc0c21
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302397
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bungeman@google.com,rmistry@google.com,fmalita@chromium.org,reed@google.com,michaelludwig@google.com

Change-Id: Iad0c262b1aaa966cfdb2756737b2460247f830dd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302679
Reviewed-by: Mike Reed <reed@google.com>
2020-07-15 00:10:59 +00:00
Adlai Holler
a56da9ee92 Add a direct context arg to makeColorTypeAndColorSpace
This is part of a larger effort to de-power SkImage and force users to
specify the GPU context for all new images.

Staging flag landed in Chrome CL 2296632.

Bug: skia:10466
Change-Id: I6b7bbec10369f7d8ee884dd1bcc234d332c30a6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302290
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-14 22:36:49 +00:00
John Stiles
886a904595 Update SkTQSort to use half-open ranges.
C++ algorithms have largely standardized on a [begin, end) half-open
range, as seen in standard library containers. SkTQSort now adheres to
this model, and takes vec.begin() and vec.end() as its inputs.

To avoid confusion between inclusive and half-open ranges inside the
implementation, internal helper functions now take "left" and "count"
arguments instead of "left"/"right" or "begin"/"end". This avoids any
ambiguity.

(Although performance was not the main goal, this CL appears to
slightly improve our sorting benchmark on my machine.)

Change-Id: I5e96b6730be96cf23d001ee0915c69764b2c024a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302579
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-14 22:13:59 +00:00
Brian Osman
a7685b2343 Runtime effects: Allow null children
Two related things:
1) SkRuntimeEffect will allow null child shaders when calling
   makeshader. This will produce a GrSkSLFP with null FP children.
   Fix some code that assumed that children were non-null.
2) Change the input color passed to any children to be the SkSLFP's
   input color, rather than the default (white). This lets nullptr
   children in runtime effect have the desired behavior (they are the
   paint color or similar, depending on context).

Change-Id: Iabffc50b0a893a56403c5240f32a5da6a88d81f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301980
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-14 21:33:57 +00:00
Joe Gregorio
3bbde3a092 Add one R preview bot.
Bug: skia:10371
Change-Id: I3e5c8b34b7b80fff492de11ec769b33e2be3671c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302577
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2020-07-14 21:22:27 +00:00