Add a Mac Mini to test using GrSlug drawing instead of using
GrTextBlob for drawing.
Change-Id: I28ee402b7f82ae235518ee585d5803857490f8e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535964
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Herb Derby <herb@google.com>
GrPathTessellationShader_MiddleOut.cpp is just moved into
GrPathTessellationShader.cpp, and a few factories are cleaned up since
we don't have to differentiate between middle-out or hardware.
Bug: skia:13263
Change-Id: I420faa614a89ef1a2c0f1075d1f8a067d15e9a81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534200
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
In particular fixes issue on GLs that don't support non-clamp modes with
npot textures.
Bug: skia:13036
Change-Id: I196a6d726ac82cf9f6bb36b90a9b05f3a67837de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535957
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
G3 prefers license() first.
This was done mechanically with a big find/replace
Change-Id: I8c33c7bc10a6bec42e966cad81c259954e841811
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535898
Reviewed-by: Ben Wagner <bungeman@google.com>
D3D: the filter mode was being enabled but the max was always 1.
Dawn: Everything was plumbed but caps wasn't enabled.
Bug: skia:13036
Change-Id: Ib432bb8bc4fa28eddd827dd8337d2592617a6f70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535413
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Rolled emsdk to the latest version to get the updated WebGPU wasm
bindings to fix deprecated WebGPU API usage in the ganesh Dawn backend.
The latest WebGPU headers also define the WGPU_WHOLE_MAP_SIZE constant
which is necessary to land a workaround for skia:13266.
* Roll emsdk to 3.1.9
* Fix Dawn backend to use the updated WebGPU API
* Fix -Wunused-but-set-variable warnings
Bug: skia:13220, skia:13266
Change-Id: I57ad39657c3013f384620302ab12a71ffc426c12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534945
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Added a radial gradient and a RuntimeEffect to the WebGPU demo.
Both of these exercise shader creation and staging buffer allocation.
Also refactored the C++ code to reuse a GrDirectContext which highly
improves the per-frame performance when using runtime effects. However
this unfortunately triggers skbug.com/13266 so a work-around has been
provided in which the context can conditionally get re-created every
frame, as before.
Bug: skia:12512
Change-Id: Ic3e71679bf449bd8557577f74001f18e300e952a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534756
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
* Made several changes to the Bazel rules to work around an issue with
the Closure compiler and Asyncify and a WASM code-size issue on debug
builds.
* The native draw code now invokes Skia using the Dawn backend. The
example uses `SkSurface::flushAndSubmit` and Emscripten's Asyncify
feature to synchronize animation frames with the underlying WebGPU
command queue completion.
* Cosmetic changes to the HTML with CSS and an animation loop that
alternates the canvas color between cyan and magenta every second.
Bug: skia:12512
Change-Id: I9888bbec89c2fb01676898ffe4a7071d8690611e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530856
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Also exclude some additional test cases based on data collected
from Skia's infrastructure for known problematic GPU test cases.
Bug: b/230879386
Bug: b/227806494
Change-Id: Id0bf73828fa04b3139f1e9cb94511db9d62d8d86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535578
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This is a reland of commit e6f23f98de
Original change's description:
> Reland "Add anisotropic option to SkSamplingOptions."
>
> This is a reland of commit 9be2d572d4
>
> Original change's description:
> > Add anisotropic option to SkSamplingOptions.
> >
> > Implement on GPU.
> >
> > Bug: skia:13036
> > Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:13036
> Change-Id: I3e411aae389dc880ce32bba78852705059fb88b0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535197
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:13036
Change-Id: Icb2513cea6c4ec4cec934f78c66071081c232960
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535437
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Ran the following commands:
find -name "BUILD.bazel" -exec sed -i -e '1iload("//bazel:macros.bzl", "cc_library", "exports_files_legacy")\nexports_files_legacy()' {} +
buildifier --lint=fix --mode=fix -r .
This had the effect of making sure we can export all of our
files in G3 (until we no longer have legacy targets) and
making all of our cc_libraries shim-able.
bazel/macros.bzl has the human-contributed changes, the rest
were mechanical.
Change-Id: I8e24e30e74b038cfd072cdbe4078bfd1d213dd46
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535359
Reviewed-by: Ben Wagner <bungeman@google.com>
Accidentally left out of a7c2d73.
Change-Id: I237f8734758def36badd33f63ff32859d4ae670e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
This node was only used to detect recursion while inlining. We no longer
need to do this, because we disallow recursion in all programs.
The removal of one IRNode per inlined function actually allows for
slightly more aggressive inlining, since we restrict inlining based on
IRNode consumption. This allows the "ExponentialGrowth" tests to inline
a bit more deeply than before.
Change-Id: I894dbb1ca3096bb785b67facb01cc9c630f694c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534780
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The `wgpu::Device::Tick()` function is not available when the Dawn
backend is compiled using emsdk to target WebAssembly. As an
alternative, this CL introduces code that takes advantage of
emscripten's Asyncify feature to yield execution to the browser's event
loop and allowing it to execute async tasks from blocking Skia code.
* Introduced the GrDawnAsyncWait class which abstracts over Asyncify vs
wgpu::Device::Tick depending on the platform and implements common
busy-wait boilerplate.
* Refactored the fence management in GrDawnGpu to make use of
GrDawnAsyncWait. The GPUQueue.onSubmittedWorkDone is now handled by a
callback on GrDawnGpu instead of per-fence callbacks since the latter
cannot easily prevent a use-after-free if a fence is destroyed before
the callback runs.
Bug: skia:12512
Change-Id: I255e92ec87c799dc7a50bd034a815c0aaca0ef5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530736
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Change-Id: I23b8c5a37a7ccaddccc042f8a4f70a2e29a41211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535399
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This warning is about pre-C99 where declarations had to preceed
statements.
Change-Id: Ie029ebc0d2857d2d73c1395b8046e733765d8b17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535439
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Unsurprisingly, this makes more of the GMs and SKPs look correct.
It isn't added exactly as we would like going forward though. I
believe we would prefer something that munges the matrix and then
calls a child.
Bug: skia:12701
Change-Id: Ib50246a8d575a8a2489afdb7e5f6032a22637bd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535116
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: I9a5f3bc84cca209f914c7e40a5fbdc72f1460f47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535403
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:12701
Change-Id: Ia51c9086c20d28af2fea254658730d9bd4179605
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535396
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is a reland of commit 9be2d572d4
Original change's description:
> Add anisotropic option to SkSamplingOptions.
>
> Implement on GPU.
>
> Bug: skia:13036
> Change-Id: I35d760596c4f8faaec27fccf284b70802fcf3f9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524757
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:13036
Change-Id: I3e411aae389dc880ce32bba78852705059fb88b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535197
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
To make it easier to use the G3 version of this dep,
we make a reference to it in the WORKSPACE.bazel, so
we can refer to this external dep with the @ notation.
I would like to do this for all of our third party
deps, but one at a time.
Change-Id: I03e0beca124225e0faf1232278dae641da8a3e4d
Bug: skia:13240, skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535358
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Also updated the gn_to_bp.py to handle using the DEPSed vk_mem_alloc.h.
When rolled into Android we will copy the vk_mem_alloc.h from a local
DEPS checkout into a vma_android folder that will be checked into the
skia that lands with Android. We are using vma_android folder instead
of the current third_party/vulkanmemoryallocator folder because we
soon plan to move the latter into src/ instead of third_party. So just
using a different directory allows us to avoid doing an additional
change to the auto roller.
Bug: skia:13240
Bug: skia:13242
Change-Id: Ia344e13e3f7c7efecc2e6a97a96820f3ae58b5c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531318
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Generating unique names is expensive! The inliner does it a lot. There
are two pain points:
- Assemble a candidate name with String::printf
- Use SymbolTable::lookup to make sure that name isn't taken already
Previously, these steps took roughly the same amount of time on my
machine. Afterwards, SymbolTable::lookup takes the vast majority of the
time spent in uniqueName. (Further optimizing symbol lookup is a Hard
Problem--trying to design something better than the current
implementation in the general case is not easy.)
This change gives nanobench a 1-3% win on my Macbook Pro.
median mean
192µs 196µs sksl_medium (before)
185µs 189µs sksl_medium (after)
414µs 424µs sksl_large (before)
406µs 413µs sksl_large (after)
Change-Id: I8e0f7f053d124827a4d50a5006129e541a20c70d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534520
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
We no longer allow recursive code anywhere, so the inliner doesn't need
to guard against recursion.
Change-Id: I1cd39e215d0b93b8a5b578eb20854075f7e48ed5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534779
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>