feat: VIctory base moved to Neptune (VIctory Edit.) 2026-11-25c #243

Merged
LooperSalty merged 9 commits from upstream-pr/243 into main 2026-11-25 21:00:27 +00:00
LooperSalty commented 2026-11-25 20:55:35 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-25T20:55:35Z.


What changes

third_party/victory moves to Neptune (VIctory Edit.) 2026-11-25c as its new base: the corresponding source shipped in Neptune's package (neptune-ve-source.zip, GPL-3.0-or-later), committed unchanged as one commit, with our changes on top as separate commits. Everything is in-tree: no submodule, no git or out-of-tree path dependency in Cargo.toml / Cargo.lock (crates.io only; a new test checks this), nothing downloaded at build time. crates/victory-formats/src/bcpack-tables.bin is byte-identical to the copy already in the exceptions register. cargo xtask policy: 197 files ok.

Commits:

  1. feat: VIctory base moved to Neptune (VIctory Edit.) 2026-11-25c: the source as shipped, with Source: and Co-authored-by: lines for the credited authors whose GitHub identity is public (the Neptune author has no public contact and is named in the body).
  2. fix(victory): Discord Rich Presence off unless VICTORY_DISCORD=1: Neptune turns it on unless VICTORY_DISCORD=0. Our copy needs VICTORY_DISCORD=1 and has a unit test for it. The launcher also sets VICTORY_DISCORD=0. F12 screenshots to Pictures are kept.
  3. to 6. Our four xg: commits, re-applied with Source: LooperSalty/victory <sha> (19feca8, 1f0fe1d, 36955ee, fb021f7): Microsoft's xg_xs.dll (the user's own copy) as oracle or server (VICTORY_XG_DLL / VICTORY_XG_MODE, used by -XgDll), plus the HLE answers measured against it. Neptune's xg.rs was upstream fxceless 4e17478 unchanged, so nothing of Neptune's own work is replaced.
  4. feat: launcher uses Neptune's Series X switch set, -Warm on the game's .rpf files (details below).
  5. docs: README in all 9 languages (a bullet and the VIctory row: "~12 fps in the world (Series X, RTX 4070 SUPER), measured 2026-11-25"), a "Neptune base" section in docs/running-gta6.md and docs/fr/lancer-gta6.md, THIRD_PARTY.md sources table for Neptune and each repository it credits, AGENTS.md layout row.
  6. test(victory): victory-gpu's unit tests compile again on the Neptune tree (test code only).

Why

Measured by the maintainer on 2026-11-25 (RTX 4070 SUPER, i7-13700KF, Series X path at 4K, world, release build, after victory warm on the game's .rpf files, Neptune's switch set with Discord off):

  • median about 12.5 fps
  • about 15 fps over the last minute, peaks at 30
  • about 7,500 draws a frame
  • no crash

Our main runs at about 5 fps in the same place. The maintainer's verdict: more than 10 fps in game.

Launcher (tools/lancer_victory.ps1)

  • By default it uses Neptune's play.ps1 switch set for the Series X path: no PC FidelityFX DLL, no VICTORY_AUTO_A, VICTORY_DISCORD=0.
    • VICTORY_WAVE_OWN_LDS_GROUPS is left out because no code in the Neptune tree reads it (its soldsawn translator dropped that rule).
    • The old tuned values that Neptune replaces are dropped: SHADER_LOOP_LIMIT, LATE_WAIT, WIDE_BACK, CARD_BUFFERS_MIN_MB/_MB, DSTORAGE_NOTIFY, STAGING_POOL_MB. The last two are not read by the Neptune tree at all.
  • It builds and runs the release profile, as measured. -Diag (or -Dred, which needs it) uses the diag profile with the diagnostics feature.
  • New -Warm runs victory.exe warm <game folder>\*.rpf before the game. It passes only the game folder's own .rpf files, never the folder: warm walks directories, and a game folder can hold unrelated trees.
  • -Precompile now runs victory.exe warm on shaders.rpf, the game and its two DLLs. The Neptune tree has no translate --cache --used-pipelines.
  • New -AutoA (VICTORY_AUTO_A=150) and -FrametimeDump.
  • -XgDll, -XgMode, -Dred, -NoTunedSettings, -SkipPipelines and -BatchCardRehash still work.
  • The tests cover:
    • the switch table equals Neptune's set
    • Discord is off
    • -Warm passes only the top-level .rpf files, and a failed warm stops before the game
    • -Precompile's file list
    • release and diag builds
    • no out-of-tree dependency

Test command for the maintainer: .\tools\lancer_victory.ps1 -GameDir C:\Users\ANAKIN\Downloads\GTA6.Xbox.v1.0.2.1-CYBERLEEK -Warm (first time; then without -Warm).

Not carried over (follow-ups)

These are items our previous tree had that Neptune lacks. None is needed by the launcher, the tests or CI:

  • Graphics pipeline pre-build translate --cache --pipelines --used-pipelines (prebuild.rs, victory-game pipelines.rs / shaderpack.rs / cityhash.rs). It needs victory_gpu::pipeline::Prebuild, which is absent from Neptune.

  • The 57 Proton/Wine and AMD commits of the previous base, including the vkd3d-shader-compatible indirect HLSL. Linux/Proton runs should be re-checked on this base.

  • VICTORY_DSTORAGE_NOTIFY (Yorivel e49864a, bf870de) and VICTORY_STAGING_POOL_MB.

  • The L6 to L9 switches (l6.rs … l9guard.rs: heap clamp, NaN guard, view slots, write-watch guards, roles/unlit diagnostics).

  • Our fps overlay from #225. Neptune's own overlay (F10: fps, 30 s high/low/average, draws, memory) replaces it.

  • Three of Neptune's own victory-gpu unit tests still fail on this machine:

    • 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 (WARP)

    CI does not run VIctory's cargo tests.

Risks (Neptune's notes)

  • Objects and clothes can turn black for a moment while their textures are swapped.
  • Parts of the world are missing behind some doors and on some roofs.
  • No facial animation.
  • Frame time jumps while the game streams.
  • Indoor light is a constant ambient stand-in for the ray-traced lighting (VICTORY_AMBIENT).
  • The switch set is tuned for a 16 GB card. On smaller cards, lower VICTORY_CARD_WINDOWS_MB and VICTORY_CARD_BUFFERS_MB.
  • VICTORY_RELAY=2 is back in the set. The previous launcher left it out because of fork issue #89 (skin, subtitles).

Verification

  • cargo build --locked --profile diag -p victory --features diagnostics and cargo build --locked --release -p victory: OK.
  • cargo test --workspace (VIctory): every crate passes except the three Neptune victory-gpu tests named above.
  • cargo xtask policy: OK.
  • Full pytest: 1033 passed, 300 skipped (runtime not built in this worktree).
  • ruff check --select W605,F,E9 PrototypeScarlett tests tools: OK.
  • The game was not run for this PR. The figures above come from the maintainer's run.

PR #234 (feat/fps-rorodev) is superseded by this one and can stay closed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:6613578295 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/243). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-25T20:55:35Z. --- ## What changes `third_party/victory` moves to **Neptune (VIctory Edit.) 2026-11-25c** as its new base: the corresponding source shipped in Neptune's package (`neptune-ve-source.zip`, GPL-3.0-or-later), committed unchanged as one commit, with our changes on top as separate commits. Everything is in-tree: no submodule, no git or out-of-tree path dependency in `Cargo.toml` / `Cargo.lock` (crates.io only; a new test checks this), nothing downloaded at build time. `crates/victory-formats/src/bcpack-tables.bin` is byte-identical to the copy already in the exceptions register. `cargo xtask policy`: 197 files ok. Commits: 1. `feat: VIctory base moved to Neptune (VIctory Edit.) 2026-11-25c`: the source as shipped, with `Source:` and `Co-authored-by:` lines for the credited authors whose GitHub identity is public (the Neptune author has no public contact and is named in the body). 2. `fix(victory): Discord Rich Presence off unless VICTORY_DISCORD=1`: Neptune turns it on unless `VICTORY_DISCORD=0`. Our copy needs `VICTORY_DISCORD=1` and has a unit test for it. The launcher also sets `VICTORY_DISCORD=0`. F12 screenshots to Pictures are kept. 3. to 6. Our four `xg:` commits, re-applied with `Source: LooperSalty/victory <sha>` (`19feca8`, `1f0fe1d`, `36955ee`, `fb021f7`): Microsoft's `xg_xs.dll` (the user's own copy) as oracle or server (`VICTORY_XG_DLL` / `VICTORY_XG_MODE`, used by `-XgDll`), plus the HLE answers measured against it. Neptune's `xg.rs` was upstream `fxceless` `4e17478` unchanged, so nothing of Neptune's own work is replaced. 7. `feat: launcher uses Neptune's Series X switch set, -Warm on the game's .rpf files` (details below). 8. `docs:` README in all 9 languages (a bullet and the VIctory row: "~12 fps in the world (Series X, RTX 4070 SUPER), measured 2026-11-25"), a "Neptune base" section in `docs/running-gta6.md` and `docs/fr/lancer-gta6.md`, `THIRD_PARTY.md` sources table for Neptune and each repository it credits, `AGENTS.md` layout row. 9. `test(victory):` victory-gpu's unit tests compile again on the Neptune tree (test code only). ## Why Measured by the maintainer on 2026-11-25 (RTX 4070 SUPER, i7-13700KF, Series X path at 4K, world, release build, after `victory warm` on the game's `.rpf` files, Neptune's switch set with Discord off): - median about 12.5 fps - about 15 fps over the last minute, peaks at 30 - about 7,500 draws a frame - no crash Our `main` runs at about 5 fps in the same place. The maintainer's verdict: more than 10 fps in game. ## Launcher (`tools/lancer_victory.ps1`) - By default it uses Neptune's `play.ps1` switch set for the Series X path: no PC FidelityFX DLL, no `VICTORY_AUTO_A`, `VICTORY_DISCORD=0`. - `VICTORY_WAVE_OWN_LDS_GROUPS` is left out because no code in the Neptune tree reads it (its soldsawn translator dropped that rule). - The old tuned values that Neptune replaces are dropped: `SHADER_LOOP_LIMIT`, `LATE_WAIT`, `WIDE_BACK`, `CARD_BUFFERS_MIN_MB/_MB`, `DSTORAGE_NOTIFY`, `STAGING_POOL_MB`. The last two are not read by the Neptune tree at all. - It builds and runs the **release** profile, as measured. `-Diag` (or `-Dred`, which needs it) uses the diag profile with the diagnostics feature. - New `-Warm` runs `victory.exe warm <game folder>\*.rpf` before the game. It passes only the game folder's own `.rpf` files, never the folder: `warm` walks directories, and a game folder can hold unrelated trees. - `-Precompile` now runs `victory.exe warm` on `shaders.rpf`, the game and its two DLLs. The Neptune tree has no `translate --cache --used-pipelines`. - New `-AutoA` (`VICTORY_AUTO_A=150`) and `-FrametimeDump`. - `-XgDll`, `-XgMode`, `-Dred`, `-NoTunedSettings`, `-SkipPipelines` and `-BatchCardRehash` still work. - The tests cover: - the switch table equals Neptune's set - Discord is off - `-Warm` passes only the top-level `.rpf` files, and a failed warm stops before the game - `-Precompile`'s file list - release and diag builds - no out-of-tree dependency Test command for the maintainer: `.\tools\lancer_victory.ps1 -GameDir C:\Users\ANAKIN\Downloads\GTA6.Xbox.v1.0.2.1-CYBERLEEK -Warm` (first time; then without `-Warm`). ## Not carried over (follow-ups) These are items our previous tree had that Neptune lacks. None is needed by the launcher, the tests or CI: - Graphics pipeline pre-build `translate --cache --pipelines --used-pipelines` (`prebuild.rs`, `victory-game` `pipelines.rs` / `shaderpack.rs` / `cityhash.rs`). It needs `victory_gpu::pipeline::Prebuild`, which is absent from Neptune. - The 57 Proton/Wine and AMD commits of the previous base, including the vkd3d-shader-compatible indirect HLSL. Linux/Proton runs should be re-checked on this base. - `VICTORY_DSTORAGE_NOTIFY` (Yorivel `e49864a`, `bf870de`) and `VICTORY_STAGING_POOL_MB`. - The L6 to L9 switches (`l6.rs` … `l9guard.rs`: heap clamp, NaN guard, view slots, write-watch guards, roles/unlit diagnostics). - Our fps overlay from #225. Neptune's own overlay (F10: fps, 30 s high/low/average, draws, memory) replaces it. - Three of Neptune's own victory-gpu unit tests still fail on this machine: - `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` (WARP) CI does not run VIctory's cargo tests. ## Risks (Neptune's notes) - Objects and clothes can turn black for a moment while their textures are swapped. - Parts of the world are missing behind some doors and on some roofs. - No facial animation. - Frame time jumps while the game streams. - Indoor light is a constant ambient stand-in for the ray-traced lighting (`VICTORY_AMBIENT`). - The switch set is tuned for a 16 GB card. On smaller cards, lower `VICTORY_CARD_WINDOWS_MB` and `VICTORY_CARD_BUFFERS_MB`. - `VICTORY_RELAY=2` is back in the set. The previous launcher left it out because of fork issue #89 (skin, subtitles). ## Verification - `cargo build --locked --profile diag -p victory --features diagnostics` and `cargo build --locked --release -p victory`: OK. - `cargo test --workspace` (VIctory): every crate passes except the three Neptune victory-gpu tests named above. - `cargo xtask policy`: OK. - Full pytest: 1033 passed, 300 skipped (runtime not built in this worktree). - `ruff check --select W605,F,E9 PrototypeScarlett tests tools`: OK. - The game was not run for this PR. The figures above come from the maintainer's run. PR #234 (`feat/fps-rorodev`) is superseded by this one and can stay closed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
chatgpt-codex-connector[bot] commented 2026-11-25 20:55:48 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T20:55:48Z.


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-25T20:59:21.750023Z 785b50e 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.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7174380957 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/243#issuecomment-7174380957). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-25T20:55:48Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"785b50e255a76fcd470e390086679b0b0f727403","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-25T20:59:21.750023Z">2026-11-25T20:59:21.750023Z</relative-time> | `785b50e` | 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>
chatgpt-codex-connector[bot] commented 2026-11-25 20:59:19 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T20:59:19Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 785b50e255

ℹ️ 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".

<!-- greyfinch-sync:LooperSalty/AnyXboxX:review:6064903366 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/243#pullrequestreview-6064903366). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-25T20:59:19Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `785b50e255` <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>
chatgpt-codex-connector[bot] commented 2026-11-25 20:59:19 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T20:59:19Z.

Code review location: third_party/victory/crates/victory-formats/src/bcpack.rs; line 228

@@ -222,18 +222,11 @@ impl Tables {
                     bits: [r.u8(), r.u8()],
                     ..Default::default()
                 };
-                if entry == 0 {
-                    // The first entry has all 32 indices right after the width
-                    // bytes; every later entry repeats the widths first.
-                    for v in ix.ix.as_flattened_mut() {
-                        *v = r.u16() as i16;
-                    }
-                } else {
-                    r.u16();
-                    // Only 15 slots for set 1, which no entry uses (0 bits).
-                    for v in &mut ix.ix.as_flattened_mut()[..31] {
-                        *v = r.u16() as i16;
-                    }
+                // Unused: the widths again in all entries but the first.
+                r.u16();
+                // Only 15 slots for set 1, which no entry uses (0 bits).
+                for v in &mut ix.ix.as_flattened_mut()[..31] {

P2 Badge Preserve the first BC7 dictionary entry's distinct layout

For BC7 streams that reference dictionary entry 0, unconditionally skipping this word corrupts the decoded indices. Unlike subsequent entries, entry 0 has all 32 indices immediately after the width bytes, without repeated widths. The unchanged shipped table begins with indices [2, 1, 0, ...], but this parser now reads [1, 0, ...]; bc7() then uses those shifted values to reconstruct texture blocks. Restore the entry-0 special case and its removed regression test, bc7_first_dictionary_entry_keeps_all_32_indices.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:review-comment:4700801553 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/243#discussion_r4700801553). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-25T20:59:19Z. **Code review location:** `third_party/victory/crates/victory-formats/src/bcpack.rs`; line 228 ~~~~diff @@ -222,18 +222,11 @@ impl Tables { bits: [r.u8(), r.u8()], ..Default::default() }; - if entry == 0 { - // The first entry has all 32 indices right after the width - // bytes; every later entry repeats the widths first. - for v in ix.ix.as_flattened_mut() { - *v = r.u16() as i16; - } - } else { - r.u16(); - // Only 15 slots for set 1, which no entry uses (0 bits). - for v in &mut ix.ix.as_flattened_mut()[..31] { - *v = r.u16() as i16; - } + // Unused: the widths again in all entries but the first. + r.u16(); + // Only 15 slots for set 1, which no entry uses (0 bits). + for v in &mut ix.ix.as_flattened_mut()[..31] { ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Preserve the first BC7 dictionary entry's distinct layout** For BC7 streams that reference dictionary entry 0, unconditionally skipping this word corrupts the decoded indices. Unlike subsequent entries, entry 0 has all 32 indices immediately after the width bytes, without repeated widths. The unchanged shipped table begins with indices `[2, 1, 0, ...]`, but this parser now reads `[1, 0, ...]`; `bc7()` then uses those shifted values to reconstruct texture blocks. Restore the entry-0 special case and its removed regression test, `bc7_first_dictionary_entry_keeps_all_32_indices`. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LooperSalty/AnyXboxX!243
No description provided.