Commit Graph

3537 Commits

Author SHA1 Message Date
John Stiles
c5e6515e4a Rename ES2 error tests from 'H' through 'M' to .rts.
In a few cases, this involved splitting a test into two (an ES2-
compatible portion and a ES3+ portion).

Change-Id: Ie6f18f787cf7c10696a2841ff538bbe2b95bf50d
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523187
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-03-22 16:54:32 +00:00
Michael Ludwig
0378307904 Move skgpu::v1-specific [Stroke|Path]Tessellators out of tessellate/
The static functionality for writing vertex buffers, constants, and
utility functions that were in the StrokeTessellator and PathTessellator
classes have been moved into Tessellation.h and a new
FixedCountBufferUtils.h.

The tessellator hierarchy has been moved into src/gpu/ops and all the
v1 guards are removed since they were already solely v1 after the static
functions were lifted out. The hierarchy and subclasses are preserved
but have been combined into just StrokeTessellator.h and
PathTessellator.h instead of separate files for the subclasses.

All the rest of the little changes are updating references and includes.

Bug: skia:13012
Change-Id: I90f2f53538349cf9ad1823a0c42fbdc772190a49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523189
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-22 16:04:13 +00:00
Jim Van Verth
54340beba7 [graphite] Add skgpu::Image::onReadPixels.
Creates a new shared routine ReadPixelsHelper used by this and
Device::readPixels(). Also added MakeBitmapProxyView to the
shared file and cleaned up some headers.

Bug: skia:12845
Change-Id: I05533d2f47688daf4f14c8171eb7cd7178b4c0ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521958
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-22 15:37:23 +00:00
Robert Phillips
f8df8d8896 [graphite] Make PipelineDataCache templated
We are going to cache (and uniquify) the UniformBlocks and TextureBlocks
separate from each other.

Bug: skia:12701
Change-Id: I03837c4a38a9bdeb4224a697eab119fca24e8f8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522916
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-22 14:45:07 +00:00
John Stiles
2fdcca2777 Rename ES2 error tests from 'C' through 'G' to .rts.
A few tests received minor tweaks to make them Runtime Effect-friendly.

Change-Id: I9b4f66b0974c41d38324dfbb31ac9849338f600a
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523186
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-03-21 22:50:58 +00:00
Michael Ludwig
1979ef6d56 [graphite] Share Path[Curve|Wedge|]Tessellator sources between graphite and ganesh
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Change-Id: I2ee0fd8d208bb10e011a5552a60a1a62d7a56ba9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522423
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-21 18:50:53 +00:00
John Stiles
0d226afee9 Rename ES2 error tests starting with 'B' to .rts.
A few tests received minor tweaks to make them Runtime Effect-friendly.

Change-Id: Icbcedb84b7882e42f21425b2d40d7819705c359e
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522918
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-03-21 16:49:17 +00:00
John Stiles
1beeab415c Rename Runtime Effect-compatible ES2 error tests to .rts.
This is useful because it will allow these tests to be supported in
Android CTS, where only Runtime Effects are API-accessible.

This CL updates the C++ test harness so that .rts files in the error/
directory are found, and tweaks error tests as necessary to make them
Runtime Effect-compatible. For instance, Runtime Effects enforce the
parameters on main(), which adds extra errors that we don't want. And
some error tests require ES3 (e.g. array constructors) and so those
tests remain as .sksl files.

In this CL, only tests beginning with A are updated. The remaining tests
will be updated in followup CLs.

