2022-10-20 09:47:18 +02:00
|
|
|
SkQP
|
2022-01-05 13:35:18 -03:00
|
|
|
====
|
|
|
|
|
2022-11-03 08:50:29 +01:00
|
|
|
`SkQP <https://skia.org/docs/dev/testing/skqp/>`__ stands for SKIA Quality
|
2022-01-05 13:35:18 -03:00
|
|
|
Program conformance tests. Basically, it has sets of rendering tests and unit
|
2022-11-03 08:50:29 +01:00
|
|
|
tests to ensure that `SKIA <https://skia.org/>`__ is meeting its design specifications on a specific
|
2022-01-05 13:35:18 -03:00
|
|
|
device.
|
|
|
|
|
|
|
|
The rendering tests have support for GL, GLES and Vulkan backends and test some
|
|
|
|
rendering scenarios.
|
|
|
|
And the unit tests check the GPU behavior without rendering images.
|
|
|
|
|
2022-04-15 17:18:32 +02:00
|
|
|
Tests
|
2022-01-05 13:35:18 -03:00
|
|
|
-----
|
|
|
|
|
|
|
|
Render tests design
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
It is worth noting that ``rendertests.txt`` can bring some detail about each test
|
2022-10-20 09:47:18 +02:00
|
|
|
expectation, so each test can have a max pixel error count, to tell SkQP that it
|
2022-01-05 13:35:18 -03:00
|
|
|
is OK to have at most that number of errors for that test. See also:
|
2022-04-15 17:18:32 +02:00
|
|
|
https://github.com/google/skia/blob/c29454d1c9ebed4758a54a69798869fa2e7a36e0/tools/skqp/README_ALGORITHM.md
|
2022-01-05 13:35:18 -03:00
|
|
|
|
|
|
|
.. _test-location:
|
|
|
|
|
|
|
|
Location
|
|
|
|
^^^^^^^^
|
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
Each ``rendertests.txt`` and ``unittest.txt`` file must be located inside a specific
|
2022-10-20 09:47:18 +02:00
|
|
|
subdirectory inside SkQP assets directory.
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
+--------------+---------------------------------------------+
|
|
|
|
| Test type | Location |
|
|
|
|
+==============+=============================================+
|
|
|
|
| Render tests | ``${SKQP_ASSETS_DIR}/skqp/rendertests.txt`` |
|
|
|
|
+--------------+---------------------------------------------+
|
|
|
|
| Unit tests | ``${SKQP_ASSETS_DIR}/skqp/unittests.txt`` |
|
|
|
|
+--------------+---------------------------------------------+
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
The ``skqp-runner.sh`` script will make the necessary modifications to separate
|
|
|
|
``rendertests.txt`` for each backend-driver combination. As long as the test files are located in the expected place:
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
+--------------+------------------------------------------------------------------------------------------------+
|
|
|
|
| Test type | Location |
|
|
|
|
+==============+================================================================================================+
|
|
|
|
| Render tests | ``${MESA_REPOSITORY_DIR}/src/${GPU_DRIVER}/ci/${GPU_VERSION}-${SKQP_BACKEND}_rendertests.txt`` |
|
|
|
|
+--------------+------------------------------------------------------------------------------------------------+
|
|
|
|
| Unit tests | ``${MESA_REPOSITORY_DIR}/src/${GPU_DRIVER}/ci/${GPU_VERSION}_unittests.txt`` |
|
|
|
|
+--------------+------------------------------------------------------------------------------------------------+
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
Where ``SKQP_BACKEND`` can be:
|
2022-01-05 13:35:18 -03:00
|
|
|
|
|
|
|
- gl: for GL backend
|
|
|
|
- gles: for GLES backend
|
|
|
|
- vk: for Vulkan backend
|
|
|
|
|
|
|
|
Example file
|
|
|
|
""""""""""""
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
src/freedreno/ci/freedreno-a630-skqp-gl_rendertests.txt
|
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
- GPU_DRIVER: ``freedreno``
|
|
|
|
- GPU_VERSION: ``freedreno-a630``
|
|
|
|
- SKQP_BACKEND: ``gl``
|
2022-01-05 13:35:18 -03:00
|
|
|
|
|
|
|
.. _rendertests-design:
|
|
|
|
|
2022-10-20 09:47:18 +02:00
|
|
|
SkQP reports
|
2022-01-05 13:35:18 -03:00
|
|
|
------------
|
|
|
|
|
2022-10-20 09:47:18 +02:00
|
|
|
SkQP generates reports after finishing its execution, they are located at the job
|
2022-01-05 13:35:18 -03:00
|
|
|
artifacts results directory and are divided in subdirectories by rendering tests
|
|
|
|
backends and unit
|
|
|
|
tests. The job log has links to every generated report in order to facilitate
|
2022-10-20 09:47:18 +02:00
|
|
|
the SkQP debugging.
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-10-20 09:47:18 +02:00
|
|
|
Maintaining SkQP on Mesa CI
|
2022-01-05 13:35:18 -03:00
|
|
|
---------------------------
|
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
SkQP is built alongside with another binary, namely ``list_gpu_unit_tests``, it is
|
|
|
|
located in the same folder where ``skqp`` binary is.
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
This binary will generate the expected ``unittests.txt`` for the target GPU, so
|
2022-10-20 09:47:18 +02:00
|
|
|
ideally it should be executed on every SkQP update and when a new device
|
|
|
|
receives SkQP CI jobs.
|
2022-01-05 13:35:18 -03:00
|
|
|
|
|
|
|
1. Generate target unit tests for the current GPU with :code:`./list_gpu_unit_tests > unittests.txt`
|
|
|
|
|
2022-10-20 09:47:18 +02:00
|
|
|
2. Run SkQP job
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
3. If there is a failing or crashing unit test, remove it from the corresponding ``unittests.txt``
|
2022-01-05 13:35:18 -03:00
|
|
|
|
2022-11-02 20:50:58 +01:00
|
|
|
4. If there is a crashing render test, remove it from the corresponding ``rendertests.txt``
|
2022-01-05 13:35:18 -03:00
|
|
|
|
|
|
|
5. If there is a failing render test, visually inspect the result from the HTML report
|
|
|
|
- If the render result is OK, update the max error count for that test
|
2022-11-02 20:50:58 +01:00
|
|
|
- Otherwise, or put ``-1`` in the same threshold, as seen in :ref:`rendertests-design`
|
2022-01-05 13:35:18 -03:00
|
|
|
|
|
|
|
6. Remember to put the new tests files to the locations cited in :ref:`test-location`
|