perf: measured fast set for the Neptune base, -Quality switch, heap pass on dirty slots #265

Manually merged
github merged 9 commits from gh-pr/265/head into gh-pr/265/base 2026-11-26 05:41:03 +00:00
Owner

@⁠LooperSalty on GitHub · 2026-11-25 22:37 UTC · original
LooperSalty:perf/neptune-fps-set → main · +831 −84 · 21 files · 9 commits · merged 2026-11-25 22:54 UTC

What changes

  • GPU heap pass on dirty slots (VICTORY_HEAP_PASS_DIRTY=1, default in the launcher): the pass looks only at the slots marked since its last pass. Ported from reddxd-byte/ShakiraRED-dt c2271e5 (see THIRD_PARTY.md).
  • Copy coalescing (VICTORY_COPY_COALESCE=256, default): changed runs up to 256 bytes apart go up as one range.
  • Relay wide merge (VICTORY_RELAY_WIDE_MERGE): VIctory option, off by default, not measured. Only the compile fix and the coalesce test expectation of cb17b6d3 are taken with it.
  • VICTORY_HDR_STANDIN switch (default unchanged: 26, R11G11B10_FLOAT).
  • Launcher -Override @{ ... } for A/B runs (VICTORY_* names only, applied last).
  • Launcher defaults (Neptune Series X set) updated to the measured fast set: VICTORY_CARD_WINDOWS_MB 4096 to 1536 (4096 was sized for a 16 GB card and spilled VRAM into system RAM on a 12 GB card), VICTORY_CARD_BUFFERS_MB 1536, VICTORY_TEXTURE_ROOM_PERCENT 93, VICTORY_VRAM_IDLE_MS 8000,2000,1000 (was 15000,2500,1000), VICTORY_LIST_POOL_MB 512 (was 2048). Everything else is unchanged.
  • -Quality switch (new, picture first): on top of the defaults it sets VICTORY_CARD_WINDOWS_MB=0 (windows read fresh each frame instead of card copies), VICTORY_CARD_BUFFERS_MB=1024, VICTORY_LIST_POOL_MOST=256, VICTORY_LIST_POOL_MB=256, VICTORY_TEXTURE_STAGE_MB=192. It costs about half the frame rate.
  • Not taken: e3d35814 (RAM-pressure idle frames, unmeasured in a fair run) and the merge commits.
  • Docs: README fps rows in the nine languages, guides (EN and FR) describe the defaults and -Quality, THIRD_PARTY.md names the heap pass port.

Measurements

Measured on the maintainer's PC (RTX 4070 SUPER, i7-13700KF, Series X 4K, release build, after warm) by automated 13-minute Series X runs on 2026-11-25, logs main-neptune-2258 against auto-gpu-2319:

main (before) this set
Median fps in the world 10.9 13.8
Last minute 13.5 to 14.8 15.6 to 17.0
Frame time 92 ms 72.5 ms
Preparing a frame 57 ms 46.5 ms
Heap passes 14 to 38 ms 9.6 ms

Picture-first option, -Quality (run auto-ram-2326, measured by the maintainer): about 7 to 9 fps against 14 to 17, with 51 to 93 texture refusals against 296. The picture is judged better (lighting, shadows, textures), observed.

Other tries, not enabled:

  • VICTORY_CARD_WINDOWS_MB=0 alone cost about 5 fps.
  • VICTORY_INPLACE=1 placed only one 2 MB window.
  • System RAM stays at about 22 GB private (title memory and mirrors). Not solved here.

Tests

  • tests/test_lanceur_victory.py: new defaults, -Quality with and without the tuned set, -Override winning over both, rejection of non-VICTORY_* names. The defaults and -Quality tests fail on the previous launcher.
  • Full pytest suite: 1117 passed, 302 skipped. ruff check --select W605,F,E9: clean.
  • cargo build --locked --release -p victory: builds.
  • cargo test --locked -p victory-gpu --lib: 181 passed, 3 failed. The 3 failures are the known Neptune ones on main (spans_say_the_next_start_and_the_lowest_level_viewed, warp_card_patch_writes_the_masked_bytes_and_no_others, warp_card_fetch_copies_flagged_pieces_to_their_slots).
  • cargo xtask policy: 198 files ok.

The game was not run for this PR. The numbers above come from the maintainer's runs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz

**@⁠LooperSalty** on GitHub · 2026-11-25 22:37 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/265) `LooperSalty:perf/neptune-fps-set` → `main` · +831 −84 · 21 files · 9 commits · merged 2026-11-25 22:54 UTC ## What changes - **GPU heap pass on dirty slots** (`VICTORY_HEAP_PASS_DIRTY=1`, default in the launcher): the pass looks only at the slots marked since its last pass. Ported from reddxd-byte/ShakiraRED-dt c2271e5 (see THIRD_PARTY.md). - **Copy coalescing** (`VICTORY_COPY_COALESCE=256`, default): changed runs up to 256 bytes apart go up as one range. - **Relay wide merge** (`VICTORY_RELAY_WIDE_MERGE`): VIctory option, **off by default, not measured**. Only the compile fix and the coalesce test expectation of `cb17b6d3` are taken with it. - **`VICTORY_HDR_STANDIN`** switch (default unchanged: 26, R11G11B10_FLOAT). - **Launcher `-Override @{ ... }`** for A/B runs (VICTORY_* names only, applied last). - **Launcher defaults** (Neptune Series X set) updated to the measured fast set: `VICTORY_CARD_WINDOWS_MB` 4096 to 1536 (4096 was sized for a 16 GB card and spilled VRAM into system RAM on a 12 GB card), `VICTORY_CARD_BUFFERS_MB` 1536, `VICTORY_TEXTURE_ROOM_PERCENT` 93, `VICTORY_VRAM_IDLE_MS` 8000,2000,1000 (was 15000,2500,1000), `VICTORY_LIST_POOL_MB` 512 (was 2048). Everything else is unchanged. - **`-Quality` switch** (new, picture first): on top of the defaults it sets `VICTORY_CARD_WINDOWS_MB=0` (windows read fresh each frame instead of card copies), `VICTORY_CARD_BUFFERS_MB=1024`, `VICTORY_LIST_POOL_MOST=256`, `VICTORY_LIST_POOL_MB=256`, `VICTORY_TEXTURE_STAGE_MB=192`. It costs about half the frame rate. - Not taken: e3d35814 (RAM-pressure idle frames, unmeasured in a fair run) and the merge commits. - Docs: README fps rows in the nine languages, guides (EN and FR) describe the defaults and `-Quality`, THIRD_PARTY.md names the heap pass port. ## Measurements Measured on the maintainer's PC (RTX 4070 SUPER, i7-13700KF, Series X 4K, release build, after `warm`) by automated 13-minute Series X runs on 2026-11-25, logs `main-neptune-2258` against `auto-gpu-2319`: | | `main` (before) | this set | | --- | --- | --- | | Median fps in the world | 10.9 | 13.8 | | Last minute | 13.5 to 14.8 | 15.6 to 17.0 | | Frame time | 92 ms | 72.5 ms | | Preparing a frame | 57 ms | 46.5 ms | | Heap passes | 14 to 38 ms | 9.6 ms | Picture-first option, `-Quality` (run `auto-ram-2326`, measured by the maintainer): about 7 to 9 fps against 14 to 17, with 51 to 93 texture refusals against 296. The picture is judged better (lighting, shadows, textures), observed. Other tries, not enabled: - `VICTORY_CARD_WINDOWS_MB=0` alone cost about 5 fps. - `VICTORY_INPLACE=1` placed only one 2 MB window. - System RAM stays at about 22 GB private (title memory and mirrors). Not solved here. ## Tests - `tests/test_lanceur_victory.py`: new defaults, `-Quality` with and without the tuned set, `-Override` winning over both, rejection of non-`VICTORY_*` names. The defaults and `-Quality` tests fail on the previous launcher. - Full pytest suite: 1117 passed, 302 skipped. `ruff check --select W605,F,E9`: clean. - `cargo build --locked --release -p victory`: builds. - `cargo test --locked -p victory-gpu --lib`: 181 passed, 3 failed. The 3 failures are the known Neptune ones on main (`spans_say_the_next_start_and_the_lowest_level_viewed`, `warp_card_patch_writes_the_masked_bytes_and_no_others`, `warp_card_fetch_copies_flagged_pieces_to_their_slots`). - `cargo xtask policy`: 198 files ok. The game was not run for this PR. The numbers above come from the maintainer's runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
The relay path (RELAY=2 with RELAY_OWN_QUEUE=1) merged 1,100-1,300 fetched
pieces one after the other on the copy-back thread; VICTORY_WIDE_MERGE only
reached the non-relay path. Off by default. Not built yet (game running).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
The pass over the heap's buffer views re-looked at every view (81,000
in the world) every 16 passes. With VICTORY_HEAP_PASS_DIRTY=1 a slot is
looked at again only when its buffer view was written or went, when the
title released the resource its record named (descriptor::forget), when
its 12-byte record in title memory changed, or when it found no host
copy (every 16 passes). Every 256 passes all slots are looked at again as
a safety net. The spans of host copies are worked out again only for
copies whose slots went. Off by default; the old pass stays the default.