Change-Id: I70b064df4f0b3ed02d6bc8cc9add7ee844a78691
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522424
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2022-03-21 16:49:17 +00:00
Michael Ludwig
c71ae51400 [graphite] Implement stencil wedge tessellated path rendering
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: Iccdbc4f95c6d714d58f21fa5d23bdd14eb1f88ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522096
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-21 01:16:04 +00:00
Michael Ludwig
d640b7e4e2 [graphite] Move stencil-and-cover RenderSteps into separate headers
Progress on exposing the RenderSteps used in the one renderer for
re-use with new renderers.

Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I134c79c37f2cdee40558161c9e73dc3221188e67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521959
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-18 19:02:11 +00:00
Colin Cross
350ce03adc Tweak linux_glibc properties for musl builds in external/skia
For convenience, builds against musl libc currently use the
linux_glibc properties because they are almost always linux-specific
and not glibc-specific.  In preparation for removing this hack,
tweak the linux_glibc properties by either moving them to host_linux,
which will apply to linux_glibc, linux_musl and linux_bionic, or
by setting appropriate musl or linux_musl properties.  Properties
that must not be repeated while musl uses linux_musl and also still
uses the linux_glibc properties are moved to glibc properties, which
don't apply to musl.  Whether these stay as glibc properties or get
moved back to linux_glibc later once the musl hack is removed is TBD.

Bug: b/223257095
Test: m checkbuild
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ie2067df4271558a0a2dc67e947d027c32f7db9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521361
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2022-03-18 19:01:05 +00:00
Michael Ludwig
df7c47a094 [graphite] Make stencil-and-cover stencil settings accessible
This is in preparation for additional tessellation-based RenderSteps.

Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I497ea14802201be10535ee26147838b28ab6b34d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521957
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-18 17:22:04 +00:00
Ethan Nicholas
5e035c66da Added safety checks to SkSL error reporting
This adds an assert to Position::line() to ensure that we don't run
past the end of the source string. Since the source string can
contain embedded nulls, we also switch the source handling from
const char* to std::string so we can accurately determine its length.

Change-Id: I9df47e98c1a0cbc35222a0ea709d9403762210d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521656
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-17 16:06:06 +00:00
Robert Phillips
9565f4bd90 [graphite] Plumb Recorder down into KeyHelpers
The KeyContext is used in the addToKey methods but must appear in the
AddToKey methods bc the latter can call the former.

Bug: skia:12701
Change-Id: I3143afec8337b1e3e12f1c3cc198714009ca6930
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/520539
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-15 18:06:05 +00:00
Arman Uguray
e70f2e0e0f [sksl][test] Add more folding tests for side-effecting expressions
Moved the MatrixFoldingES2.sksl test case for matrix construction with
side-effects into a new PreserveSideEffects.sksl test and added new test
cases for various vector and matrix types and constructors. The new test
is written such that none of its contents should be folded away.

Note: This test does not pass on NVIDIA GPUs when using OpenGL as
discussed in skia:13035. Notably, NONE of the increments are executed on
those GPUs as ALL increment expressions seemingly get subjected to
constant-folding. The test is disabled on NVIDIA GPU bots.

This also means that the remaining MatrixFoldingES2.sksl tests now work
on NVIDIA GPUs when using OpenGL (with the exception of Tegra3 + OpenGL
ES).

Bug: skia:13035, skia:11919
Change-Id: I561bb62fe2b6b814ba80fbc492d3885bbcd6b65b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518278
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-03-10 18:06:12 +00:00
Michael Ludwig
5eb9e9e88c Reland "Convert PatchWriter to trait-oriented template"
This reverts commit bad94bc85a.

Reason for revert: the reverted CL moved the updateStrokeParamsAttrib
call into updateTolerances(), but forgot to guard it with checking
the PatchAttrib.

