Commit Graph

330 Commits

Author SHA1 Message Date
Chris Dalton
eae5c16190 Reland "Enable GrTessellationPathRenderer by default"
This is a reland of 6ea387e7c7

Original change's description:
> Enable GrTessellationPathRenderer by default
>
> Moves GrTessellationPathRenderer to the end of the chain and enables
> it by default.
>
> Also updates nvpr to not draw volatile paths. The tessellator is much
> faster at these.
>
> Bug: skia:10419
> Change-Id: I97ca7d4d1dff65fc9d4040c267f9808c8c33b548
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344377
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:10419
Change-Id: I53b50d6aa01ae1bea697e05c3f60d57d132d6aad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345759
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-01-04 19:43:41 +00:00
Brian Salomon
7bfdb10449 Revert "Enable GrTessellationPathRenderer by default"
This reverts commit 6ea387e7c7.

Reason for revert: valgrind failing

Original change's description:
> Enable GrTessellationPathRenderer by default
>
> Moves GrTessellationPathRenderer to the end of the chain and enables
> it by default.
>
> Also updates nvpr to not draw volatile paths. The tessellator is much
> faster at these.
>
> Bug: skia:10419
> Change-Id: I97ca7d4d1dff65fc9d4040c267f9808c8c33b548
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344377
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I3718ae210ebc403959d187160214cf0df895e4f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345718
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-12-18 15:46:30 +00:00
Chris Dalton
6ea387e7c7 Enable GrTessellationPathRenderer by default
Moves GrTessellationPathRenderer to the end of the chain and enables
it by default.

Also updates nvpr to not draw volatile paths. The tessellator is much
faster at these.

Bug: skia:10419
Change-Id: I97ca7d4d1dff65fc9d4040c267f9808c8c33b548
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344377
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-17 19:33:56 +00:00
Chris Dalton
15f51848df Reland "Disable HW tessellation shaders by default"
This is a reland of ad8b9fa2d7

Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com
Bug: skia:10419
Change-Id: I0bdf34da134a3a34a5c78b35cc0eb86d6e989bb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344796
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-12-16 05:08:25 +00:00
Chris Dalton
1c2584d8cc Revert "Disable HW tessellation shaders by default"
This reverts commit ad8b9fa2d7.

Reason for revert: Benchmark failure

Original change's description:
> Disable HW tessellation shaders by default
>
> The GLSL backdoor for tessellation shaders is only experimental at
> this point. In order to enable the tessellation path renderer, we need
> to turn off HW tessellation and let it use the indirect draw modes.
>
> Bug: skia:10419
> Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ia74dbcec582168870bd3ccc5e52b8dce0fb2bdfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344698
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-12-15 20:45:46 +00:00
Chris Dalton
ad8b9fa2d7 Disable HW tessellation shaders by default
The GLSL backdoor for tessellation shaders is only experimental at
this point. In order to enable the tessellation path renderer, we need
to turn off HW tessellation and let it use the indirect draw modes.

Bug: skia:10419
Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-12-15 18:36:44 +00:00
Chris Dalton
d1e6716f6a Add an "allPathsVolatile" option for testing
Bug: skia:10419
Change-Id: I4bb2dc515448d8c87329ade90d24bf78ca1d7938
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319097
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-09-23 19:02:27 +00:00
Chris Dalton
31634288fd Add gms that test limited hw tessellation segments
Adds variations of trickycubicstrokes and widebuttcaps that limit the
max number of hardware tessellation segments to 5. This exercises our
stroking logic for splitting curves and joins when they require more
segments than are supported by the hardware.

Bug: skia:10419
Change-Id: Ie52374b89e30bfa021b2de74e3cd32e02ab734d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317268
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-09-17 23:48:44 +00:00
Brian Salomon
b2b7f80c16 Add config "glesfakev2". It runs GLES with the version faked as 2.
This will allow us to do performance comparisons against the
highest available GLES on a device.

This doesn't yet enable the new config on any bots.

Change-Id: I99d0f009573969b06d5294473de009a4d6940e8d
Bug: skia:10644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313426
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-08-26 20:04:34 +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
John Stiles
6e9ead9166 Revert "Remove custom SkSort algorithms."
This reverts commit 70474c1cb0.