Source: ShakiraRED V1 c2271e5 (reddxd-byte/ShakiraRED-dt, a squash over Trexies/victory-fork VIwork)
Co-authored-by: ShakiraRED contributors <[email protected]>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
Off by default. Runs of one refresh at most <bytes> apart go up as one range;
the bytes between them equal the card's. Not built yet (game running).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
The title's R9G9B9E5 targets stand in as R11G11B10_FLOAT (26) since the
Neptune base: 6 mantissa bits for red and green, 5 for blue, against 9
in R9G9B9E5. The previous base used R16G16B16A16_FLOAT (10), 11 bits per
channel at 8 bytes a texel. VICTORY_HDR_STANDIN=10 selects the 16-bit
float stand-in again; unset or any other value keeps 26, so the default
behaviour does not change.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
-Override takes a hashtable of VICTORY_* variables that is applied after
the tuned set (and after -NoTunedSettings), so one switch can be compared
without editing the launcher:
  -Override @{ VICTORY_RELAY = '0'; VICTORY_PIPELINE_WAIT_MS = '12000' }

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
The launcher's Neptune table now holds the set measured on 2026-11-25 in
automated 13-minute Series X runs: VICTORY_HEAP_PASS_DIRTY=1,
VICTORY_COPY_COALESCE=256, VICTORY_CARD_WINDOWS_MB=1536 (was 4096: sized
for a 16 GB card, it spilled VRAM into system RAM on a 12 GB card),
VICTORY_CARD_BUFFERS_MB=1536, VICTORY_TEXTURE_ROOM_PERCENT=93,
VICTORY_VRAM_IDLE_MS=8000,2000,1000 and VICTORY_LIST_POOL_MB=512.

-Quality applies the picture-first set on top: windows read fresh each
frame instead of card copies (VICTORY_CARD_WINDOWS_MB=0), more VRAM
headroom for textures. It costs about half the frame rate.

VICTORY_RELAY_WIDE_MERGE stays off by default (VIctory option, not
measured). Tests check the new defaults, -Quality with and without the
tuned set, and that -Override wins over both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
The README rows that stated ~12 fps for the Neptune base now state the
set measured on 2026-11-25 (median 13.8 fps, 10.9 fps before it on main),
in all nine languages. The run guides (English and French) describe the
new defaults and -Quality with its measured cost. THIRD_PARTY.md: the
ShakiraRED-dt row names the heap pass port.

Source: reddxd-byte/ShakiraRED-dt c2271e5 (heap pass, see commit 2c6dc966)
Co-authored-by: ShakiraRED contributors <[email protected]>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
Keep both launcher notes: the measured 2026-11-25 set and the ocean
height-map copy-back of #263.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:41:01 +00:00
github manually merged commit bbe2b0657d into gh-pr/265/base 2026-11-26 05:41:03 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 22:37 UTC · original · edited 2026-11-25 22:46 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T22:46:19.989161Z b78eeeb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 22:37 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/265#issuecomment-7176601563) · edited 2026-11-25 22:46 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"b78eeeb414c821ed13b2847d810b03721e749966","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-25T22:46:19.989161Z">2026-11-25T22:46:19.989161Z</relative-time> | `b78eeeb` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠Luigilt20 on GitHub · 2026-11-26 04:39 UTC · original

Linux data point for the merged fast preset at c4c93bd. On an RX 9070 (16 GB, RADV 26.3.1), Ryzen 5 5500X3D and 32 GB RAM, Series X reached the prison cell using Proton Experimental (2026-11-12), vkd3d-proton 3.2 and a wineserver built with the mapped-view tree change from CachyOS/wine-cachyos#50. We used the fast settings from this revision's launcher and kept VICTORY_LATE_WAIT=0.

During movement from the cell window to the bunks and inspection of a photo, the frame counter advanced by 187 over 78.78 seconds, averaging 2.37 FPS. The median of the CSV's interval-average draw counts was 5,677 draws/frame. Movement, camera rotation and the inspect action worked. Parts of the character's face were missing. An earlier run at 6297f17 averaged 2.50 FPS on a different route in the same room, so the two runs cannot establish a speedup or regression.

AI-assisted local build, input and frame-count measurements using Codex.