Original change's description:
> Revert "Convert PatchWriter to trait-oriented template"
>
> This reverts commit 2393b88311.
>
> Reason for revert: Asserts on ASAN bots.
>
> Original change's description:
> > Convert PatchWriter to trait-oriented template
> >
> > This allows the different variations to have compile-time optimizations
> > for certain features related to stroking, curve-filling, or wedges.
> > Additionally, it extends the attrib writing system to let graphite take
> > advantage of compile-time-only attribute configs and avoid using
> > VertexWriter::If per patch.
> >
> > Benchmark                              Orig   ->   ToT    ->   CL
> > StrokeFixedCountTessellator_motionmark 845us  ->  904us   ->  871us
> > StrokeFixedCountTessellator_one_chop   3.03ms ->  3.29ms  ->  2.89ms
> > StrokeFixedCountTessellator            2.15ms ->  2.21ms  ->  1.93ms
> > StrokeHardwareTessellator_motionmark   560us  ->  601us   ->  551us
> > StrokeHardwareTessellator_one_chop     2.45ms ->  4.23ms  ->  3.89ms
> > StrokeHardwareTessellator              395us  ->  478us   ->  399us
> > PathWedgeTessellator                   313us  ->  407us   ->  367us
> > PathCurveTessellator                   278us  ->  335us   ->  331us
> >
> > With these results from my workstation, we nearly recovered the
> > regression on the SFCT_motionmark benchmark and exceeded original perf
> > on the SFCT_on_chop and SFCT benchmarks. SHT_motionmark and SHT have
> > returned to original, and SHT_one_chop has improved. I'm less concerned
> > about bringing that back down since SHT is on the chopping block. We see
> > some improvements on the PWT and PCT benches.
> >
> > Change-Id: Id76d34089dbaa50fe7d5f82fe54ee3cf605d0c24
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512577
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Change-Id: Ief826c4e489742df98dbe7a38165dd72537ece3d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519076
> Auto-Submit: Brian Osman <brianosman@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: skia:13012
Change-Id: Ife3e8b30c7e817b253f957b9ebd55f540b60be92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519077
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-10 14:08:29 +00:00
Brian Osman
bad94bc85a Revert "Convert PatchWriter to trait-oriented template"
This reverts commit 2393b88311.

Reason for revert: Asserts on ASAN bots.

Original change's description:
> Convert PatchWriter to trait-oriented template
>
> This allows the different variations to have compile-time optimizations
> for certain features related to stroking, curve-filling, or wedges.
> Additionally, it extends the attrib writing system to let graphite take
> advantage of compile-time-only attribute configs and avoid using
> VertexWriter::If per patch.
>
> Benchmark                              Orig   ->   ToT    ->   CL
> StrokeFixedCountTessellator_motionmark 845us  ->  904us   ->  871us
> StrokeFixedCountTessellator_one_chop   3.03ms ->  3.29ms  ->  2.89ms
> StrokeFixedCountTessellator            2.15ms ->  2.21ms  ->  1.93ms
> StrokeHardwareTessellator_motionmark   560us  ->  601us   ->  551us
> StrokeHardwareTessellator_one_chop     2.45ms ->  4.23ms  ->  3.89ms
> StrokeHardwareTessellator              395us  ->  478us   ->  399us
> PathWedgeTessellator                   313us  ->  407us   ->  367us
> PathCurveTessellator                   278us  ->  335us   ->  331us
>
> With these results from my workstation, we nearly recovered the
> regression on the SFCT_motionmark benchmark and exceeded original perf
> on the SFCT_on_chop and SFCT benchmarks. SHT_motionmark and SHT have
> returned to original, and SHT_one_chop has improved. I'm less concerned
> about bringing that back down since SHT is on the chopping block. We see
> some improvements on the PWT and PCT benches.
>
> Change-Id: Id76d34089dbaa50fe7d5f82fe54ee3cf605d0c24
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512577
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Change-Id: Ief826c4e489742df98dbe7a38165dd72537ece3d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/519076
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-03-10 00:29:04 +00:00
Michael Ludwig
2393b88311 Convert PatchWriter to trait-oriented template
This allows the different variations to have compile-time optimizations
for certain features related to stroking, curve-filling, or wedges.
Additionally, it extends the attrib writing system to let graphite take
advantage of compile-time-only attribute configs and avoid using
VertexWriter::If per patch.

Benchmark                              Orig   ->   ToT    ->   CL
StrokeFixedCountTessellator_motionmark 845us  ->  904us   ->  871us
StrokeFixedCountTessellator_one_chop   3.03ms ->  3.29ms  ->  2.89ms
StrokeFixedCountTessellator            2.15ms ->  2.21ms  ->  1.93ms
StrokeHardwareTessellator_motionmark   560us  ->  601us   ->  551us
StrokeHardwareTessellator_one_chop     2.45ms ->  4.23ms  ->  3.89ms
StrokeHardwareTessellator              395us  ->  478us   ->  399us
PathWedgeTessellator                   313us  ->  407us   ->  367us
PathCurveTessellator                   278us  ->  335us   ->  331us

