This is a reland of commit ae5e846047
Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ia575fd49206ad0b665a6a9153317e738bb321446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This is a reland of 805acda3f3
It fixes the #if SK_GL which was causing the Android roll
to fail.
This disables unit tests on Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-TSAN_Vulkan
which were consistently crashing with OOM.
Original change's description:
> [fuzzer] Remove GL from (now-Vulkan) build
>
> The fuzzer runs against the Vulkan version of Swiftshader.
> There are no libGL.so (etc) on the fuzz runtime, so we
> want to avoid linking against those.
>
> The GL code that is #ifdef'd out is still necessary to
> avoid timeouts on TSAN with our NVIDIA jobs.
> https://skia-review.googlesource.com/c/skia/+/502638
>
> Procedure for testing this locally (and iterating):
> 1. In oss-fuzz checkout, run
> `python infra/helper.py shell skia`
> to pull up local interactive version of Docker
> fuzzer build image.
> 2. Run `compile` in fuzzer shell. Stop after
> the swiftshader compiles and is copied into /out
> with Ctrl + C.
> 3. Comment out the swiftshader compilation part [1]
> (no need to re-do this when modifying Skia code).
> `apt-get install nano -y`
> `nano ../build.sh`
> 4. Make change to Skia repo using normal methods.
> 5. Run the following in the Skia repo
> `git diff origin main > foo.patch`
> Copy the patch into the Docker shell using Ctrl+C
> and nano.
> 6. Apply the patch inside the Docker shell
> `git apply foo.patch`
> and re-compile (which should skip right to
> building the fuzzer libs)
> `compile`
> 7. Repeat 4-7 or make small changes directly in
> the Docker shell via nano.
> 8. When compilation and link succeeds, run
> `ldd /out/api_mock_gpu_canvas`
> to verify GL and friends were not dynamically linked.
>
> [1] https://github.com/google/oss-fuzz/pull/7214/files#diff-76f13875e33875cdd372f1f0933206be599cd87952f1bd1eaa57ca928ee9e3e1R49-R53
>
> Change-Id: Idf569820527c1304b0e5a68fd36295be89dfa2a0
> Bug: oss-fuzz:44132
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503016
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: oss-fuzz:44132, skia:12900
Change-Id: Ia2eff9403b0035e7f86098f296d7d9b1bbfd4876
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503716
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12794
Change-Id: I445144f25e9573d0d9ec55d12c3a9d372772c3bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503348
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 805acda3f3.
Reason for revert: Looks to be breaking the Android roll. See https://android-build.googleplex.com/builds/pending/P29733268/aosp_bramble-userdebug/latest/view/logs/build_error.log
Original change's description:
> [fuzzer] Remove GL from (now-Vulkan) build
>
> The fuzzer runs against the Vulkan version of Swiftshader.
> There are no libGL.so (etc) on the fuzz runtime, so we
> want to avoid linking against those.
>
> The GL code that is #ifdef'd out is still necessary to
> avoid timeouts on TSAN with our NVIDIA jobs.
> https://skia-review.googlesource.com/c/skia/+/502638
>
> Procedure for testing this locally (and iterating):
> 1. In oss-fuzz checkout, run
> `python infra/helper.py shell skia`
> to pull up local interactive version of Docker
> fuzzer build image.
> 2. Run `compile` in fuzzer shell. Stop after
> the swiftshader compiles and is copied into /out
> with Ctrl + C.
> 3. Comment out the swiftshader compilation part [1]
> (no need to re-do this when modifying Skia code).
> `apt-get install nano -y`
> `nano ../build.sh`
> 4. Make change to Skia repo using normal methods.
> 5. Run the following in the Skia repo
> `git diff origin main > foo.patch`
> Copy the patch into the Docker shell using Ctrl+C
> and nano.
> 6. Apply the patch inside the Docker shell
> `git apply foo.patch`
> and re-compile (which should skip right to
> building the fuzzer libs)
> `compile`
> 7. Repeat 4-7 or make small changes directly in
> the Docker shell via nano.
> 8. When compilation and link succeeds, run
> `ldd /out/api_mock_gpu_canvas`
> to verify GL and friends were not dynamically linked.
>
> [1] https://github.com/google/oss-fuzz/pull/7214/files#diff-76f13875e33875cdd372f1f0933206be599cd87952f1bd1eaa57ca928ee9e3e1R49-R53
>
> Change-Id: Idf569820527c1304b0e5a68fd36295be89dfa2a0
> Bug: oss-fuzz:44132
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503016
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: oss-fuzz:44132
Change-Id: I3832417c60ff425572717d37dc9609419922b18e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503351
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The fuzzer runs against the Vulkan version of Swiftshader.
There are no libGL.so (etc) on the fuzz runtime, so we
want to avoid linking against those.
The GL code that is #ifdef'd out is still necessary to
avoid timeouts on TSAN with our NVIDIA jobs.
https://skia-review.googlesource.com/c/skia/+/502638
Procedure for testing this locally (and iterating):
1. In oss-fuzz checkout, run
`python infra/helper.py shell skia`
to pull up local interactive version of Docker
fuzzer build image.
2. Run `compile` in fuzzer shell. Stop after
the swiftshader compiles and is copied into /out
with Ctrl + C.
3. Comment out the swiftshader compilation part [1]
(no need to re-do this when modifying Skia code).
`apt-get install nano -y`
`nano ../build.sh`
4. Make change to Skia repo using normal methods.
5. Run the following in the Skia repo
`git diff origin main > foo.patch`
Copy the patch into the Docker shell using Ctrl+C
and nano.
6. Apply the patch inside the Docker shell
`git apply foo.patch`
and re-compile (which should skip right to
building the fuzzer libs)
`compile`
7. Repeat 4-7 or make small changes directly in
the Docker shell via nano.
8. When compilation and link succeeds, run
`ldd /out/api_mock_gpu_canvas`
to verify GL and friends were not dynamically linked.
[1] https://github.com/google/oss-fuzz/pull/7214/files#diff-76f13875e33875cdd372f1f0933206be599cd87952f1bd1eaa57ca928ee9e3e1R49-R53
Change-Id: Idf569820527c1304b0e5a68fd36295be89dfa2a0
Bug: oss-fuzz:44132
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503016
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: skia:12466
Change-Id: I401a185d818a964327d323b9ebcd0850ec0b1c9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457318
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I2bf8070fccacb21d2c5de56cdd9b6b77adb6c5a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368876
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
With this change if a backend Gr*Gpu wants to using staging buffers
they just add a generic GrStagingBufferManager member object. This
object can be used to get slices of upload buffers. Then they just need
to implement the virtual for taking ownership of buffers during submit.
We rely on our GrResourceCache to handle caching and reuse of these
buffers.
This change allows us to remove all other virtuals on GrGpu around
managing staging buffers.
Change-Id: I5db9a3c52133978ea89d6c0de440f434fbf91a51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300226
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
This should, hopefully, clarify the role of onGpuSetup vis a vis onDraw.
The remaining tools are updated in:
https://skia-review.googlesource.com/c/skia/+/300220/ (Update remaining tools to GrDirectContext)
Change-Id: I19d6eec4d16cb9ebad8924763a18225cc871f0f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300172
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This also adds a GPUTEST_FOR_D3D_CONTEXT macro to help with debugging
tests.
Change-Id: I72db01d148755c3bbbbb4d948d441a31dcf9482b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297717
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
There apparently were other tests that had similar issues and this fix
is much better and is more future proof.
Change-Id: I4835c7e5772b9e70249a69255aae8808be172eef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282681
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is a reland of 598741667a
Original change's description:
> Enable Programs (formerly GLPrograms) test for other APIs
>
> Bug: skia:9365
> Change-Id: I2eeac4e628425411b0a8f9ffa94ad61d58254b77
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249806
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:9365
Change-Id: I94db6cb2b1465edbb2e6d32708b835a76e12cbc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250016
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@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>
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: I6ecfed3f7ee096f85ea4cb4920e1029227d36169
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203703
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Most of this is (obviously) not necessary to do, but once
I started, I figured I'd just get it all. Tools (nanobench,
DM, skiaserve), all GMs, benches, and unit tests, plus support
code (command line parsing and config stuff).
This is almost entirely mechanical.
Bug: skia:
Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb
Reviewed-on: https://skia-review.googlesource.com/131153
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is to alleviate problems due to the command buffer getting bent out of shape when the current
OpenGL context is switched out from under it (because we ran a test with a native GL context). This,
however is not a full solution. More changes will be required to ensure that after running each
command buffer or native test we bind the null context. This does allow us to take a step in that
direction without breaking anything too badly. Moreover, there is no real benefit to reusing a
GrContextFactory.
Modifies DEF_GPUTEST to take GrContextOptions rather than a factory to use. Tests were already using
their own factories anyway.
In tests that use GrContextFactory the factory instance is moved to the inner loop.
Modifies gpucts and skia_test to not use persistent GrContextFactories.
Change-Id: Ie7a36793545c775f2f30653ead6fec93a3d22717
Reviewed-on: https://skia-review.googlesource.com/71861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>