**@⁠Luigilt20** on GitHub · 2026-11-26 04:39 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/265#issuecomment-7182782825) Linux data point for the merged fast preset at `c4c93bd`. On an RX 9070 (16 GB, RADV 26.3.1), Ryzen 5 5500X3D and 32 GB RAM, Series X reached the prison cell using Proton Experimental (2026-11-12), vkd3d-proton 3.2 and a wineserver built with the mapped-view tree change from CachyOS/wine-cachyos#50. We used the fast settings from this revision's launcher and kept `VICTORY_LATE_WAIT=0`. During movement from the cell window to the bunks and inspection of a photo, the frame counter advanced by 187 over 78.78 seconds, averaging **2.37 FPS**. The median of the CSV's interval-average draw counts was 5,677 draws/frame. Movement, camera rotation and the inspect action worked. Parts of the character's face were missing. An earlier run at `6297f17` averaged 2.50 FPS on a different route in the same room, so the two runs cannot establish a speedup or regression. AI-assisted local build, input and frame-count measurements using Codex.
@ -46,3 +46,3 @@
| [myokex/victory-amd](https://github.com/myokex/victory-amd) (myokex) | GPL-3.0 | La base, avec fxceless/victory-fork | |
| [soldsawn/victory-nvidia-8gb](https://github.com/soldsawn/victory-nvidia-8gb) (soldsawn) | GPL-3.0 | Le traducteur de shaders (programmes wave64 appariés sur les cartes NVIDIA à 32 lanes) | |
| Belobug, [reddxd-byte/ShakiraRED-dt](https://github.com/reddxd-byte/ShakiraRED-dt) | GPL-3.0 | La passe de lumière ambiante | |
| Belobug, [reddxd-byte/ShakiraRED-dt](https://github.com/reddxd-byte/ShakiraRED-dt) | GPL-3.0 ou ultérieure | La passe de lumière ambiante | La passe du tas sur les emplacements marqués (`VICTORY_HEAP_PASS_DIRTY`, commit `2c6dc966`, portée de `c2271e5`, squash de VIwork de Trexies/victory-fork) |
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 22:46 UTC · original

P1 Badge Add the required upstream provenance trailers

This row identifies the heap-pass implementation as a port from reddxd-byte/ShakiraRED-dt, but the reviewed commit contains neither a Source: trailer nor a Co-authored-by: trailer for the upstream author. AGENTS.md rule 10 explicitly requires both for imported changes, including ports by hand; updating the sources table alone does not satisfy that attribution requirement. Preserve the upstream repository/commit and author in the import's commit trailers.

AGENTS.md reference: AGENTS.md:L59-L59

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 22:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/265#discussion_r4701758843) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Add the required upstream provenance trailers** This row identifies the heap-pass implementation as a port from `reddxd-byte/ShakiraRED-dt`, but the reviewed commit contains neither a `Source:` trailer nor a `Co-authored-by:` trailer for the upstream author. `AGENTS.md` rule 10 explicitly requires both for imported changes, including ports by hand; updating the sources table alone does not satisfy that attribution requirement. Preserve the upstream repository/commit and author in the import's commit trailers. AGENTS.md reference: [AGENTS.md:L59-L59](https://github.com/LooperSalty/AnyXboxX/blob/b78eeeb414c821ed13b2847d810b03721e749966/AGENTS.md#L59-L59) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
@ -175,0 +196,4 @@
$env:VICTORY_CARD_WINDOWS_MB = '0'
$env:VICTORY_CARD_BUFFERS_MB = '1024'
$env:VICTORY_LIST_POOL_MOST = '256'
$env:VICTORY_LIST_POOL_MB = '256'
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 22:46 UTC · original

P2 Badge Apply overrides after the remaining environment-setting switches

When -Override is combined with another switch that sets the same variable, the override is silently overwritten despite being documented as applied last. For example, -BatchCardRehash -Override @{ VICTORY_CARD_REHASH_RUNS = '0' } still launches with VICTORY_CARD_REHASH_RUNS=1 because the $BatchCardRehash block runs afterward; $AutoA, $FrametimeDump, $Dred, $SkipPipelines, and $XgDll have the same ordering issue. This can invalidate A/B runs by launching with settings different from the requested overrides. Move this loop after the other environment-setting blocks and before warming or launching.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 22:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/265#discussion_r4701758850) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Apply overrides after the remaining environment-setting switches** When `-Override` is combined with another switch that sets the same variable, the override is silently overwritten despite being documented as applied last. For example, `-BatchCardRehash -Override @{ VICTORY_CARD_REHASH_RUNS = '0' }` still launches with `VICTORY_CARD_REHASH_RUNS=1` because the `$BatchCardRehash` block runs afterward; `$AutoA`, `$FrametimeDump`, `$Dred`, `$SkipPipelines`, and `$XgDll` have the same ordering issue. This can invalidate A/B runs by launching with settings different from the requested overrides. Move this loop after the other environment-setting blocks and before warming or launching. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-25 22:46 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b78eeeb414

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-25 22:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/265#pullrequestreview-6066025579) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `b78eeeb414` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
This discussion has been locked. Commenting is limited to contributors.
No description provided.