With these results from my workstation, we nearly recovered the
regression on the SFCT_motionmark benchmark and exceeded original perf
on the SFCT_on_chop and SFCT benchmarks. SHT_motionmark and SHT have
returned to original, and SHT_one_chop has improved. I'm less concerned
about bringing that back down since SHT is on the chopping block. We see
some improvements on the PWT and PCT benches.

Change-Id: Id76d34089dbaa50fe7d5f82fe54ee3cf605d0c24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512577
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-09 21:51:11 +00:00
Nathaniel Nifong
0832e2081d add one more test suite category for skqp
Change-Id: I3d49bfab23870bb8f96b800d5ecec8730a0b41a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516377
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-03-09 19:44:12 +00:00
Kevin Lubick
57c1541715 Remove old experiments
These are unowned and/or unused.

Change-Id: I2ca871be712a7bf990ff89acc23b6a519bb19374
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517996
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-08 19:07:00 +00:00
Robert Phillips
335a1d0454 [graphite] Split SkPipelineData out into its own file(s)
SkPipelineData is evolving into a big deal - it deserves it owns files.

Bug: skia:12701
Change-Id: I78b4100f1b90fa10f2b264e6d13fca6f15bba39b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516157
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-08 16:04:35 +00:00
Robert Phillips
0c43db950c [graphite] Make GrBlend shareable between Graphite and Ganesh
Additionally make the enums enum-classes.

We will need this to specify fixed function blend modes in Graphite.

This CL is mainly mechanical (i.e., global replace) but some fix-ups were required for our internal bit twiddling with the enum-classes.

Bug: skia:12701
Change-Id: I67abcf8274d14e691974cf253bf65dcb4697bd9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515318
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-08 14:51:44 +00:00
John Stiles
b8cee7dab3 Reject operators =, ==, and != on void types.
The fuzzer discovered that we allow == on void types (confusing the SkVM
backend).

Change-Id: Ia9494642faf67f3f86e3a365807be8bd4a7062e4
Bug: skia:13026
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516796
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-03-07 14:10:29 +00:00
John Stiles
1c2b4492b8 Only run vector-folding logic on vectors.
Previously, we would take the vector-folding path for all types. This
didn't cause any problem for scalars, but failed for "zero-size" types
like void. It isn't valid to compare zero-size values, but we currently
don't reject such code (see skia:13026), and the fuzzer noticed this.
It's safest to only run the vector-folding code when we actually have
multiple slots that need to be folded into one result.

Change-Id: I0bc88043d9a4aeea38ae24dc1a6d1a7430d3d7b0
Bug: oss-fuzz:45279, skia:13026
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516676
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-03-07 13:58:17 +00:00
John Stiles
d9f9f1813c Add test demonstrating issue with function calls.
If a function is called multiple times on one line, stepping over that
line does not show all of the function-call results. It only shows the
last result.

e.g. in this example, I have just stepped over the first line which
calls "get" three times. We should see three results, but we only see
one: http://screen/3WfJoZWm77cSexM

In this test you can see that all three calls to `get` are assigned to
the same slot, $15.

Change-Id: Id0c486ef349a1e527001efbcee2ed2b836f56e83
Bug: skia:13011
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/514577
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-03-03 20:55:25 +00:00
Robert Phillips
b61366b54f [graphite] Rename SkUniformBlock to SkPipelineData
and:
 UniformCache -> PipelineDataCache
 UniformCacheTest -> PipelineDataCacheTest

Bug: skia:12701
Change-Id: Ia28c223edb8d741d15fa9fa83695ac6b99284d5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/514156
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-02 17:01:07 +00:00
Arman Uguray
5f16ed4c58 [sksl] Special-case unary negation on matrix types in MSL/SPIR-V
MSL does not support the unary "-" operator on matrix types. Similarly
the SPIR-V OpFNegate/OpSNegate operations only work on scalar and vector
type.

