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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Bug: skia:
Change-Id: I2f029b334ce900c5c4844ddecd9d022f51a21334
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202705
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Reed <reed@google.com>
The command line flag package is tool-only, not part of Skia per se,
and does not need an Sk prefix to avoid naming conflicts.
And git clang-format.
Change-Id: Ida8477779e51750ed0475590ed2454841b23d6ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202307
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>