]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/the-big-benchmark/the-big-benchmark.bat
Fix an endless loop in the-big-benchmark on Windows affecting all users.
[xonotic/xonotic.git] / misc / tools / the-big-benchmark / the-big-benchmark.bat
index d18dbde1e98dbd404f227df3c2c1a0fd1b9a11ee..4fb4a10dd6653b29b62930caf062f234e1578950 100644 (file)
@@ -26,63 +26,69 @@ goto postarg
 if exist data\the-big-benchmark.log del data\the-big-benchmark.log\r
 if exist data\benchmark.log del data\benchmark.log\r
 if exist data\engine.log del data\engine.log\r
-set p=+developer 1 -nohome -benchmarkruns 4 -benchmarkruns_skipfirst -benchmark demos/the-big-keybench.dem\r
+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
 \r
-if exist data\benchmark.log del data\benchmark.log\r
-echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-omg.cfg %p% > data\engine.log\r
-%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-omg.cfg %p% >> data\engine.log 2>&1\r
-find "]quit" data\engine.log >nul\r
-if not errorlevel 1 goto done\r
-type data\engine.log >> data\the-big-benchmark.log\r
-type data\benchmark.log >> data\the-big-benchmark.log\r
+goto start\r
 \r
+:benchmark\r
+echo Benchmarking on %e%\r
 if exist data\benchmark.log del data\benchmark.log\r
-echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-low.cfg %p% > data\engine.log\r
-%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-low.cfg %p% >> data\engine.log 2>&1\r
+echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% > data\engine.log\r
+%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% >> data\engine.log 2>&1\r
+find "MED: " data\engine.log\r
 find "]quit" data\engine.log >nul\r
 if not errorlevel 1 goto done\r
 type data\engine.log >> data\the-big-benchmark.log\r
 type data\benchmark.log >> data\the-big-benchmark.log\r
+if not "%e%" == "med" goto nomed\r
+find "checking for OpenGL 2.0 core features...  not detected" data\engine.log >nul\r
+if errorlevel 1 goto nomed\r
+echo OpenGL 2.0 or later required for Normal quality and higher, exiting.\r
+goto done\r
+:nomed\r
+if not "%e%" == "med" goto nomed2\r
+find "Using GL1.3 rendering path" data\engine.log >nul\r
+if errorlevel 1 goto nomed2\r
+echo OpenGL 2.0 rendering disabled, exiting.\r
+goto done\r
+:nomed2\r
+if not "%e%" == "high" goto nohigh\r
+find "vid_soft 1" data\engine.log >nul\r
+if errorlevel 1 goto nohigh\r
+echo Software rendering does not support Ultra and Ultimate quality settings, exiting.\r
+goto done\r
+:nohigh\r
+goto z%e%\r
 \r
-if exist data\benchmark.log del data\benchmark.log\r
-echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-med.cfg %p% > data\engine.log\r
-%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-med.cfg %p% >> data\engine.log 2>&1\r
-find "]quit" data\engine.log >nul\r
-if not errorlevel 1 goto done\r
-type data\engine.log >> data\the-big-benchmark.log\r
-type data\benchmark.log >> data\the-big-benchmark.log\r
+:start\r
 \r
-if exist data\benchmark.log del data\benchmark.log\r
-echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-normal.cfg %p% > data\engine.log\r
-%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-normal.cfg %p% >> data\engine.log 2>&1\r
-find "]quit" data\engine.log >nul\r
-if not errorlevel 1 goto done\r
-type data\engine.log >> data\the-big-benchmark.log\r
-type data\benchmark.log >> data\the-big-benchmark.log\r
+set e=omg\r
+goto benchmark\r
+:zomg\r
 \r
-if exist data\benchmark.log del data\benchmark.log\r
-echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-high.cfg %p% > data\engine.log\r
-%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-high.cfg %p% >> data\engine.log 2>&1\r
-find "]quit" data\engine.log >nul\r
-if not errorlevel 1 goto done\r
-type data\engine.log >> data\the-big-benchmark.log\r
-type data\benchmark.log >> data\the-big-benchmark.log\r
+set e=low\r
+goto benchmark\r
+:zlow\r
 \r
-if exist data\benchmark.log del data\benchmark.log\r
-echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultra.cfg %p% > data\engine.log\r
-%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultra.cfg %p% >> data\engine.log 2>&1\r
-find "]quit" data\engine.log >nul\r
-if not errorlevel 1 goto done\r
-type data\engine.log >> data\the-big-benchmark.log\r
-type data\benchmark.log >> data\the-big-benchmark.log\r
+set e=med\r
+goto benchmark\r
+:zmed\r
 \r
-if exist data\benchmark.log del data\benchmark.log\r
-echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultimate.cfg %p% > data\engine.log\r
-%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-ultimate.cfg %p% >> data\engine.log 2>&1\r
-find "]quit" data\engine.log >nul\r
-if not errorlevel 1 goto done\r
-type data\engine.log >> data\the-big-benchmark.log\r
-type data\benchmark.log >> data\the-big-benchmark.log\r
+set e=normal\r
+goto benchmark\r
+:znormal\r
+\r
+set e=high\r
+goto benchmark\r
+:zhigh\r
+\r
+set e=ultra\r
+goto benchmark\r
+:zultra\r
+\r
+set e=ultimate\r
+goto benchmark\r
+:zultimate\r
 \r
 :done\r
 \r