* An expression such as "-<mat>" is now transformed to "-1.0 * <mat>" when
generating MSL.
* The same expression now generates a component-wise negation in SPIR-V,
matching what glslang outputs for GLSL.
* A unary "+" is now treated as NOP for MSL, matching the SPIR-V backend.
An expression such as "+<expr>" is now evaluated as "<expr>".
* The shared/Negation.sksl has been moved to folding/ as much of its
contents exercise constant-folding of comparison expressions.
* The shared/UnaryPositiveNegative.sksl test has been extended to
exercise scalar and matrix types.

NOTE: The SPIR-V backend changes have caused a minor re-ordering of SSA
IDs generated when writing out a prefix-expression. The affected gold
files have been updated.

Bug: skia:12627, skia:12992
Change-Id: Iec5cdafc591aed7e49b3b52bda42a02661380bab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/513976
Auto-Submit: Arman Uguray <armansito@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-03-01 20:14:46 +00:00
Nathaniel Nifong
7b75ff872b add test_suites attribute to CtsSkQPTestCases build target
Change-Id: I064a64f793410732a6f79176a9d4801da92a0169
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/513892
Auto-Submit: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2022-03-01 18:09:43 +00:00
Florin Malita
5deac30482 Add missing SkTrimPathEffect to skia_effects_public
Change-Id: I74d70e878827ac083b3652bcda8f2d5f64798a78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/513937
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-28 22:42:44 +00:00
Julia Lavrova
5716c3ffa4 Reland "Reland "Adding a trace to nanobench for RP/VM comparison""
This reverts commit 0e48516aae.

