perf: fxceless copy index, card sync batch and parallel refresh, cool_fox fence wake (opt-in, +8 % measured) #383

Manually merged
github merged 6 commits from github-bot/gh-383 into main 2026-11-26 14:52:43 +00:00 AGit
Owner

@⁠LooperSalty on GitHub · 2026-11-26 14:34 UTC · original
LooperSalty:perf/fxceless-fences → main · +677 −49 · 7 files · 7 commits · merged 2026-11-26 14:48 UTC

Five ports from two neighbouring VIctory forks. Each is credited as rule 10 asks (Source: and Co-authored-by: in the commit message, rows in THIRD_PARTY.md), and each sits behind its own switch, off by default.

Commit From What Switch
feat: step copies found by an index fxceless/victory-gta6 84c5dc00 copy lookups by step become a map instead of linear searches (20,000 to 43,000 a frame in their logs); a unit test checks the index against the search form VICTORY_STEP_INDEX=1 (or alt)
feat: card copies recorded in three steps fxceless/victory-gta6 6aed0780 (their PR #1227) copies to the card first, then the state changes in one call, then the hash passes, instead of a switch per copy; Neptune's mask pass kept per copy VICTORY_CARD_SYNC_BATCH=1 (or alt)
feat: texture checks side by side fxceless/victory-gta6 ceb9e1f7 (host.rs part only) the texture checks of a submission run on the helper pool VICTORY_PARALLEL_REFRESH=1 (or alt)
feat: wake blocked fence waits by address codec-d/cool_fox e05d4633 WaitOnAddress/WakeByAddressAll instead of polling for fence waits; optional wake on GPU memory writes VICTORY_FENCE_WAKE=1, VICTORY_VALUE_WAKE=1
feat: stop texture uploads under low commit codec-d/cool_fox ab75ac3e an admission gate that keeps a commit reserve VICTORY_COMMIT_GATE=1

alt switches the feature on and off every 20 s within one run, for A/B measurement.

Measured (maintainer's machine, 2026-11-26: RTX 4070 SUPER, i7-13700KF, Series X, VIctory logs, one run each)

Run Median fps Last 2 min Dropped draws a frame Copies to the card
main before #358 13.4 13.2 440 ~20 ms
#358 + #377 switches + FENCE_WAKE + COMMIT_GATE + WAVE32_NVIDIA 15.0 15.5 452 ~16 ms
the same + STEP_INDEX + CARD_SYNC_BATCH + PARALLEL_REFRESH 16.2 17.1 397 12–17 ms

No crash or device loss. The three fxceless switches were measured together, so the share of each is not known yet. FENCE_WAKE and COMMIT_GATE alone measured neutral (15.1 against 14.8). VALUE_WAKE was not measured. Everything stays off by default here; a follow-up turns the set on in the launcher once a second run confirms it.

Test plan

  • cargo build --release -p victory; cargo test --release -p victory-gpu: 236 passed, and only the 3 WARP tests that already fail on main fail (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); new tests the_index_gives_what_the_search_gives, parallel_refresh_is_off_unless_set, and the fence-wake and commit-gate tests
  • cargo xtask policy: 214 files ok
  • In-game runs above
  • CI green

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox

**@⁠LooperSalty** on GitHub · 2026-11-26 14:34 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/383) `LooperSalty:perf/fxceless-fences` → `main` · +677 −49 · 7 files · 7 commits · merged 2026-11-26 14:48 UTC Five ports from two neighbouring VIctory forks. Each is credited as rule 10 asks (`Source:` and `Co-authored-by:` in the commit message, rows in `THIRD_PARTY.md`), and each sits behind its own switch, off by default. | Commit | From | What | Switch | | --- | --- | --- | --- | | `feat: step copies found by an index` | fxceless/victory-gta6 `84c5dc00` | copy lookups by step become a map instead of linear searches (20,000 to 43,000 a frame in their logs); a unit test checks the index against the search form | `VICTORY_STEP_INDEX=1` (or `alt`) | | `feat: card copies recorded in three steps` | fxceless/victory-gta6 `6aed0780` (their PR #1227) | copies to the card first, then the state changes in one call, then the hash passes, instead of a switch per copy; Neptune's mask pass kept per copy | `VICTORY_CARD_SYNC_BATCH=1` (or `alt`) | | `feat: texture checks side by side` | fxceless/victory-gta6 `ceb9e1f7` (`host.rs` part only) | the texture checks of a submission run on the helper pool | `VICTORY_PARALLEL_REFRESH=1` (or `alt`) | | `feat: wake blocked fence waits by address` | codec-d/cool_fox `e05d4633` | `WaitOnAddress`/`WakeByAddressAll` instead of polling for fence waits; optional wake on GPU memory writes | `VICTORY_FENCE_WAKE=1`, `VICTORY_VALUE_WAKE=1` | | `feat: stop texture uploads under low commit` | codec-d/cool_fox `ab75ac3e` | an admission gate that keeps a commit reserve | `VICTORY_COMMIT_GATE=1` | `alt` switches the feature on and off every 20 s within one run, for A/B measurement. ## Measured (maintainer's machine, 2026-11-26: RTX 4070 SUPER, i7-13700KF, Series X, VIctory logs, one run each) | Run | Median fps | Last 2 min | Dropped draws a frame | Copies to the card | | --- | --- | --- | --- | --- | | `main` before #358 | 13.4 | 13.2 | 440 | ~20 ms | | #358 + #377 switches + `FENCE_WAKE` + `COMMIT_GATE` + `WAVE32_NVIDIA` | 15.0 | 15.5 | 452 | ~16 ms | | the same + `STEP_INDEX` + `CARD_SYNC_BATCH` + `PARALLEL_REFRESH` | **16.2** | **17.1** | **397** | 12–17 ms | No crash or device loss. The three fxceless switches were measured together, so the share of each is not known yet. `FENCE_WAKE` and `COMMIT_GATE` alone measured neutral (15.1 against 14.8). `VALUE_WAKE` was not measured. Everything stays off by default here; a follow-up turns the set on in the launcher once a second run confirms it. ## Test plan - [x] `cargo build --release -p victory`; `cargo test --release -p victory-gpu`: 236 passed, and only the 3 WARP tests that already fail on `main` fail (`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`); new tests `the_index_gives_what_the_search_gives`, `parallel_refresh_is_off_unless_set`, and the fence-wake and commit-gate tests - [x] `cargo xtask policy`: 214 files ok - [x] In-game runs above - [ ] CI green 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
A blocking fence wait (a null event) used to fail at once. With
VICTORY_FENCE_WAKE=1 it now sleeps on the fence's value for up to 250 ms
(WaitOnAddress, slices of 10 ms, held work released between them), and a
signal wakes it (WakeByAddressAll). VICTORY_VALUE_WAKE=1 does the same for
a list's bottom-of-pipe write to memory. Both are off by default.

Source: codec-d/cool_fox e05d4633
Co-authored-by: codec_d <[email protected]>
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
(cherry picked from commit effa844d54f4bfadcbe40d6db7da18643ba0eeb4)
A texture pass stops uploading when the PC's available commit is under
4 GiB, so that the game's allocations and the submissions in flight keep
the rest. The commit is read every 32 ms. Off by default.

Source: codec-d/cool_fox ab75ac3
Co-authored-by: codec_d <[email protected]>
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
(cherry picked from commit d3b568876434f3030a359dab50ba1a39e7643932)
A submission's passes over its lists' steps find a step's copy by a map
instead of a search (VICTORY_STEP_INDEX=1, off by default; alt switches
on and off every twenty seconds for A/B runs). The stale-under-flights
spans ask each copy once, and the declared ranges per copy are grouped
by an index with each range once. Same copies, ranges and order as the
search form; unit test compares the two.

Source: fxceless/victory-gta6 84c5dc00
Co-authored-by: fxceless <[email protected]>
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
(cherry picked from commit 9ab099dc67bfbad976831e1923690d43228fd2d3)
The send-and-hash list can record its copies, one state change and its
hash passes in three steps instead of copy by copy (VICTORY_CARD_SYNC_BATCH=1,
off by default; alt switches on and off every twenty seconds). Our copy
loop keeps the Neptune mask pass per copy; only the hash passes and the
state changes move behind the copies. The ignored D3D12 test comes along
from the source and needs a card: it is not run in CI.

Source: fxceless/victory-gta6 6aed0780
Co-authored-by: fxceless <[email protected]>
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
(cherry picked from commit b9803add4ac9d08860edd9c62777abbfc6bc22c3)
A submission's texture checks are gathered between writes of ours and
flushes and run on the helper pool (VICTORY_PARALLEL_REFRESH=1, off by
default; alt switches on and off every twenty seconds). The preparing
thread's time counts the wall time as before. Only the host.rs part of
the source commit is taken: its diagnostics, the DirectStorage counters
and the VICTORY_SPREAD rename are left out.

Source: fxceless/victory-gta6 ceb9e1f7
Co-authored-by: fxceless <[email protected]>
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
(cherry picked from commit a92c1dca987209acb0a84b62b597426783e4fe26)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:40:20 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 14:35 UTC · original

Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T14:34:59.655044Z
We couldn’t complete this review. Comment @codex review to try again.
810adeb 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-26 14:35 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/383#issuecomment-7195028997) <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"810adeb17b1fcede6a3bd2db1e183cbfdbc1318e","has_any_findings":true,"has_unresolved_findings":true,"status":"failed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ❌ Failed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ❌ **Failed** <relative-time datetime="2026-11-26T14:34:59.655044Z">2026-11-26T14:34:59.655044Z</relative-time><br/>We couldn’t complete this review. Comment `@codex review` to try again. | `810adeb` | 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

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 14:35 UTC · original

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 14:35 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/383#issuecomment-7195029727) You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage). To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your [settings](https://chatgpt.com/settings/code-review).
github manually merged commit cd5c44d2aa into main 2026-11-26 14:52:43 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.