-
Notifications
You must be signed in to change notification settings - Fork 0
/
trace-openarena.sh
executable file
·25 lines (16 loc) · 838 Bytes
/
trace-openarena.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#/usr/bin/env bash
apitrace --help 2>&1 >/dev/null || echo "You need to install apitrace! Try: sudo apt install apitrace"
apitrace --help 2>&1 >/dev/null || exit -1
export LIBGL_ALWAYS_SOFTWARE=true
export GALLIUM_DRIVER=llvmpipe
# Avoid error dialog if OpenArena was force-closed previously.
rm -f /tmp/ioq3.pid
# Work around "HUNK_ALLOC FAILED" error with default OpenArena settings
sed -i 's/seta com_hunkMegs "[0-9]*"/seta com_hunkMegs "256"/' ~/.openarena/baseoa/q3config.cfg
echo "Frames TotalTime averageFPS minimum/average/maximum/std deviation"
echo ""
# Avoid error dialog if OpenArena was force-closed previously.
rm -f /tmp/ioq3.pid
apitrace trace openarena +timedemo 1 +cg_drawfps 1 +demo demo088-test1.dm_71 +set nextdemo quit 2>&1 | grep 'frames'
mv quake3.trace openarena.trace
echo "Trace has been written!"