Reason for revert: Again trying to land this CL
Original change's description:
> Revert "Reland "Adding a trace to nanobench for RP/VM comparison""
>
> This reverts commit 94b8dd6710.
>
> Reason for revert: https://ci.chromium.org/p/chromium/builders/try/android-marshmallow-x86-rel appears to either not support this instruction or it is disabled.
>
> Original change's description:
> > Reland "Adding a trace to nanobench for RP/VM comparison"
> >
> > This reverts commit 39728eb980.
> >
> > Reason for revert: Need to reland after I figure out what happened
> >
> > Original change's description:
> > > Revert "Adding a trace to nanobench for RP/VM comparison"
> > >
> > > This reverts commit e855b1273f.
> > >
> > > Reason for revert: breaking the tree
> > >
> > > Original change's description:
> > > > Adding a trace to nanobench for RP/VM comparison
> > > >
> > > > Run nanobench with --compare key and collect data for comparison:
> > > > ./out/Release/nanobench --csv --config 8888 --skvm --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
> > > > ./out/Release/nanobench --csv --config 8888 --forceRasterPipeline --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee RP.data
> > > > awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0 {vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10; vmvminterp[$3] = $11;  vmrpcycle[$3] = $14; vmrpscan[$3] = $16; vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1  {print $3, vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8, $10, $11, $14, $16, $18} ENDFILE {fileNum += 1}' VM.data RP.data > compare.csv
> > > >
> > > > You can see an example of comparison table here:
> > > > https://docs.google.com/spreadsheets/d/1Q57oz6Jn8JPQkPzUbtO0fcZh2VhwPhxwsLaHnSb9uR0/edit#gid=406063636
> > > >
> > > > Change-Id: I8fa35e3fb087bce00ab19355a3bc021334aa7a80
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501337
> > > > Reviewed-by: Herb Derby <herb@google.com>
> > > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> > >
> > > Change-Id: I6799b90ffd8bc05c65d1185bfc07a06af05e2038
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507182
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> >
> > Change-Id: I3668b5a40f310598e23c922b1eb6f93db4dac13c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507183
> > Reviewed-by: Herb Derby <herb@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: I5d0174fca1aeaa0f3e75a8e1f643265701068f42
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508396
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

Change-Id: Ibf7c8957427dc8a1cdc133774608b48ab6715c7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508536
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-24 19:11:14 +00:00
John Stiles
2c70a0f96b Reland "Remove skstd::optional entirely."
This is a reland of 0596094b81

Original change's description:
> Remove skstd::optional entirely.
>
> Change-Id: Id9862712ea3e769797abd654922879ce6bc4487c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504976
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: Ie5bae44de729aabe50c4e51ad3c7cc476fbc5dc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512358
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-24 15:12:43 +00:00
Nathaniel Nifong
b8cb2f4476 2nd Reland "Add defines to skqp build"
Change-Id: Ia4c5e818be529ca765673266f64f96bf41a15552
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512146
Auto-Submit: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2022-02-23 20:06:44 +00:00
Harry Terkelsen
fe13e83056 Touch up CanvasKit build
Change-Id: I7ea4428787c69b4045a234403d8ca33c2aff2b7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511876
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-02-23 18:58:40 +00:00
Matt Turner
a8689e3d4d Give a human-intelligible message if gn generates a warning
If gn generates an otherwise harmless warning, find_headers.py will fail
to parse the gn-generated JSON because gn prints both the warning and
the JSON to stdout. Though find_headers.py prints the output of gn if
JSON parsing fails, a human investigating this failure is likely to
assume that the warning they see is from the build system, not from
find_headers.py, and is not related to the failure.

For example, this warning about an argument which has no effect breaks
the build:

    WARNING at build arg file (use "gn args <out_dir>" to edit):36:36: Build argument has no effect.
    skia_skqp_global_error_tolerance = 8
                                       ^
    [...]

Change-Id: Iafa7252ba161e4def1438f5d9480b64fdaa887d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510536
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-23 18:40:03 +00:00
Leon Scroggins
4ae863ba8a Revert "Reland "Add defines to skqp build""
This reverts commit 2ceed56917.

Reason for revert: Still breaking android

Original change's description:
> Reland "Add defines to skqp build"
>
> Change-Id: Ic038e6e3279eda7994cf29d886bee0d4d2e69e0b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511802
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

Change-Id: Ic93e9e9cedac2fd7313681f44ba4e87ff1b91241
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512156
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2022-02-23 13:51:18 +00:00
Nathaniel Nifong
2ceed56917 Reland "Add defines to skqp build"
Change-Id: Ic038e6e3279eda7994cf29d886bee0d4d2e69e0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511802
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-02-22 22:06:12 +00:00
Leon Scroggins
debfdffe08 Revert "Add defines to skqp build"
This reverts commit 5637705cea.

Reason for revert: Breaking the Android roll

Original change's description:
> Add defines to skqp build
>
> Change-Id: I35f312045937ab2486084524d4ed32bc305524e3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510856
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

Change-Id: Ia20c56238a651df2aa758dc2c99f67c32067deb4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511800
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-22 20:38:08 +00:00
Nathaniel Nifong
5637705cea Add defines to skqp build
Change-Id: I35f312045937ab2486084524d4ed32bc305524e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510856
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-02-22 14:39:13 +00:00
Robert Phillips
02f1bcf6d1 [graphite] Update memory handling between keybuilder and the key
This updates the key builder system so the builder can be used in a tight loop with the memory backing the key being reused.

Bug: skia:12701
Change-Id: I79a72ca26570dcfea9aa45b0fbad8e598688ee98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510016
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-18 21:00:42 +00:00
Michael Ludwig
a872718e51 Reland "Preserve base device origin on saveLayer and image filters"
This reverts commit 814652c373.

Reason for revert: missed suppression has landed in chrome

Original change's description:
> Revert "Preserve base device origin on saveLayer and image filters"
>
> This reverts commit f436cf2343.
>
> Reason for revert: May need to be behind flag or more
> suppressions. Breaking linux-rel vulkan_swiftshader_blink_web_tests
> css3/filters/effect-blur-hw.html .
>
> Original change's description:
> > Preserve base device origin on saveLayer and image filters
> >
> > SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977
> >
> > Bug: skia:12732
> > Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:12732
> Change-Id: I74cc8dc279d22c4fbd313ae3caeb4d0748daf003
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510196
> Auto-Submit: Ben Wagner <bungeman@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: skia:12732
Change-Id: Ifdc3ac96b1b695c208960915ca313fbacf4b7ed6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510203
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-17 19:49:10 +00:00
Robert Phillips
c4f1d16390 [graphite] Switch PaintParamsKey over to a builder/result model
This will leave the PaintParamsKeys more clearly immutable and manage more of the cruft of key creation (e.g., beginBlock/endBlock pairing).

Bug: skia:12701
Change-Id: I1944397465f845e974e950f47cedb90c3f1895b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506881
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-17 17:48:01 +00:00
Jim Van Verth
1729710b51 [graphite] Add TextureProxyView class.
Bug: skia:12845
Change-Id: I2cf5074f85242f51b3798c59d4450c043a99afee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509916
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-17 15:22:40 +00:00
Ben Wagner
814652c373 Revert "Preserve base device origin on saveLayer and image filters"
This reverts commit f436cf2343.

Reason for revert: May need to be behind flag or more
suppressions. Breaking linux-rel vulkan_swiftshader_blink_web_tests
css3/filters/effect-blur-hw.html .

Original change's description:
> Preserve base device origin on saveLayer and image filters
>
> SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977
>
> Bug: skia:12732
> Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Bug: skia:12732
Change-Id: I74cc8dc279d22c4fbd313ae3caeb4d0748daf003
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510196
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-17 13:48:07 +00:00
Dominik Röttsches
01be94d7f1 Support font palette overrides through SkFontArguments
Co-authored with Ben Wagner, bungeman@google.com.

Similar to how we allow configuration of variable font configurations,
provide additional SkFontArguments to select a base palette and a set
of potentially sparse color overrides.

This is required for implementing CSS font-palette.

Modify the more_samples-glyf_colr_1.ttf to have two additional palettes,
and two additional test glyphs, one that draws with COLRv0 logic, one
that draws with COLRv1 logic and has a foreground palette index dot
in the middle. See [1] & [2] for the additions to the test font.

Add a GM which tests this on the SkFontMgr_custom using makeClone() and
makeFromStreamArgs(). The test displays the two glyphs in default
palette on the left, then with palette overrides (as in the title of the
test) on the right. The first row uses a typeface created with
makeFromStreamArgs(), the second uses one created with makeClone().

[1] https://github.com/googlefonts/color-fonts/pull/91
[2] https://github.com/googlefonts/color-fonts/pull/92

Bug: skia:12730, chromium:1170794
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts
Change-Id: Ia1334f069240edc78fd4791969914e8a6f4fbaf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479616
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-17 13:19:53 +00:00
Michael Ludwig
f436cf2343 Preserve base device origin on saveLayer and image filters
SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977

Bug: skia:12732
Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-16 22:20:12 +00:00
Jim Van Verth
d6245fc4aa Rename GrSwizzle to skgpu::Swizzle
Bug: skia:12845
Change-Id: Ia03293c4efdad4c5381a713c9d7d4857b79530c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509398
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-16 13:30:14 +00:00
Kevin Lubick
c13cd6479d Reland "Build CanvasKit using GN/Ninja"
This is a reland of ecac712bec

Changes (best viewed comparing PS1 to latest)
 - Use emsdk 3.1.3 which includes important bug fixes
 - Remove unnecessary steps in compile.sh
 - Fix use of various gn args.
 - Avoid conflicts with Flutter's GN symbols
 - Add/update docs
 - Make activate-emsdk script compatible with our infra.

Original change's description:
> Build CanvasKit using GN/Ninja
>
> Build with
>
> ./bin/gn gen out/wasm_debug '--args=target_cpu="wasm"'
>
> or
>
> ./bin/gn gen out/wasm_release '--args=target_cpu="wasm" is_debug=false'
>
> Change-Id: Ib74586bf8397d57064a3899eaa6da76f9bce9049
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502036
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

Change-Id: I601712a8953c2799fa029e782e097905b95e6b59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507717
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-15 16:31:10 +00:00
Ben Wagner
0e48516aae Revert "Reland "Adding a trace to nanobench for RP/VM comparison""
This reverts commit 94b8dd6710.

Reason for revert: https://ci.chromium.org/p/chromium/builders/try/android-marshmallow-x86-rel appears to either not support this instruction or it is disabled.

Original change's description:
> Reland "Adding a trace to nanobench for RP/VM comparison"
>
> This reverts commit 39728eb980.
>
> Reason for revert: Need to reland after I figure out what happened
>
> Original change's description:
> > Revert "Adding a trace to nanobench for RP/VM comparison"
> >
> > This reverts commit e855b1273f.
> >
> > Reason for revert: breaking the tree
> >
> > Original change's description:
> > > Adding a trace to nanobench for RP/VM comparison
> > >
> > > Run nanobench with --compare key and collect data for comparison:
> > > ./out/Release/nanobench --csv --config 8888 --skvm --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
> > > ./out/Release/nanobench --csv --config 8888 --forceRasterPipeline --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee RP.data
> > > awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0 {vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10; vmvminterp[$3] = $11;  vmrpcycle[$3] = $14; vmrpscan[$3] = $16; vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1  {print $3, vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8, $10, $11, $14, $16, $18} ENDFILE {fileNum += 1}' VM.data RP.data > compare.csv
> > >
> > > You can see an example of comparison table here:
> > > https://docs.google.com/spreadsheets/d/1Q57oz6Jn8JPQkPzUbtO0fcZh2VhwPhxwsLaHnSb9uR0/edit#gid=406063636
> > >
> > > Change-Id: I8fa35e3fb087bce00ab19355a3bc021334aa7a80
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501337
> > > Reviewed-by: Herb Derby <herb@google.com>
> > > Commit-Queue: Julia Lavrova <jlavrova@google.com>
> >
> > Change-Id: I6799b90ffd8bc05c65d1185bfc07a06af05e2038
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507182
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: I3668b5a40f310598e23c922b1eb6f93db4dac13c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507183
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: I5d0174fca1aeaa0f3e75a8e1f643265701068f42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508396
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-13 19:03:40 +00:00
John Stiles
1542db1a9b Add a test runtime effect for child effects.
I wasn't able to find any other test which exercised child color-filters
or child blenders. (SampleWithExplicitCoord evaluates from a shader.)

Change-Id: I58ecee3beca2d3dc11ded5de0eea031e1d7c3e1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507922
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-02-12 01:06:57 +00:00
Julia Lavrova
94b8dd6710 Reland "Adding a trace to nanobench for RP/VM comparison"
This reverts commit 39728eb980.

Reason for revert: Need to reland after I figure out what happened

Original change's description:
> Revert "Adding a trace to nanobench for RP/VM comparison"
>
> This reverts commit e855b1273f.
>
> Reason for revert: breaking the tree
>
> Original change's description:
> > Adding a trace to nanobench for RP/VM comparison
> >
> > Run nanobench with --compare key and collect data for comparison:
> > ./out/Release/nanobench --csv --config 8888 --skvm --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
> > ./out/Release/nanobench --csv --config 8888 --forceRasterPipeline --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee RP.data
> > awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0 {vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10; vmvminterp[$3] = $11;  vmrpcycle[$3] = $14; vmrpscan[$3] = $16; vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1  {print $3, vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8, $10, $11, $14, $16, $18} ENDFILE {fileNum += 1}' VM.data RP.data > compare.csv
> >
> > You can see an example of comparison table here:
> > https://docs.google.com/spreadsheets/d/1Q57oz6Jn8JPQkPzUbtO0fcZh2VhwPhxwsLaHnSb9uR0/edit#gid=406063636
> >
> > Change-Id: I8fa35e3fb087bce00ab19355a3bc021334aa7a80
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501337
> > Reviewed-by: Herb Derby <herb@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: I6799b90ffd8bc05c65d1185bfc07a06af05e2038
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507182
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: I3668b5a40f310598e23c922b1eb6f93db4dac13c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507183
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-11 21:25:46 +00:00