diff options
-rw-r--r-- | .gitlab-ci/build-apitrace.sh | 14 | ||||
-rwxr-xr-x | .gitlab-ci/tracie-runner-gl.sh | 27 | ||||
-rw-r--r-- | .gitlab-ci/tracie/dump_trace_images.py | 4 |
3 files changed, 29 insertions, 16 deletions
diff --git a/.gitlab-ci/build-apitrace.sh b/.gitlab-ci/build-apitrace.sh index 785a5ae52e7..0361886e7a4 100644 --- a/.gitlab-ci/build-apitrace.sh +++ b/.gitlab-ci/build-apitrace.sh @@ -2,12 +2,24 @@ set -ex +# Need an unreleased version of Waffle for surfaceless support in apitrace +# Replace this build with the Debian package once that's possible + +WAFFLE_VERSION="e3c995d9a2693b687501715b6550619922346089" +git clone https://gitlab.freedesktop.org/mesa/waffle.git --single-branch --no-checkout /waffle +pushd /waffle +git checkout "$WAFFLE_VERSION" +cmake -B_build -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release . +make -C _build -j4 install +popd +rm -rf /waffle + APITRACE_VERSION="9.0" git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace pushd /apitrace git checkout "$APITRACE_VERSION" -cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False +cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ ninja -C _build -j4 mkdir build cp _build/apitrace build diff --git a/.gitlab-ci/tracie-runner-gl.sh b/.gitlab-ci/tracie-runner-gl.sh index 7b5db08e105..28331e83cd3 100755 --- a/.gitlab-ci/tracie-runner-gl.sh +++ b/.gitlab-ci/tracie-runner-gl.sh @@ -11,23 +11,24 @@ export LD_LIBRARY_PATH="$(pwd)/install/lib/" export PYTHONPATH="$PYTHONPATH:/renderdoc/build/lib" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/renderdoc/build/lib" +# Set environment for the waffle library. +export LD_LIBRARY_PATH="/waffle/build/lib:$LD_LIBRARY_PATH" + +# Set environment for apitrace executable. +export PATH=/apitrace/build:$PATH + +# Use the surfaceless EGL platform. +export EGL_PLATFORM=surfaceless +export DISPLAY= +export WAFFLE_PLATFORM=surfaceless_egl + # Perform a self-test to ensure tracie is working properly. "$ARTIFACTS/tracie/tests/test.sh" ret=0 -# The renderdoc version we use can handle surfaceless. -EGL_PLATFORM=surfaceless DISPLAY= \ - "$ARTIFACTS/tracie/tracie.sh" "$ARTIFACTS/traces.yml" renderdoc \ - || ret=1 - -# We need a newer waffle to use surfaceless with apitrace. For now run with -# xvfb. -xvfb-run --server-args="-noreset" sh -c \ - "set -ex; \ - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; \ - export PATH=/apitrace/build:\$PATH; \ - \"$ARTIFACTS/tracie/tracie.sh\" \"$ARTIFACTS/traces.yml\" apitrace" \ - || ret=1 +"$ARTIFACTS/tracie/tracie.sh" "$ARTIFACTS/traces.yml" renderdoc || ret=1 + +"$ARTIFACTS/tracie/tracie.sh" "$ARTIFACTS/traces.yml" apitrace || ret=1 exit $ret diff --git a/.gitlab-ci/tracie/dump_trace_images.py b/.gitlab-ci/tracie/dump_trace_images.py index 6a3ed6b18e6..343ff77bb31 100644 --- a/.gitlab-ci/tracie/dump_trace_images.py +++ b/.gitlab-ci/tracie/dump_trace_images.py @@ -77,8 +77,8 @@ def dump_with_apitrace(trace_path, calls, device_name): outputprefix = str(Path(outputdir) / trace_path.name) + "-" if len(calls) == 0: calls = [str(get_last_apitrace_frame_call(trace_path))] - cmd = ["apitrace", "dump-images", "--calls=" + ','.join(calls), - "-o", outputprefix, str(trace_path)] + cmd = ["eglretrace", "--snapshot=" + ','.join(calls), + "--snapshot-prefix=" + outputprefix, str(trace_path)] log_path = Path(outputdir) / (trace_path.name + ".log") run_logged_command(cmd, None, log_path) |