diff --git a/Play-VIctory-AMD.cmd b/Play-VIctory-AMD.cmd index ea7155b..53f149a 100644 --- a/Play-VIctory-AMD.cmd +++ b/Play-VIctory-AMD.cmd @@ -54,7 +54,19 @@ rem ~6 ms on an RTX 5070 Ti, but on AMD every indirect execution is clamped afte 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. -if not defined VICTORY_PORT_CONSTANTS set "VICTORY_PORT_CONSTANTS=0" +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). diff --git a/README.md b/README.md index 7039cf1..4b1b038 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ gh attestation verify .\cool_fox-windows-x64.zip -R DoubleGhosty/cool_fox - Every launcher holds the game's 30 s watchdog (`VICTORY_POKE`) so slow first frames don't end the run. - **Renderer Ports (Performance):** - `VICTORY_PORT_GUARD=1` and `VICTORY_PORT_JOURNAL=1` now enabled by default in launchers: write-guard lock sharing and journal splitting save 2–5 ms per frame on all tested GPUs. - - `VICTORY_PORT_CBV=1` (port 5) is on in `Play-VIctory-AMD.cmd` and opt-in elsewhere. `VICTORY_PORT_CONSTANTS=1` (port 1) is opt-in everywhere: on AMD cards it halves the frame rate outdoors (#180, #181, #171). + - `VICTORY_PORT_CBV=1` (port 5) is on in `Play-VIctory-AMD.cmd` and opt-in elsewhere. `VICTORY_PORT_CONSTANTS=1` (port 1) is opt-in everywhere except `Play-VIctory-AMD.cmd` on CPUs of 16 threads or fewer, where it is on with its clamps batched (`VICTORY_PORT_CONSTANTS_ORDER_ALONE=0`): with clamps one by one it halves AMD frame rates outdoors (#180, #181, #171), and with port 1 off an 8-core CPU loses more on copies than the card gains (#180). - `VICTORY_LEVELS_ON_DEMAND=1` enabled by default: card memory allocated only for texture mip levels the title holds, saving up to 3 GB of VRAM. --- @@ -192,7 +192,7 @@ Each renderer port eliminates a class of per-frame CPU work. "Default" is what t | Port | Switch | What it does | Saving | Default | |---|---|---|---|---| -| 1 | `VICTORY_PORT_CONSTANTS=1` | Title's 174 MB constants heap read in place by the card; no uploads or fills | ~6 ms on an RTX 5070 Ti; on AMD it halves the frame rate outdoors (#180) | Off everywhere (8 GB NVIDIA: C++ exception #15; AMD: #180) | +| 1 | `VICTORY_PORT_CONSTANTS=1` | Title's 174 MB constants heap read in place by the card; no uploads or fills | ~6 ms on an RTX 5070 Ti; on AMD it halves the frame rate outdoors (#180) | Off, except the AMD launcher on ≤16 threads with batched clamps (8 GB NVIDIA: C++ exception #15; AMD: #180) | | 5 | `VICTORY_PORT_CBV=1` | Constant buffers read as raw bytes; ~22,000 fills/frame eliminated | ~4.7 ms | On in `Play-VIctory-AMD.cmd`; off elsewhere (8 GB NVIDIA: dropped surfaces) | | 6 | `VICTORY_PORT_GUARD=1` | Write-guard lock shared by faults and refreshes, one claim per 64 KiB block | ~2 ms | **On** | | 7 | `VICTORY_PORT_JOURNAL=1` | Journal notes split into 64 parts with their own locks; heaps synced at submit | ~1–3 ms | **On** |