Commit 43873afd authored by Tomeu Vizoso's avatar Tomeu Vizoso
Browse files

gitlab-ci: Use surfaceless platform also for apitrace

In preparation for using apitrace to replay traces in LAVA jobs, build a
newer waffle so apitrace can use the surfaceless EGL platform.

As things were before this commit, Xvfb would have been needed in the
LAVA images.
Signed-off-by: Tomeu Vizoso's avatarTomeu Vizoso <>
Part-of: <mesa/mesa!4000>
parent 2ca662fb
......@@ -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
git clone --single-branch --no-checkout /waffle
pushd /waffle
git checkout "$WAFFLE_VERSION"
make -C _build -j4 install
rm -rf /waffle
git clone --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
......@@ -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.
# The renderdoc version we use can handle surfaceless.
"$ARTIFACTS/tracie/" "$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 PATH=/apitrace/build:\$PATH; \
\"$ARTIFACTS/tracie/\" \"$ARTIFACTS/traces.yml\" apitrace" \
|| ret=1
"$ARTIFACTS/tracie/" "$ARTIFACTS/traces.yml" renderdoc || ret=1
"$ARTIFACTS/tracie/" "$ARTIFACTS/traces.yml" apitrace || ret=1
exit $ret
......@@ -77,8 +77,8 @@ def dump_with_apitrace(trace_path, calls, device_name):
outputprefix = str(Path(outputdir) / + "-"
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) / ( + ".log")
run_logged_command(cmd, None, log_path)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment