upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build-Shaders.cmd77
-rw-r--r--README.md7
2 files changed, 82 insertions, 2 deletions
diff --git a/Build-Shaders.cmd b/Build-Shaders.cmd
new file mode 100644
index 0000000..568c16d
--- /dev/null
+++ b/Build-Shaders.cmd
@@ -0,0 +1,77 @@
1@echo off
2rem Makes every shader and every pipeline of the title ahead of play (the program's own "warm"), so that a
3rem session starts with nothing left to compile. ASCII only.
4rem
5rem Build-Shaders.cmd the title's executable is looked for as play looks for it
6rem Build-Shaders.cmd <title exe> ... or given
7rem Build-Shaders.cmd <title exe> <options> the SAME options you give "play" (--res, --series-s, --set NAME=VALUE):
8rem pipelines are made for the settings a session will have
9rem Without options: --res 1080to1440, the settings the README's numbers are measured with.
10rem
11rem More options of the program's own (victory warm --help):
12rem --used only the pipelines earlier sessions drew with (a few minutes)
13rem --jobs N processes at once (default: every logical core)
14rem --verify makes nothing: asks for what was made once more and counts what came from where
15rem
16rem How long (measured on a GeForce RTX 4070 with 28 threads): about 20 minutes the first time for all
17rem of about 83,500 pipelines; about 12 minutes when most are already in the pipeline library; --used
18rem about 3 minutes. It can be stopped with Ctrl+C and started again: what is made stays made.
19rem
20rem Three things that matter:
21rem 1. Run it with the SAME victory.exe, in the SAME folder, that you play with. The graphics driver keeps
22rem its own shader cache by the program's path: the same pipelines took 11 seconds to load from the
23rem path they were made from and about 1,100 seconds from another.
24rem 2. Run it from a normal window, not as administrator (the driver then keeps its cache elsewhere).
25rem 3. It uses every core and up to 0.7 GB of memory a process. Close the game first. It starts no further
26rem process while less than about 8 GB of memory is free and stops below 3 GB (--min-free-mb).
27setlocal EnableExtensions DisableDelayedExpansion
28
29set "runner=%VICTORY_EXE%"
30if not defined runner set "runner=%~dp0target\release\victory.exe"
31if not exist "%runner%" set "runner=%~dp0victory.exe"
32if not exist "%runner%" (
33 echo No victory.exe found. Build it first: cargo build --release --locked -p victory 1>&2
34 echo ^(or set VICTORY_EXE to the one you play with^) 1>&2
35 exit /b 2
36)
37
38set "title="
39if not "%~1"=="" (
40 set "first=%~1"
41 setlocal EnableDelayedExpansion
42 if not "!first:~0,2!"=="--" (
43 endlocal
44 set "title=%~1"
45 shift
46 ) else (
47 endlocal
48 )
49)
50if defined title if not exist "%title%" (
51 echo No such file: %title% 1>&2
52 exit /b 2
53)
54
55set "options="
56:collect
57if "%~1"=="" goto :collected
58set "options=%options% %1"
59shift
60goto :collect
61:collected
62if not defined options set "options= --res 1080to1440"
63
64echo Making the title's shaders and pipelines ahead of play.
65echo program: %runner%
66if defined title echo title: %title%
67echo options:%options%
68echo.
69if defined title (
70 "%runner%" warm%options% "%title%"
71) else (
72 "%runner%" warm%options%
73)
74set "code=%errorlevel%"
75echo.
76if "%code%"=="0" (echo Done. Start the game as usual.) else (echo Ended with code %code%. Run it again to go on where it stopped.)
77exit /b %code%
diff --git a/README.md b/README.md
index a2c33b9..c0ad9e0 100644
--- a/README.md
+++ b/README.md
@@ -48,8 +48,11 @@ contributors. Thank you.
48 counts are about as slow a little over the budget as far over it, so that alone is not the 48 counts are about as slow a little over the budget as far over it, so that alone is not the
49 cause. Not known yet what is; the same kind of frame replayed offline takes about 80 ms. 49 cause. Not known yet what is; the same kind of frame replayed offline takes about 80 ms.
50 `play --set VICTORY_RT_NATIVE=0` plays with the old path. 50 `play --set VICTORY_RT_NATIVE=0` plays with the old path.
51 - The first start after this update translates the shaders again (`victory warm` does it 51 - The first start after this update translates the shaders again. `Build-Shaders.cmd` (in this
52 ahead: about 12 minutes here from a filled pipeline library). 52 folder; it runs `victory warm` with the options you play with) makes every shader and pipeline
53 ahead: about 20 minutes the first time for all of about 83,500, about 12 minutes here from a
54 filled pipeline library, a few minutes with `--used`. Run it with the same `victory.exe`, in
55 the same folder, that you play with: the graphics driver keeps its cache by the program's path.
53- *The title's memory on the card.* The copies of title memory that draws read take card memory 56- *The title's memory on the card.* The copies of title memory that draws read take card memory
54 only for the 64 KiB pieces in use and are sent from the title's memory without a second copy in 57 only for the 64 KiB pieces in use and are sent from the title's memory without a second copy in
55 RAM (`VICTORY_WINDOWS_SPARSE`, `VICTORY_WINDOWS_DIRECT`, both on; `=0` turns each off): what the 58 RAM (`VICTORY_WINDOWS_SPARSE`, `VICTORY_WINDOWS_DIRECT`, both on; `=0` turns each off): what the