Reason for revert: bot build failure

Original change's description:
> Remove custom SkSort algorithms.
> 
> SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
> The difference is small on randomized inputs, but quite significant for
> semi-ordered inputs (forward/backward/repeated). There doesn't seem to
> to be any compelling advantage to SkTQSort.
> 
> Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u
> 
> (These performance numbers are from an optimized build my local machine;
> it's possible that we might see different results on the test bots.)
> 
> Change-Id: Iaf19563041547eae7de2953be249129108f093b1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I1126dd4cda95716dac225ad32d5b0e5cf3f09421
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302447
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-14 00:25:05 +00:00
John Stiles
70474c1cb0 Remove custom SkSort algorithms.
SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
The difference is small on randomized inputs, but quite significant for
semi-ordered inputs (forward/backward/repeated). There doesn't seem to
to be any compelling advantage to SkTQSort.

Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u

(These performance numbers are from an optimized build my local machine;
it's possible that we might see different results on the test bots.)

Change-Id: Iaf19563041547eae7de2953be249129108f093b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-13 23:35:20 +00:00
Jim Van Verth
275f419a60 Add D3D support for MSAA
Change-Id: I7f9122bb99fea952a67fa47aaada789037438152
Bug: skia:10476
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300906
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-07 20:34:15 +00:00
Robert Phillips
762cb4ea46 Add option to DDL test harness to better match OOP-R behavior
Change-Id: I043613c127dbfa1ebb7dcf5eab7b996afb676b61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296449
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-16 12:30:41 +00:00
John Stiles
616da104ab Allow printf-style formatting to be used in SK_ABORT.
(This is a simple reland of
    https://skia-review.googlesource.com/c/skia/+/293272
and is functionally unchanged, but needed to be reconstructed
manually because JavaInputStreamAdaptor.cpp was deleted.)

SK_ABORT was already using SkDebugf to print the error message to the
console, so all the moving parts were there. This CL just adds a
mechanism for the calling code to pass in arguments.

Added a use case to demonstrate usage--when an allocation fails, the
requested size is now shown in the error message.

Change-Id: If8600a9febad15b7c8b7a04479a1d92442521f21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294705
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-12 20:26:34 +00:00
John Stiles
7a8e394496 Revert "Allow printf-style formatting to be used in SK_ABORT."
This reverts commit 67e50a6b5c.

Reason for revert: roller complains about LICENSE issue. cl/314177415

Original change's description:
> Allow printf-style formatting to be used in SK_ABORT.
> 
> SK_ABORT was already using SkDebugf to print the error message to the
> console, so all the moving parts were there. This CL just adds a
> mechanism for the calling code to pass in arguments.
> 
> Added a use case to demonstrate usage--when an allocation fails, the
> requested size is now shown in the error message.
> 
> Change-Id: I42f141151fb57a399c086926249816833f349ddb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293272
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,johnstiles@google.com

Change-Id: I7a2e98bcda82bbe6edfa3d00057586754df0ee71
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293342
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-01 19:32:08 +00:00
John Stiles
67e50a6b5c Allow printf-style formatting to be used in SK_ABORT.
SK_ABORT was already using SkDebugf to print the error message to the
console, so all the moving parts were there. This CL just adds a
mechanism for the calling code to pass in arguments.

Added a use case to demonstrate usage--when an allocation fails, the
requested size is now shown in the error message.

Change-Id: I42f141151fb57a399c086926249816833f349ddb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293272
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-06-01 18:49:37 +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
Chris Dalton
0a22b1e656 Rename GrGpuTessellationPathRenderer to GrTessellationPathRenderer
Change-Id: I3598ecab2e56b37a8d08b9da186c27f3cf709bfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279245
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-27 17:37:23 +00:00
Chris Dalton
17dc41870a Rename CPU tessellation to "triangulation"
Ambiguity has come up re: what "tessellation" means in Ganesh. I
believe that, in the context of a graphics library, "tessellation"
should refer to the hardware pipeline feature of submitting patches
and tessellating them on the GPU. This CL therefore renames classes
that triangulate things on the CPU to call it "triangulation".

Change-Id: Ic8515ea6a33000f1b638a852d5122bc9bd6b38f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279236
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-26 16:21:39 +00:00
Robert Phillips
19f466d399 Adds gpu stats for program cache
With the addition of the DDL program pre-compilation we need to know how it is working.

This CL also fixes some threading bugs.

Bug: skia:9455
Change-Id: I20da58a7f1b19685687fae1d159d4e0db8a4964d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273001
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-26 16:11:56 +00:00
Robert Phillips
291f3405f3 Add new gpu sink for DDLs
Having this as a sink rather than a Via allows us to do more aggressive things with threads and shared contexts.

Change-Id: I3ca1076686fa4f53387c12a9506e01910c1bc3e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-20 13:51:07 +00:00
Jim Van Verth
d2d4c5e8c5 Add GrD3DGpu and GrD3DCaps.
With this, can specify d3d config for dm and it will create a GrContext
with GrD3DGpu (stubbed in).

Bug: skia:9935
Change-Id: I0b8635bc541c61833b08b60a9f6e1341d1373090
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271743
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-19 20:44:14 +00:00
Mike Klein
b147aceed7 DCI-P3 -> Display P3 in Skia
This keeps an alias so code keeps building.

Bug: skia:9792
Change-Id: If8575468d929d2ca28bc2f9e82de27291fb19aa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264691
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-16 21:24:16 +00:00
Chris Dalton
b832ce61ee Add a path renderer that uses GPU tessellation
Implements a simple first pass for a path renderer that uses the
classic Red Book "stencil then cover" method, and linearizes curves
with GPU tessellation shaders.

The new path renderer is disabled by default, and can only be enabled
in the viewer UI or by passing the "--pr gtess" flag.

Change-Id: Ic9354952e93c8b108577961760b4f0daa82d35aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261715
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-07 20:00:22 +00:00
Chris Dalton
37ae4b06e2 Rename GpuPathRenderers::kAll to kDefault
There was never a need to distinguish between "all" and "default".
We can just use kDefalut everywhere. And as we add new path renderers,
we can exclude them from kDefault until they are ready to ship.

Change-Id: I378aa1e195d40daef6a2c54f9c8e829208780ebe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261714
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-31 01:01:17 +00:00
Chris Dalton
5258623d82 Move --internalSamples to common flags
Change-Id: I3120ca817f5fe3dc5969b6b875473f38c2fb8ea2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261667
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-27 22:00:10 +00:00
Brian Osman
4af42fcca1 Fix precompiling shaders on GLES / Android
We need to specify attribute locations and (sometimes) frag shader
output locations. Desktop GL worked fine without this, but Flutter
ran into this problem, and a Pixel 2 reproduced the issue.

Note that both APIs (BindFragDataLocation and BindAttribLocation)
don't take effect until the next time the program is linked, so
we have to relink the program after applying those changes.

I was afraid that re-linking would eliminate the perf benefits of
pre-compiling the shaders, but (at least on Pixel 2) that's not
the case. I traced the life of a single program, and the initial
link (during precompile) was 4.4 ms. The re-link took 0.23 ms.

Change-Id: Iadb3b425a8cf9f6a52e015c2e37f875c0fd73d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241758
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-16 17:13:23 +00:00
Brian Osman
ed58e004e0 Add support for pre-compiling cached SkSL shaders
The client can do a test run of their application with
a persistent cache set to SkSL mode. They store the key
and data blobs that are produced.

Ship those blobs with the application. At startup, call
GrContext::precompileShader for each key/data pair. This
compiles the shaders, and stores the GL program ID, plus
a small amount of metadata in our runtime program cache.

Caveats:
* Currently only implemented for the GL backend. Other
  backends will require more metadata to do any useful
  amount of work. Metal may need a more drastic workflow
  change, involving offline compilation of the shaders.
* Currently only implemented for cached SkSL (not GLSL
  or program binaries). Supporting other formats again
  requires more metadata, and the cached shaders become
  increasingly specialized to GPU and driver versions.
* Reusing the cached SkSL on different hardware is not
  supported. Many driver workarounds are implemented in
  the SkSL -> GLSL transformation, but some are higher
  level. Limiting device variance by artificially hiding
  extensions may help, but there are no guarantees.

* The 'gltestprecompile' DM config exercises this code
  similarly to 'gltestpersistentcache', ensuring that
  results are visually identical when precompiling, and
  that no cache misses occur after precompiling.

Change-Id: Id314c5d5f5a58fe503a0505a613bd4a540cc3589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239438
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-06 19:45:09 +00:00
Greg Daniel
9313874349 Rename GrContextOption fReduceOpListSplitting to fReduceOpsTaskSplitting.
Change-Id: Ieba56fa4c4926fc0a118d84950fa1eb78a48a29e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236576
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2019-08-23 18:43:27 +00:00
Greg Daniel
f41b2bd449 Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit f21bf9e50b.

Reason for revert: relanding with infra fix

Original change's description:
> Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
>
> This reverts commit 2a5954140b.
>
> Reason for revert: breaking everything
>
> Original change's description:
> > Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> >
> > Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ibd3a06e4a91dbb1f225dcc8d17d0db3967b6f85f
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236350
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-22 20:52:09 +00:00
Greg Daniel
f21bf9e50b Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit 2a5954140b.

Reason for revert: breaking everything

Original change's description:
> Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> 
> Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-22 20:12:38 +00:00
Greg Daniel
2a5954140b Merge GrOpList and GrRTOpList and rename to GrOpsTask.
Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-22 19:33:01 +00:00
Brian Salomon
74c19de3be Add SkUNREACHABLE to definition of SK_ABORT.
Remove return statements immediately following SK_ABORTs.

Change-Id: I6446b6ba3a6fb272d84ea27f38cf366095cf801d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233565
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-09 20:43:39 +00:00
Stephen White
985741a554 First draft of Dawn backend: clears are working.
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.

Change-Id: I443f3370522639e82f2fa0eebe6b206c372f13a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228137
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-18 18:09:12 +00:00
Greg Daniel
fad9fbc3c4 Revert "First draft of Dawn backend: clears are working."
This reverts commit 6cebea42a8.

Reason for revert: breaking google3 roll

Original change's description:
> First draft of Dawn backend: clears are working.
> 
> First draft of (mostly stubbed-out) GrDawnGpu.
> Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
> First draft of DawnTestContext.
> First draft of psuedo-fences for Dawn, implemented with MapReadAsync.
> 
> Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
> Commit-Queue: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,senorblanco@chromium.org

Change-Id: Ie494b5a403e8537c6539551533ae8b9156e90a61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228120
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-17 17:23:02 +00:00
Stephen White
6cebea42a8 First draft of Dawn backend: clears are working.
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.

Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-17 16:29:22 +00:00
Brian Osman
19ece744f9 Only include angle in default configs when it's enabled
Previously, running nanobench on Windows without ANGLE enabled would
immediately fail (unless you specified --config) with:

  No context was available matching config 'angle_d3d11_es2'.

Change-Id: I4a02f4f96a1c4366bee21e6cf379d53c3a086d23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226220
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-09 19:39:04 +00:00
Brian Osman
9c310473c6 Reland "DM: Add a per-sink MemoryCache to all GPU sinks"
Once https://skia-review.googlesource.com/c/skia/+/224258 lands, this
should be safe.

This reverts commit 1958fbbcff.

Change-Id: I2fca1e60a2d945d440b7cd5f60e4b4dec211decd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224278
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-28 16:30:24 +00:00
Brian Osman
1958fbbcff Revert "DM: Add a per-sink MemoryCache to all GPU sinks"
This reverts commit a7b224d3a3.

Reason for revert: Failures on some ANGLE bots

Original change's description:
> DM: Add a per-sink MemoryCache to all GPU sinks
> 
> This isolates the caches per config, so we don't try to reuse cached
> binaries across different GL versions (or different D3D backend versions
> on ANGLE bots, etc).
> 
> Locally, this sped up ANGLE significantly Looking at a sample bot
> (NUC6i5SYK), it dropped DM from 36m to 31m.
> 
> Change-Id: I95db18c6ea85041e6adbc972f0118233c82818fb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223985
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I8c9af65d89fddb28e5f1395a6c946312f27ba48a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224186
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-27 14:39:09 +00:00
Brian Osman
a7b224d3a3 DM: Add a per-sink MemoryCache to all GPU sinks
This isolates the caches per config, so we don't try to reuse cached
binaries across different GL versions (or different D3D backend versions
on ANGLE bots, etc).

Locally, this sped up ANGLE significantly Looking at a sample bot
(NUC6i5SYK), it dropped DM from 36m to 31m.

Change-Id: I95db18c6ea85041e6adbc972f0118233c82818fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223985
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-27 13:21:13 +00:00
Chris Dalton
b3c9745911 Remove "nvpr" configs
The majority of our gm testing has been disabling nvpr, which doesn't
match our real-world behavior where we use nvpr whenever available.
This CL fixes the issue by completely removing the explicit nvpr
configs. Now if we have nvpr, you get it.

This CL also lowers the nvpr priority in the path renderer chain and
adds a "NonNVPR" job on Quadro where we can continue to test our
non-nvpr codepaths on NVIDIA.

Bug: skia:
Change-Id: I6a36f1101c8218adcaaf10cab25d2c28e70371f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223828
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-06-26 16:53:50 +00:00
Brian Osman
f0095cf86a Add option to use a program binary cache in DM, etc
Change-Id: I2117e41388962682a40f9db9ffc62150b30c7847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221779
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-06-19 00:00:11 +00:00
Robert Phillips
d3c048234b Re-add flag to force opList splitting reduction
We need this again because I had to turn off opList splitting reduction by default but would like to keep testing it on some bots

Change-Id: I9e38d5a3d823e86799055892d191a5643a4b98ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212193
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-06 18:52:15 +00:00
Robert Phillips
6c8f5b31ac Switch sense of opList splitting flag and employ it on the NVIDIA_Shield bot
Bug: skia:9036
Change-Id: I0e8b44a0c586abd982e7301d1b366c04d69aff0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211421
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-05-01 13:46:08 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Chris Dalton
a8fbeba6cb Add a cap to allow coverage counting or not
We don't want to just disable the "ccpr" path renderer anymore (or
whatever it should be called), because we are adding an MSAA
implementation. This new cap will eventually tell ccpr whether it can
use coverage counting, or if it should just use the MSAA impl.

Bug: skia:
Change-Id: Ie6e5ca1a637ca4408bc6bb844153afa9da26f58e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204883
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-04-03 19:39:24 +00:00
Brian Osman
f71b070ffd Fix the GLSL persistent cache (and add a config to test it)
We need to store (up to) three GLSL strings in the cache entry,
along with the bookkeeping to reconstruct them. To make things
simpler, we now store the null terminators.

Change-Id: Ic4fe03cb5d774464372ceec8740da1bfe9069550
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205823
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-04-03 18:05:22 +00:00
Brian Osman
fbe2406693 Reland "Remove the NullGL interface (and associated test context)"
This reverts commit 215da624d1.

Reason for revert: Blink issues ironed out.

Original change's description:
> Revert "Remove the NullGL interface (and associated test context)"
> 
> This reverts commit de206c75c2.
> 
> Reason for revert: Chrome is having issues with the switch to Mock in blink tests.
> 
> Original change's description:
> > Remove the NullGL interface (and associated test context)
> > 
> > Bug: skia:
> > Change-Id: Ie3c9ee39fc1e0a4406de085c60d8433ffb4419df
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203708
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
> 
> Change-Id: Iff0cbf29dcea26957efc800a8c33d0ad8285de0a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205343
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

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

Bug: skia:
Change-Id: I1f4fbbcb00f302c5d830cb1392badd6ec7a33c69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205832
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-03 16:38:10 +00:00
Brian Osman
215da624d1 Revert "Remove the NullGL interface (and associated test context)"
This reverts commit de206c75c2.

Reason for revert: Chrome is having issues with the switch to Mock in blink tests.

Original change's description:
> Remove the NullGL interface (and associated test context)
> 
> Bug: skia:
> Change-Id: Ie3c9ee39fc1e0a4406de085c60d8433ffb4419df
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203708
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: Iff0cbf29dcea26957efc800a8c33d0ad8285de0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205343
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-02 12:48:37 +00:00