2018-11-26 19:07:41 +00:00
|
|
|
How SkQP Generates Render Test Models
|
|
|
|
=====================================
|
|
|
|
|
|
|
|
We will, at regular intervals, generate new models from the [master branch of
|
|
|
|
Skia][1]. Here is how that process works:
|
|
|
|
|
2019-01-16 22:58:48 +00:00
|
|
|
0. Choose a commit to make the branch from
|
|
|
|
|
|
|
|
COMMIT=origin/master
|
|
|
|
|
2019-04-18 17:49:52 +00:00
|
|
|
Or use the script to find the best one:
|
2018-11-26 19:07:41 +00:00
|
|
|
|
2018-12-03 17:49:51 +00:00
|
|
|
cd SKIA_SOURCE_DIRECTORY
|
|
|
|
git fetch origin
|
2019-04-18 17:49:52 +00:00
|
|
|
COMMIT=$(python tools/skqp/find_commit_with_best_gold_results.py \
|
|
|
|
origin/master ^origin/skqp/dev)
|
2018-11-26 19:07:41 +00:00
|
|
|
|
2019-04-18 17:49:52 +00:00
|
|
|
1. Get the positively triaged results from Gold and generate models:
|
2018-11-26 19:07:41 +00:00
|
|
|
|
2018-12-03 17:49:51 +00:00
|
|
|
cd SKIA_SOURCE_DIRECTORY
|
2019-04-18 17:49:52 +00:00
|
|
|
git fetch origin
|
2019-01-16 22:58:48 +00:00
|
|
|
git checkout "$COMMIT"
|
2019-04-18 17:49:52 +00:00
|
|
|
python tools/skqp/cut_release.py HEAD~10 HEAD
|
2018-11-26 19:07:41 +00:00
|
|
|
|
|
|
|
This will create the following files:
|
|
|
|
|
|
|
|
platform_tools/android/apps/skqp/src/main/assets/files.checksum
|
|
|
|
platform_tools/android/apps/skqp/src/main/assets/skqp/rendertests.txt
|
|
|
|
platform_tools/android/apps/skqp/src/main/assets/skqp/unittests.txt
|
|
|
|
|
|
|
|
These three files can be commited to Skia to create a new commit. Make
|
|
|
|
`origin/skqp/dev` a parent of this commit (without merging it in), and
|
2019-04-18 17:49:52 +00:00
|
|
|
push this new commit to `origin/skqp/dev`, using this script:
|
2018-11-26 19:07:41 +00:00
|
|
|
|
2019-04-18 17:49:52 +00:00
|
|
|
sh tools/skqp/branch_skqp_dev.sh
|
2018-11-26 19:07:41 +00:00
|
|
|
|
2018-11-30 20:30:09 +00:00
|
|
|
Review and submit the change:
|
|
|
|
|
2018-12-04 20:52:11 +00:00
|
|
|
git push origin HEAD:refs/for/skqp/dev
|
2018-12-05 16:58:05 +00:00
|
|
|
bin/sysopen https://review.skia.org/$(bin/gerrit-number HEAD)
|
2018-12-05 16:08:12 +00:00
|
|
|
|
2019-01-16 22:58:48 +00:00
|
|
|
(Optional) Make a SkQP APK.
|
|
|
|
|
|
|
|
tools/skqp/docker_build_universal_apk.sh
|
|
|
|
|
|
|
|
(Optional) Test the SkQP APK:
|
|
|
|
|
2019-04-18 17:49:52 +00:00
|
|
|
tools/skqp/test_apk.sh (LOCATION)/skqp-universal-debug.apk
|
2019-01-16 22:58:48 +00:00
|
|
|
|
|
|
|
(Once changes land) Upload the SkQP APK.
|
|
|
|
|
2019-04-18 17:49:52 +00:00
|
|
|
tools/skqp/upload_apk HEAD (LOCATION)/skqp-universal-debug.apk
|
2019-01-16 22:58:48 +00:00
|
|
|
|
2018-11-30 20:30:09 +00:00
|
|
|
|
2019-04-18 17:49:52 +00:00
|
|
|
`tools/skqp/cut_release.py`
|
|
|
|
---------------------------
|
2018-11-26 19:07:41 +00:00
|
|
|
|
2019-04-18 17:49:52 +00:00
|
|
|
This tool will call `make_skqp_model` to generate the `m{ax,in}.png` files for
|
|
|
|
each render test.
|
2018-11-26 19:07:41 +00:00
|
|
|
|
|
|
|
Then it calls `jitter_gms` to see which render tests pass the jitter test.
|
|
|
|
`jitter_gms` respects the `bad_gms.txt` file by ignoring the render tests
|
|
|
|
enumerated in that file. Tests which pass the jitter test are enumerated in
|
|
|
|
the file `good.txt`, those that fail in the `bad.txt` file.
|
|
|
|
|
|
|
|
Next, the `skqp/rendertests.txt` file is created. This file lists the render
|
|
|
|
tests that will be executed by SkQP. These are the union of the tests
|
|
|
|
enumerated in the `good.txt` and `bad.txt` files. If the render test is found
|
2019-04-18 17:49:52 +00:00
|
|
|
in the `good.txt` file and the model exists, its per-test threshold is set
|
2018-11-26 19:07:41 +00:00
|
|
|
to 0 (a later CL can manually change this, if needed). Otherwise, the
|
|
|
|
threshold is set to -1; this indicated that the rendertest will be executed (to
|
|
|
|
verify that the driver will not crash), but the output will not be compared
|
|
|
|
against the model. Unnecessary models will be removed.
|
|
|
|
|
|
|
|
Next, all of the files that represent the models are uploaded to cloud storage.
|
|
|
|
A single checksum hash is kept in the `files.checksum` file. This is enough
|
|
|
|
to re-download those files later, but we don't have to fill the git repository
|
|
|
|
with a lot of binary data.
|
|
|
|
|
|
|
|
Finally, a list of the current gpu unit tests is created and stored in
|
|
|
|
`skqp/unittests.txt`.
|
|
|
|
|
|
|
|
[1]: https://skia.googlesource.com/skia/+log/master "Skia Master Branch"
|
|
|
|
[2]: https://gold.skia.org/search "Skia Gold Search"
|