]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/the-big-benchmark/the-big-benchmark.bat
37872d9a0a9dfb7cd3caecef0db8b274ddf1f057
[xonotic/xonotic.git] / misc / tools / the-big-benchmark / the-big-benchmark.bat
1 @echo off\r
2 \r
3 cd %~dp0\r
4 cd ..\..\..\r
5 \r
6 echo The Big Benchmark\r
7 echo  =================\r
8 echo.\r
9 if not exist all goto nogit\r
10 echo For Git builds, please use the-big-benchmark.sh instead!\r
11 goto end\r
12 :nogit\r
13 if "%1" == "" goto noarg\r
14 set xonotic=%1\r
15 goto postarg\r
16 :noarg\r
17 if "%ProgramFiles(x86)%" == "" goto bit32\r
18 :bit64\r
19 set xonotic=xonotic-x64.exe\r
20 goto postarg\r
21 :bit32\r
22 set xonotic=xonotic.exe\r
23 goto postarg\r
24 :postarg\r
25 \r
26 if exist data\the-big-benchmark.log del data\the-big-benchmark.log\r
27 if exist data\benchmark.log del data\benchmark.log\r
28 if exist data\engine.log del data\engine.log\r
29 set p=+vid_width 1024 +vid_height 768 +vid_desktopfullscreen 0 +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\r
30 \r
31 goto start\r
32 \r
33 :benchmark\r
34 echo Benchmarking on %e%\r
35 if exist data\benchmark.log del data\benchmark.log\r
36 echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% > data\engine.log\r
37 %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% >> data\engine.log 2>&1\r
38 find "MED: " data\engine.log\r
39 find "]quit" data\engine.log >nul\r
40 if not errorlevel 1 goto done\r
41 type data\engine.log >> data\the-big-benchmark.log\r
42 type data\benchmark.log >> data\the-big-benchmark.log\r
43 if not "%e%" == "med" goto nomed\r
44 find "checking for OpenGL 2.0 core features...  not detected" data\engine.log >nul\r
45 if errorlevel 1 goto nomed\r
46 echo OpenGL 2.0 or later required for Normal quality and higher, exiting.\r
47 goto done\r
48 :nomed\r
49 if not "%e%" == "med" goto nomed2\r
50 find "Using GL1.3 rendering path" data\engine.log >nul\r
51 if errorlevel 1 goto nomed\r
52 echo OpenGL 2.0 rendering disabled, exiting.\r
53 goto done\r
54 :nomed2\r
55 if not "%e%" == "high" goto nohigh\r
56 find "vid_soft 1" data\engine.log >nul\r
57 if errorlevel 1 goto nohigh\r
58 echo Software rendering does not support Ultra and Ultimate quality settings, exiting.\r
59 goto done\r
60 :nohigh\r
61 goto z%e%\r
62 \r
63 :start\r
64 \r
65 set e=omg\r
66 goto benchmark\r
67 :zomg\r
68 \r
69 set e=low\r
70 goto benchmark\r
71 :zlow\r
72 \r
73 set e=med\r
74 goto benchmark\r
75 :zmed\r
76 \r
77 set e=normal\r
78 goto benchmark\r
79 :znormal\r
80 \r
81 set e=high\r
82 goto benchmark\r
83 :zhigh\r
84 \r
85 set e=ultra\r
86 goto benchmark\r
87 :zultra\r
88 \r
89 set e=ultimate\r
90 goto benchmark\r
91 :zultimate\r
92 \r
93 :done\r
94 \r
95 if exist data\benchmark.log del data\benchmark.log\r
96 if exist data\engine.log del data\engine.log\r
97 \r
98 if exist data\the-big-benchmark.log goto logisgood\r
99 echo.\r
100 echo The benchmark has been aborted. No log file has been written.\r
101 goto end\r
102 \r
103 :logisgood\r
104 echo.\r
105 echo Please provide the the following info to the Xonotic developers:\r
106 echo  - CPU speed\r
107 echo  - memory size\r
108 echo  - graphics card (which vendor, which model)\r
109 echo  - operating system (including whether it is 32bit or 64bit)\r
110 echo  - graphics driver version\r
111 echo  - the file the-big-benchmark.log in the data directory\r
112 echo.\r
113 echo Thank you\r
114 :end\r
115 pause\r