5 if [ -d "${0%/*}" ]; then
10 echo "The Big Benchmark"
11 echo " ================="
14 echo "WARNING: running this script will destroy ANY local changes you"
15 echo "might have on the repository that haven't been pushed or stored"
16 echo "in a local branch yet."
18 if [ x"$1" != x"--yes" ]; then
19 echo "Are you absolutely sure you want to run this?"
42 elif [ -z "$*" ]; then
45 set -- ./Xonotic.app/Contents/MacOS/xonotic-osx-sdl
48 set -- ./xonotic-linux-sdl.sh
51 echo "OS not detected. Usage:"
52 echo " $0 how-to-run-xonotic"
53 echo "On Windows when using a release build or an autobuild,"
54 echo "use the-big-benchmark.bat instead!"
59 rm -f data/the-big-benchmark.log
60 rm -f data/benchmark.log
63 # for next version of benchmark: remove +cl_playerdetailreduction 0 and add +showfps 1
64 p="+cl_curl_enabled 0 +r_texture_dds_load 1 +cl_playerdetailreduction 0 +developer 1 -nohome -benchmarkruns 4 -benchmarkruns_skipfirst -benchmark demos/the-big-keybench.dem"
66 for e in omg low med normal high ultra ultimate; do
67 echo "Benchmarking on $e"
68 rm -f data/benchmark.log
69 echo + "$@" +exec effects-$e.cfg $p > data/engine.log
70 "$@" +exec effects-$e.cfg $p >>data/engine.log 2>&1 || true
71 grep "^MED: " data/engine.log # print results to the terminal
72 if grep '\]quit' data/engine.log >/dev/null; then
75 cat data/engine.log >> data/the-big-benchmark.log
76 cat data/benchmark.log >> data/the-big-benchmark.log
77 if [ x"$e" = x"med" ]; then
78 if grep 'checking for OpenGL 2\.0 core features\.\.\. not detected' data/engine.log; then
79 echo "OpenGL 2.0 or later required for Normal quality and higher, exiting."
83 if [ x"$e" = x"high" ]; then
84 if grep 'vid_soft 1' data/engine.log; then
85 echo "Software rendering does not support Ultra and Ultimate quality settings, exiting."
95 rm -f data/benchmark.log
97 if ! [ -f data/the-big-benchmark.log ]; then
99 echo "The benchmark has been aborted. No log file has been written."
104 echo "Please provide the the following info to the Xonotic developers:"
106 echo " - memory size"
107 echo " - graphics card (which vendor, which model)"
108 echo " - operating system (including whether it is 32bit or 64bit)"
109 echo " - graphics driver version"
110 echo " - the file the-big-benchmark.log in the data directory"