mirror of
https://github.com/DoubleGhosty/cool_fox.git
synced 2026-12-06 08:38:35 +00:00
Its numbers are a 16 GB card's (2 GB of buffer copies on the card, 3 GB kept for render targets, textures up to 95 %), not an NVIDIA one's: an 8 GB NVIDIA card would be overfilled by them, and a 16 GB AMD card gets them right. Port 1 stays off, which on an RX 9070 XT doubles the frame rate outdoors (#180). - The processor's thread counts (landing threads, pipeline workers, DirectStorage workers) are left to victory.exe, which sizes them from the cores; they were fixed for an 8-core Ryzen 7 9700X. The under and view pools keep 4 threads each, below their default of 6. - Development settings out: VICTORY_PIPELINE_BOOK=1 (every pipeline written down as the run goes) and the detailed info-level log; it logs warnings, as the other launchers. - README, the launcher table and the GPU report form name the new file.
153 lines
8.6 KiB
Batchfile
153 lines
8.6 KiB
Batchfile
@echo off
|
|
setlocal EnableExtensions DisableDelayedExpansion
|
|
rem Launcher for cards with 16 GB of video memory or more, NVIDIA or AMD:
|
|
rem Series X, 2 GB of buffer copies on the card, 3 GB kept for render targets.
|
|
rem Tuned first on an RTX 5070 Ti 16 GB with a Ryzen 7 9700X and 32 GB of RAM;
|
|
rem the thread counts the processor decides are left to victory.exe.
|
|
rem On a card with less memory use Play-VIctory.cmd (8 GB and up) or
|
|
rem Play-VIctory-4GB.cmd.
|
|
if not "%~1"=="" if /i not "%~1"=="pareto-residency" (
|
|
echo Usage: Play-VIctory-16GB.cmd [pareto-residency] 1>&2
|
|
exit /b 2
|
|
)
|
|
set "_cfg_game_dir="
|
|
if not defined VICTORY_GAME_DIR if exist "%~dp0victory.toml" (
|
|
for /f "usebackq eol=# tokens=1,* delims==" %%A in ("%~dp0victory.toml") do (
|
|
for /f "tokens=1" %%K in ("%%A") do if /i "%%K"=="game_dir" (
|
|
for /f "tokens=* delims= " %%V in ("%%B") do set "_cfg_game_dir=%%~V"
|
|
)
|
|
)
|
|
)
|
|
if defined _cfg_game_dir set "VICTORY_GAME_DIR=%_cfg_game_dir:'=%"
|
|
if not defined VICTORY_GAME_DIR (
|
|
echo Set VICTORY_GAME_DIR or configure game_dir in victory.toml. 1>&2
|
|
exit /b 2
|
|
)
|
|
if not exist "%VICTORY_GAME_DIR%\game_scarlett_master.exe" (
|
|
echo game_scarlett_master.exe not found in VICTORY_GAME_DIR: "%VICTORY_GAME_DIR%" 1>&2
|
|
exit /b 2
|
|
)
|
|
rem The locally built release binary first.
|
|
set "runner=%~dp0target\release\victory.exe"
|
|
if not exist "%runner%" set "runner=%~dp0victory.exe"
|
|
if not exist "%runner%" (
|
|
echo Build first: cargo build --release --locked -p victory 1>&2
|
|
exit /b 2
|
|
)
|
|
|
|
rem Cache & lighting:
|
|
rem - VICTORY_AMBIENT_AIR=1.5 + VICTORY_AMBIENT_MARCH=1.5 clamp scattered light
|
|
rem and zero NaN/Inf froxels and raymarched in-scatter pixels (prevents black
|
|
rem or white patches floating across the screen).
|
|
if not defined VICTORY_AMBIENT_AIR set "VICTORY_AMBIENT_AIR=1.5"
|
|
if not defined VICTORY_AMBIENT_MARCH set "VICTORY_AMBIENT_MARCH=1.5"
|
|
if not defined VICTORY_CACHE_DIR set "VICTORY_CACHE_DIR=%LOCALAPPDATA%\VIctory\cache-pareto"
|
|
if not defined VICTORY_AMBIENT set "VICTORY_AMBIENT=constant:0.8"
|
|
|
|
rem Output resolution & sharpness for a 4K monitor:
|
|
rem Keep Series X native 3840x2160 output (and unmodified 2/3 = 2560x1440
|
|
rem internal render scale) so UI proportions are native 4K and shaders/upscaler
|
|
rem stay completely unpatched. Override e.g. set VICTORY_OUTPUT=2560x1440 if needed.
|
|
|
|
rem CRITICAL: keep async submission enabled even with VICTORY_THIN=0 so
|
|
rem submission prep never blocks the title's render thread (and Port 7 works).
|
|
if not defined VICTORY_ASYNC_SUBMIT set "VICTORY_ASYNC_SUBMIT=1"
|
|
if not defined VICTORY_SUBMIT_FRAMES set "VICTORY_SUBMIT_FRAMES=1"
|
|
|
|
rem Core GPU relay & submission pipeline
|
|
if not defined VICTORY_TEXTURE_NO_WAIT set "VICTORY_TEXTURE_NO_WAIT=1"
|
|
if not defined VICTORY_WIDE_BACK set "VICTORY_WIDE_BACK=1"
|
|
if not defined VICTORY_CARD_REHASH_RUNS set "VICTORY_CARD_REHASH_RUNS=1"
|
|
if not defined VICTORY_JOIN_COPIES set "VICTORY_JOIN_COPIES=1"
|
|
if not defined VICTORY_INDIRECT_WINDOW set "VICTORY_INDIRECT_WINDOW=1"
|
|
if not defined VICTORY_RELAY_COPY set "VICTORY_RELAY_COPY=1"
|
|
if not defined VICTORY_CARD_STEPS set "VICTORY_CARD_STEPS=2"
|
|
if not defined VICTORY_INDIRECT_BATCH set "VICTORY_INDIRECT_BATCH=2"
|
|
if not defined VICTORY_MAP_THREADS set "VICTORY_MAP_THREADS=1"
|
|
if not defined VICTORY_CARD_AWAKE set "VICTORY_CARD_AWAKE=1"
|
|
if not defined VICTORY_SHOW_AFTER set "VICTORY_SHOW_AFTER=1"
|
|
if not defined VICTORY_LIBRARY_STORE_LATER set "VICTORY_LIBRARY_STORE_LATER=1"
|
|
if not defined VICTORY_PIPELINE_WAIT_MS set "VICTORY_PIPELINE_WAIT_MS=0"
|
|
|
|
rem Async texture streaming on the copy queue (throttled by residency.rs under
|
|
rem real RAM/commit pressure).
|
|
if not defined VICTORY_UPLOAD_AHEAD set "VICTORY_UPLOAD_AHEAD=1"
|
|
|
|
rem DirectStorage I/O & BCPack decoding: a larger staging buffer; the number of
|
|
rem workers follows the processor (VICTORY_DSTORAGE_WORKERS to set it).
|
|
if not defined VICTORY_DSTORAGE_STAGING_MB set "VICTORY_DSTORAGE_STAGING_MB=256"
|
|
|
|
rem Stop the driver's background shader recompile threads from stealing cores
|
|
rem and stalling frames for minutes after loading.
|
|
if not defined VICTORY_D3D12_BACKGROUND set "VICTORY_D3D12_BACKGROUND=0"
|
|
|
|
rem Fast, artifact-free texture streaming:
|
|
rem - Keep VICTORY_PAGE_WRITES unset (upstream mode 1 = guards only) so DirectStorage
|
|
rem writes do not flood the bindless texture queue while BAKE_PAGE_WRITTEN and
|
|
rem REMAPPED still wake bakes and newly mapped textures immediately.
|
|
rem - VICTORY_TEXTURE_GUARD=0 prevents pixelated colour-noise artifacts on skin/phone/decals.
|
|
rem - VICTORY_EARLY_TEXTURES_MS=50 + VICTORY_TEXTURE_STAGE_MS=200 let loading frames
|
|
rem and 3x catch-up drain the initial texture backlog rapidly instead of stalling
|
|
rem surfaces grey/black for minutes.
|
|
if not defined VICTORY_TEXTURE_GUARD set "VICTORY_TEXTURE_GUARD=0"
|
|
if not defined VICTORY_EARLY_TEXTURES_MS set "VICTORY_EARLY_TEXTURES_MS=50"
|
|
if not defined VICTORY_TEXTURE_STAGE_MS set "VICTORY_TEXTURE_STAGE_MS=200"
|
|
|
|
rem 16 GB VRAM tuning for native 4K targets + fast async textures:
|
|
rem - VICTORY_LEVELS_MIN_KB=4096 lets all 1-4 MiB textures stream on the async copy
|
|
rem queue (VICTORY_UPLOAD_AHEAD=1) while huge 4K textures (>= 4 MiB) still allocate
|
|
rem mips on demand to stay comfortably inside 16 GB VRAM.
|
|
rem - Keep VICTORY_WINDOWS_BAR_MB=0 (off): single-buffered GPU_UPLOAD windows race
|
|
rem with multi-frame in-flight draws (seen on NVIDIA) and cause black geometry.
|
|
rem - VICTORY_CARD_BUFFERS_MB=2048 keeps compute buffers in the card's memory.
|
|
rem - VICTORY_READBACK_POOL=1 pools D3D12 readback buffers for zero-alloc water readbacks.
|
|
if not defined VICTORY_LEVELS_ON_DEMAND set "VICTORY_LEVELS_ON_DEMAND=1"
|
|
if not defined VICTORY_LEVELS_MIN_KB set "VICTORY_LEVELS_MIN_KB=4096"
|
|
if not defined VICTORY_CARD_BUFFERS_MIN_KB set "VICTORY_CARD_BUFFERS_MIN_KB=64"
|
|
if not defined VICTORY_CARD_BUFFERS_MB set "VICTORY_CARD_BUFFERS_MB=2048"
|
|
if not defined VICTORY_READBACK_POOL set "VICTORY_READBACK_POOL=1"
|
|
if not defined VICTORY_CARD_ROOM_FOR_TARGETS_MB set "VICTORY_CARD_ROOM_FOR_TARGETS_MB=3072"
|
|
if not defined VICTORY_TEXTURE_ROOM_PERCENT set "VICTORY_TEXTURE_ROOM_PERCENT=95"
|
|
|
|
rem Worker threads: the landing threads and the pipeline workers follow the
|
|
rem processor (VICTORY_LAND_THREADS, VICTORY_PIPELINE_WORKERS to set them); the
|
|
rem under and view pools get 4 each, fewer than their default of 6, and no spin
|
|
rem loops (VICTORY_WIDE_SPIN=0), so DirectStorage and the copy-queue workers
|
|
rem always get CPU time.
|
|
if not defined VICTORY_UNDER_THREADS set "VICTORY_UNDER_THREADS=4"
|
|
if not defined VICTORY_VIEW_THREADS set "VICTORY_VIEW_THREADS=4"
|
|
if not defined VICTORY_WIDE_SPIN set "VICTORY_WIDE_SPIN=0"
|
|
|
|
rem Renderer ports & async list translation.
|
|
rem Ports 6 & 7 save 2-5 ms/frame. Port 1 stays off: on an RX 9070 XT it halved
|
|
rem the frame rate outdoors (#180).
|
|
if not defined VICTORY_PORT_GUARD set "VICTORY_PORT_GUARD=1"
|
|
if not defined VICTORY_PORT_JOURNAL set "VICTORY_PORT_JOURNAL=1"
|
|
rem Opt-in experiments (override via env before calling):
|
|
rem set VICTORY_HAIR=0 (leave out the 18 hair-strand shaders; on by default)
|
|
rem set VICTORY_PORT_CONSTANTS=1 (~6 ms saved on an RTX 5070 Ti; slower on AMD, #180)
|
|
rem set VICTORY_PORT_CBV=1 (~4.7 ms saved; re-keys shader cache)
|
|
rem set VICTORY_THIN=1 (async list translation; set VICTORY_THIN_THREADS=5)
|
|
rem set VICTORY_JOIN_PARTS=8 (parallel submission join)
|
|
rem set VICTORY_OUTPUT=2560x1440 (lower output res if 4K VRAM fills up)
|
|
rem set VICTORY_TEXTURE_GUARD=1 (save CPU if skin/phone colour noise is absent)
|
|
rem set VICTORY_FRAME_INTERVAL_MS=16.667 (60 FPS frame pacing)
|
|
if not defined VICTORY_THIN set "VICTORY_THIN=0"
|
|
if not defined VICTORY_JOIN_PARTS set "VICTORY_JOIN_PARTS=0"
|
|
if not defined VICTORY_PORT_CONSTANTS set "VICTORY_PORT_CONSTANTS=0"
|
|
if not defined VICTORY_PORT_CBV set "VICTORY_PORT_CBV=0"
|
|
|
|
rem The title ends itself (a write to 0 at +0x23cf683) when its main loop has
|
|
rem not ticked for 30 s, as while its first frames wait for their compute
|
|
rem pipelines: while bit 0 of title+0x71b6330 is set its watchdog starts over.
|
|
if not defined VICTORY_POKE set "VICTORY_POKE=b99f876b74d4a77f@71b6330:1"
|
|
rem Warnings only, as the other launchers; for the 5-second frame and memory
|
|
rem lines set VICTORY_LOG=warn,victory_gpu::host=info before calling.
|
|
if not defined VICTORY_LOG if not defined RUST_LOG set "VICTORY_LOG=warn"
|
|
rem Every session logs to logs\session-<date>-<time>.log (UTC) beside this
|
|
rem launcher (victory.exe keeps the newest 20), so a run can be looked at after
|
|
rem the window is closed. Set VICTORY_LOG_FILE or VICTORY_LOG_DIR to log elsewhere.
|
|
if not defined VICTORY_LOG_FILE if not defined VICTORY_LOG_DIR set "VICTORY_LOG_DIR=%~dp0logs"
|
|
"%runner%" run "%VICTORY_GAME_DIR%\game_scarlett_master.exe" --console series-x --execute
|
|
exit /b %errorlevel%
|