gitlab-ci: Add jobs to be able to test Vulkan
Also, adds an example job for radv. Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
This commit is contained in:

committed by
Andres Gomez

parent
5c65f8b377
commit
0ac731b1ff
@@ -722,19 +722,39 @@ radv_polaris10_vkcts:
|
|||||||
tags:
|
tags:
|
||||||
- polaris10
|
- polaris10
|
||||||
|
|
||||||
|
# Traces CI
|
||||||
.traces-test:
|
.traces-test:
|
||||||
extends:
|
|
||||||
- .test-gl
|
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_JOB_NAME}
|
key: ${CI_JOB_NAME}
|
||||||
paths:
|
paths:
|
||||||
- .git-lfs-storage/
|
- .git-lfs-storage/
|
||||||
|
|
||||||
|
.traces-test-gl:
|
||||||
|
extends:
|
||||||
|
- .test-gl
|
||||||
|
- .traces-test
|
||||||
script:
|
script:
|
||||||
- ./artifacts/tracie-runner.sh
|
- ./artifacts/tracie-runner-gl.sh
|
||||||
|
|
||||||
|
.traces-test-vk:
|
||||||
|
extends:
|
||||||
|
- .test-vk
|
||||||
|
- .traces-test
|
||||||
|
script:
|
||||||
|
- ./artifacts/tracie-runner-vk.sh
|
||||||
|
|
||||||
llvmpipe-traces:
|
llvmpipe-traces:
|
||||||
|
extends: .traces-test-gl
|
||||||
variables:
|
variables:
|
||||||
LIBGL_ALWAYS_SOFTWARE: "true"
|
LIBGL_ALWAYS_SOFTWARE: "true"
|
||||||
GALLIUM_DRIVER: "llvmpipe"
|
GALLIUM_DRIVER: "llvmpipe"
|
||||||
DEVICE_NAME: "gl-vmware-llvmpipe"
|
DEVICE_NAME: "gl-vmware-llvmpipe"
|
||||||
extends: .traces-test
|
|
||||||
|
radv-polaris10-traces:
|
||||||
|
extends:
|
||||||
|
- .traces-test-vk
|
||||||
|
- .test-radv
|
||||||
|
variables:
|
||||||
|
DEVICE_NAME: "vk-amd-polaris10"
|
||||||
|
tags:
|
||||||
|
- polaris10
|
||||||
|
@@ -28,7 +28,8 @@ cp -Rp .gitlab-ci/deqp* artifacts/
|
|||||||
cp -Rp .gitlab-ci/piglit artifacts/
|
cp -Rp .gitlab-ci/piglit artifacts/
|
||||||
cp -Rp .gitlab-ci/traces.yml artifacts/
|
cp -Rp .gitlab-ci/traces.yml artifacts/
|
||||||
cp -Rp .gitlab-ci/tracie artifacts/
|
cp -Rp .gitlab-ci/tracie artifacts/
|
||||||
cp -Rp .gitlab-ci/tracie-runner.sh artifacts/
|
cp -Rp .gitlab-ci/tracie-runner-gl.sh artifacts/
|
||||||
|
cp -Rp .gitlab-ci/tracie-runner-vk.sh artifacts/
|
||||||
|
|
||||||
# Tar up the install dir so that symlinks and hardlinks aren't each
|
# Tar up the install dir so that symlinks and hardlinks aren't each
|
||||||
# packed separately in the zip file.
|
# packed separately in the zip file.
|
||||||
|
28
.gitlab-ci/tracie-runner-vk.sh
Executable file
28
.gitlab-ci/tracie-runner-vk.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
ARTIFACTS="$(pwd)/artifacts"
|
||||||
|
|
||||||
|
# Set the Vulkan driver to use.
|
||||||
|
export VK_ICD_FILENAMES="$(pwd)/install/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
|
||||||
|
|
||||||
|
# Set environment for VulkanTools' VK_LAYER_LUNARG_screenshot layer.
|
||||||
|
export VK_LAYER_PATH="$VK_LAYER_PATH:/VulkanTools/build/etc/vulkan/explicit_layer.d"
|
||||||
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/VulkanTools/build/lib"
|
||||||
|
|
||||||
|
# Perform a self-test to ensure tracie is working properly.
|
||||||
|
"$ARTIFACTS/tracie/tests/test.sh"
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
# Run gfxreconstruct traces against the host's running X server (xvfb
|
||||||
|
# doesn't have DRI3 support).
|
||||||
|
# Set the DISPLAY env variable in each gitlab-runner's configuration
|
||||||
|
# file:
|
||||||
|
# https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section
|
||||||
|
PATH="/gfxreconstruct/build/bin:$PATH" \
|
||||||
|
"$ARTIFACTS/tracie/tracie.sh" "$ARTIFACTS/traces.yml" gfxreconstruct \
|
||||||
|
|| ret=1
|
||||||
|
|
||||||
|
exit $ret
|
@@ -50,15 +50,29 @@ individually, thus reducing storage requirements during CI runs.
|
|||||||
To enable trace testing on a new device:
|
To enable trace testing on a new device:
|
||||||
|
|
||||||
1. Create a new job in .gitlab-ci.yml. The job will need to be tagged
|
1. Create a new job in .gitlab-ci.yml. The job will need to be tagged
|
||||||
to run on runners with the appropriate hardware. Use the `.traces-test`
|
to run on runners with the appropriate hardware.
|
||||||
template job as a base, and make sure you set a unique value for the
|
|
||||||
`DEVICE_NAME` variable:
|
1. If you mean to test GL traces, use the `.traces-test-gl`
|
||||||
|
template jobs as a base, and make sure you set a unique value for the
|
||||||
|
`DEVICE_NAME` variable:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
my-hardware-traces:
|
my-hardware-gl-traces:
|
||||||
extends: .traces-test-gl
|
extends: .traces-test-gl
|
||||||
variables:
|
variables:
|
||||||
DEVICE_NAME: "myhardware"
|
DEVICE_NAME: "gl-myhardware"
|
||||||
|
```
|
||||||
|
|
||||||
|
2. If you mean to test Vulkan traces, use the `.traces-test-vk`
|
||||||
|
template jobs as a base, set the `VK_DRIVER` variable, and make
|
||||||
|
sure you set a unique value for the `DEVICE_NAME` variable:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
my-hardware-vk-traces:
|
||||||
|
extends: .traces-test-vk
|
||||||
|
variables:
|
||||||
|
VK_DRIVER: "radeon"
|
||||||
|
DEVICE_NAME: "vk-myhardware"
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update the .gitlab-ci/traces.yml file with expectations for the new device.
|
2. Update the .gitlab-ci/traces.yml file with expectations for the new device.
|
||||||
@@ -68,8 +82,9 @@ To enable trace testing on a new device:
|
|||||||
|
|
||||||
### Trace files
|
### Trace files
|
||||||
|
|
||||||
Tracie supports both renderdoc (.rdc) and apitrace (.trace) files. Trace files
|
Tracie supports renderdoc (.rdc), apitrace (.trace) and gfxreconstruct
|
||||||
need to have the correct extension so that tracie can detect them properly.
|
(.gfxr) files. Trace files need to have the correct extension so that
|
||||||
|
tracie can detect them properly.
|
||||||
|
|
||||||
The trace files that are contained in public traces-db repositories must be
|
The trace files that are contained in public traces-db repositories must be
|
||||||
legally redistributable. This is typically true for FOSS games and
|
legally redistributable. This is typically true for FOSS games and
|
||||||
@@ -83,7 +98,8 @@ Mesa traces CI uses a set of scripts to replay traces and check the output
|
|||||||
against reference checksums.
|
against reference checksums.
|
||||||
|
|
||||||
The high level script [tracie.sh](.gitlab-ci/tracie/tracie.sh) accepts
|
The high level script [tracie.sh](.gitlab-ci/tracie/tracie.sh) accepts
|
||||||
a traces definition file and the type of traces (apitrace/renderdoc) to run:
|
a traces definition file and the type of traces
|
||||||
|
(apitrace/renderdoc/gfxreconstruct) to run:
|
||||||
|
|
||||||
tracie.sh .gitlab-ci/traces.yml renderdoc
|
tracie.sh .gitlab-ci/traces.yml renderdoc
|
||||||
|
|
||||||
@@ -116,11 +132,23 @@ Examples:
|
|||||||
### Running the replay scripts locally
|
### Running the replay scripts locally
|
||||||
|
|
||||||
It's often useful, especially during development, to be able to run the scripts
|
It's often useful, especially during development, to be able to run the scripts
|
||||||
locally. The scripts require a recent version of apitrace being in the path,
|
locally.
|
||||||
and also the renderdoc python module being available.
|
|
||||||
|
Depending on the target 3D API, the scripts require a recent version
|
||||||
|
of apitrace being in the path, and also the renderdoc python module
|
||||||
|
being available, for GL traces.
|
||||||
|
|
||||||
To ensure python3 can find the renderdoc python module you need to set
|
To ensure python3 can find the renderdoc python module you need to set
|
||||||
`PYTHONPATH` to point to the location of `renderdoc.so` (binary python modules)
|
`PYTHONPATH` to point to the location of `renderdoc.so` (binary python modules)
|
||||||
and `LD_LIBRARY_PATH` to point to the location of `librenderdoc.so`. In the
|
and `LD_LIBRARY_PATH` to point to the location of `librenderdoc.so`. In the
|
||||||
renderdoc build tree, both of these are in `renderdoc/<builddir>/lib`. Note
|
renderdoc build tree, both of these are in `renderdoc/<builddir>/lib`. Note
|
||||||
that renderdoc doesn't install the `renderdoc.so` python module.
|
that renderdoc doesn't install the `renderdoc.so` python module.
|
||||||
|
|
||||||
|
In the case of Vulkan traces, the scripts need a recent version of
|
||||||
|
gfxrecon-replay being in the path, and also the
|
||||||
|
`VK_LAYER_LUNARG_screenshot` Vulkan layer from LunarG's VulkanTools.
|
||||||
|
|
||||||
|
To ensure that this layer can be found when running the trace you need
|
||||||
|
to set `VK_LAYER_PATH` to point to the location of
|
||||||
|
`VkLayer_screenshot.json` and `LD_LIBRARY_PATH` to point to the
|
||||||
|
location of `libVkLayer_screenshot.so`.
|
||||||
|
Reference in New Issue
Block a user