mirror of
https://github.com/DoubleGhosty/cool_fox.git
synced 2026-12-06 08:38:35 +00:00
With port 1 off, an 8-core 5700X3D lost more on CPU copies than the card gained (16.2 -> 14.4 fps); with port 1 on and its clamps batched after the last buffer-writing shader, the GPU went 42.6 -> 26 ms and 16.8 -> 18-19 fps. Larger CPUs keep port 1 off. An explicit VICTORY_PORT_CONSTANTS still wins.
92 lines
5.0 KiB
Batchfile
92 lines
5.0 KiB
Batchfile
@echo off
|
|
setlocal EnableExtensions DisableDelayedExpansion
|
|
rem High-performance profile for AMD Radeon cards (RX 7000+, 16 GB+ VRAM).
|
|
rem Enables all renderer ports that the leading community forks run with.
|
|
rem For NVIDIA GPUs or 8 GB VRAM cards, use Play-VIctory.cmd instead.
|
|
rem The title's folder: VICTORY_GAME_DIR, else game_dir in victory.toml.
|
|
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 game_dir in victory.toml to the folder containing your title executable. 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
|
|
)
|
|
set "runner=%~dp0victory-3d-rtx-pareto-residency.exe"
|
|
if not exist "%runner%" set "runner=%~dp0target\release\victory.exe"
|
|
if not exist "%runner%" (
|
|
echo Extract the Windows release or run cargo build --release --locked -p victory. 1>&2
|
|
exit /b 2
|
|
)
|
|
if not defined VICTORY_AMBIENT_AIR set "VICTORY_AMBIENT_AIR=1.5"
|
|
if not defined VICTORY_CACHE_DIR set "VICTORY_CACHE_DIR=%LOCALAPPDATA%\VIctory\cache-pareto"
|
|
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_AMBIENT set "VICTORY_AMBIENT=constant:0.8"
|
|
if not defined VICTORY_TEXTURE_GUARD set "VICTORY_TEXTURE_GUARD=0"
|
|
|
|
rem Async paths: THIN and JOIN_PARTS tested stable on AMD.
|
|
if not defined VICTORY_THIN set "VICTORY_THIN=1"
|
|
if not defined VICTORY_JOIN_PARTS set "VICTORY_JOIN_PARTS=8"
|
|
if not defined VICTORY_UPLOAD_AHEAD set "VICTORY_UPLOAD_AHEAD=1"
|
|
|
|
rem Renderer ports 5, 6 and 7 on.
|
|
rem Port 1 (the title's constants heap read in place by the card) off: it saved
|
|
rem ~6 ms on an RTX 5070 Ti, but on AMD every indirect execution is clamped after
|
|
rem each shader write before it, and outdoors the frame rate doubled without it:
|
|
rem RX 9070 XT 8-10 -> 20-21 fps (#180), RX 7800 XT 5-7 -> 16 (#181),
|
|
rem RX 7900 XTX 7-12 -> ~12 (#171). set VICTORY_PORT_CONSTANTS=1 to compare.
|
|
rem But with port 1 off, the copies come back to the CPU: on 8 cores or fewer
|
|
rem (16 threads) that costs more than it saves (RX 7800 XT + 5700X3D: 16.2 -> 14.4
|
|
rem fps, #180). There, port 1 stays on and its clamps run in a batch after the
|
|
rem last buffer-writing shader instead of one by one (GPU 42.6 -> 26 ms, 16.8 ->
|
|
rem 18-19 fps, #180), which is what made port 1 slow on AMD.
|
|
if not defined VICTORY_PORT_CONSTANTS (
|
|
if %NUMBER_OF_PROCESSORS% LEQ 16 (
|
|
set "VICTORY_PORT_CONSTANTS=1"
|
|
if not defined VICTORY_PORT_CONSTANTS_ORDER_ALONE set "VICTORY_PORT_CONSTANTS_ORDER_ALONE=0"
|
|
) else (
|
|
set "VICTORY_PORT_CONSTANTS=0"
|
|
)
|
|
)
|
|
rem Port 5: constant buffers read as raw bytes (~4.7 ms, ~22k fills eliminated).
|
|
if not defined VICTORY_PORT_CBV set "VICTORY_PORT_CBV=1"
|
|
rem Port 6: write-guard lock shared by faults and refreshes (~2 ms saved).
|
|
if not defined VICTORY_PORT_GUARD set "VICTORY_PORT_GUARD=1"
|
|
rem Port 7: journal notes split into 64 parts with their own locks (~1-3 ms).
|
|
if not defined VICTORY_PORT_JOURNAL set "VICTORY_PORT_JOURNAL=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"
|
|
if not defined VICTORY_LEVELS_ON_DEMAND set "VICTORY_LEVELS_ON_DEMAND=1"
|
|
if not defined VICTORY_CARD_BUFFERS_MIN_KB set "VICTORY_CARD_BUFFERS_MIN_KB=64"
|
|
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"
|
|
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%
|