perf: integration batch, cheaper title-memory copies (12 PRs, +13 % median fps measured) #358

Merged
LooperSalty merged 35 commits from upstream-pr/358 into main 2026-11-26 14:21:28 +00:00
LooperSalty commented 2026-11-26 12:41:11 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-26T12:41:11Z.


Integration batch, like #277: twelve open pull requests that cut the per-frame cost of the copies between title memory and the card. Their commits keep their authors. Several are drafts or are waiting for CI approval as first-time contributors, so they are brought in together here and tested as one.

Pull requests in this batch

PR Author What Switch
#340 Skyfrye transient windows leave out pages that hold what they last sent VICTORY_WINDOW_SKIP_SAME (sample mode by default, =1 saves)
#337 Skyfrye consecutive title submissions as one host submission VICTORY_MERGE_SUBMISSIONS (off by default)
#291 Skyfrye a list of the card copies marked changed instead of a sweep always on
#255 Skyfrye the compare result area becomes a ring VICTORY_RESULT_RING (on, =0 off)
#268 Skyfrye host copies under finished reads VICTORY_PAGE_WRITES=5 (off by default)
#323 mauroalvare reuse free space in window upload slabs always on
#325 mauroalvare reuse zeroed upload buffers for mip initialization always on
#332 mauroalvare stage only the requested rows for boxed texture uploads always on
#329 mauroalvare scratch chunks replace older idle buffers VICTORY_SCRATCH_POOL (on, =0 off)
#312 mauroalvare direct readback into title memory for tight linear textures always on
#304 mauroalvare one texture upload shared by duplicated heap views always on
#289 mauroalvare LRU eviction of staging buffers across size classes always on

Two conflicts were mechanical, with additions on both sides: #337 against #255 in host.rs, and #291 against #340 in shadow.rs. Left out: #292, #311 and #254 (correctness fixes, not copies), #276 (Wine only), #278 and #279 (lock and clock micro-optimisations).

Measured (maintainer's machine, 2026-11-26)

i7-13700KF, RTX 4070 SUPER, Windows 11, Series X, same save, launcher settings of main. Medians come from the VIctory log's frame-rate line; card occupancy from its "the card about N% busy" line.

Run Duration Median fps Last 2 min Card busy
main (8ed1109f) 5 min 13.4 13.2 70–77 %
this batch, defaults 6 min 13.7 14.6 72–89 %
this batch + VICTORY_WINDOW_SKIP_SAME=1 VICTORY_MERGE_SUBMISSIONS=1 VICTORY_PAGE_WRITES=5 11 min 15.2 14.6 78–85 %

No crash and no device loss in any run, and dropped draws per frame are about the same (440 / 478 / 445). Each configuration ran once. The three switches stay off by default in this PR: a follow-up turns them on in the launcher's tuned set once a second run confirms the gain.

Test plan

  • cargo test --release -p victory-gpu: 216 passed. The 3 that fail fail the same way on clean main (WARP tests descriptor::host::tests::spans_say_the_next_start_and_the_lowest_level_viewed, indirect::tests::warp_card_patch_writes_the_masked_bytes_and_no_others, indirect::tests::warp_card_fetch_copies_flagged_pieces_to_their_slots)
  • cargo xtask policy: 209 files ok
  • In-game runs above
  • CI green

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:6626860744 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/358). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-26T12:41:11Z. --- Integration batch, like #277: twelve open pull requests that cut the per-frame cost of the copies between title memory and the card. Their commits keep their authors. Several are drafts or are waiting for CI approval as first-time contributors, so they are brought in together here and tested as one. ## Pull requests in this batch | PR | Author | What | Switch | | --- | --- | --- | --- | | #340 | Skyfrye | transient windows leave out pages that hold what they last sent | `VICTORY_WINDOW_SKIP_SAME` (sample mode by default, `=1` saves) | | #337 | Skyfrye | consecutive title submissions as one host submission | `VICTORY_MERGE_SUBMISSIONS` (off by default) | | #291 | Skyfrye | a list of the card copies marked changed instead of a sweep | always on | | #255 | Skyfrye | the compare result area becomes a ring | `VICTORY_RESULT_RING` (on, `=0` off) | | #268 | Skyfrye | host copies under finished reads | `VICTORY_PAGE_WRITES=5` (off by default) | | #323 | mauroalvare | reuse free space in window upload slabs | always on | | #325 | mauroalvare | reuse zeroed upload buffers for mip initialization | always on | | #332 | mauroalvare | stage only the requested rows for boxed texture uploads | always on | | #329 | mauroalvare | scratch chunks replace older idle buffers | `VICTORY_SCRATCH_POOL` (on, `=0` off) | | #312 | mauroalvare | direct readback into title memory for tight linear textures | always on | | #304 | mauroalvare | one texture upload shared by duplicated heap views | always on | | #289 | mauroalvare | LRU eviction of staging buffers across size classes | always on | Two conflicts were mechanical, with additions on both sides: #337 against #255 in `host.rs`, and #291 against #340 in `shadow.rs`. Left out: #292, #311 and #254 (correctness fixes, not copies), #276 (Wine only), #278 and #279 (lock and clock micro-optimisations). ## Measured (maintainer's machine, 2026-11-26) i7-13700KF, RTX 4070 SUPER, Windows 11, Series X, same save, launcher settings of `main`. Medians come from the VIctory log's frame-rate line; card occupancy from its "the card about N% busy" line. | Run | Duration | Median fps | Last 2 min | Card busy | | --- | --- | --- | --- | --- | | `main` (8ed1109f) | 5 min | 13.4 | 13.2 | 70–77 % | | this batch, defaults | 6 min | 13.7 | 14.6 | 72–89 % | | this batch + `VICTORY_WINDOW_SKIP_SAME=1 VICTORY_MERGE_SUBMISSIONS=1 VICTORY_PAGE_WRITES=5` | 11 min | **15.2** | 14.6 | 78–85 % | No crash and no device loss in any run, and dropped draws per frame are about the same (440 / 478 / 445). Each configuration ran once. The three switches stay off by default in this PR: a follow-up turns them on in the launcher's tuned set once a second run confirms the gain. ## Test plan - [x] `cargo test --release -p victory-gpu`: 216 passed. The 3 that fail fail the same way on clean `main` (WARP tests `descriptor::host::tests::spans_say_the_next_start_and_the_lowest_level_viewed`, `indirect::tests::warp_card_patch_writes_the_masked_bytes_and_no_others`, `indirect::tests::warp_card_fetch_copies_flagged_pieces_to_their_slots`) - [x] `cargo xtask policy`: 209 files ok - [x] In-game runs above - [ ] CI green 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
chatgpt-codex-connector[bot] commented 2026-11-26 12:41:21 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T12:41:21Z.


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-26T12:41:17.733806Z
We couldn’t complete this review. Comment @codex review to try again.
5c4b75f 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:7192329329 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/358#issuecomment-7192329329). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-26T12:41:21Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"5c4b75fb080a188411565ca068d12a4f6e23be07","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-26T12:41:17.733806Z">2026-11-26T12:41:17.733806Z</relative-time><br/>We couldn’t complete this review. Comment `@codex review` to try again. | `5c4b75f` | 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-26 12:41:23 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T12:41:23Z.


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.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7192330145 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/358#issuecomment-7192330145). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-26T12:41:23Z. --- 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).
LooperSalty commented 2026-11-26 13:51:58 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-26T13:51:58Z.


Update: 38cb70af now turns the three switches on by default (VICTORY_WINDOW_SKIP_SAME=1, VICTORY_MERGE_SUBMISSIONS=1, VICTORY_PAGE_WRITES=5) in anyxboxx run's tuned set and in the Windows + NVIDIA launcher profile (42 variables). The golden script, the tests and the guides (EN and FR) are updated. Four more runs of this base on 2026-11-26 measured 14.5 to 15.1 fps median (main: 13.4). The CLAMP_AFTER_WRITER and Wave32 ports follow in #377, stacked on this PR.

🤖 Generated with Claude Code

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7193944991 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/358#issuecomment-7193944991). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-26T13:51:58Z. --- Update: `38cb70af` now turns the three switches on by default (`VICTORY_WINDOW_SKIP_SAME=1`, `VICTORY_MERGE_SUBMISSIONS=1`, `VICTORY_PAGE_WRITES=5`) in `anyxboxx run`'s tuned set and in the Windows + NVIDIA launcher profile (42 variables). The golden script, the tests and the guides (EN and FR) are updated. Four more runs of this base on 2026-11-26 measured 14.5 to 15.1 fps median (`main`: 13.4). The CLAMP_AFTER_WRITER and Wave32 ports follow in #377, stacked on this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Skyfrye commented 2026-11-26 14:28:01 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by Skyfrye on 2026-11-26T14:28:01Z.


A picture problem with VICTORY_WINDOW_SKIP_SAME=1, which main's launcher now sets (profiles.toml, run/settings.rs).

What I saw: same build (main c4c93bd + #308 + #340), same scene (the first cutscene, at the same point), Series X, VICTORY_INDIRECT_RAW=3, RTX 5080, screen captures every 15 s.

  • With VICTORY_WINDOW_SKIP_SAME=1, a rectangle of multicoloured noise covered a character's face.
  • Without it, the same face was drawn correctly.

It was one run each, so I can't rule out chance. The multicoloured confetti on skin that #333 seemed to bring varies between builds in the same way, and is being traced to ray-tracing programs reading leftover memory while the structure builder is off. Leaving pages out of windows could just change which leftover values they read. Either way, I put #340 back to draft for this (comment there) before it was merged here.

My Series S frame rates in #340 were also not valid: with --console series-s the 3D scene is black without AMD's FidelityFX DLL (VICTORY_FSR_DLL), see #338.

Suggestion: keep VICTORY_WINDOW_SKIP_SAME off in the launcher's set until a run with screen captures of faces (the cell and the diner in the first cutscene) shows them clean with it on. I'll post here when I have such a run.

🤖 Generated with Claude Code

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7194861227 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/358#issuecomment-7194861227). Originally posted by [Skyfrye](https://github.com/Skyfrye) on 2026-11-26T14:28:01Z. --- A picture problem with `VICTORY_WINDOW_SKIP_SAME=1`, which main's launcher now sets (`profiles.toml`, `run/settings.rs`). What I saw: same build (main c4c93bd + #308 + #340), same scene (the first cutscene, at the same point), Series X, `VICTORY_INDIRECT_RAW=3`, RTX 5080, screen captures every 15 s. - With `VICTORY_WINDOW_SKIP_SAME=1`, a rectangle of multicoloured noise covered a character's face. - Without it, the same face was drawn correctly. It was one run each, so I can't rule out chance. The multicoloured confetti on skin that #333 seemed to bring varies between builds in the same way, and is being traced to ray-tracing programs reading leftover memory while the structure builder is off. Leaving pages out of windows could just change which leftover values they read. Either way, I put #340 back to draft for this (comment there) before it was merged here. My Series S frame rates in #340 were also not valid: with `--console series-s` the 3D scene is black without AMD's FidelityFX DLL (`VICTORY_FSR_DLL`), see #338. Suggestion: keep `VICTORY_WINDOW_SKIP_SAME` off in the launcher's set until a run with screen captures of faces (the cell and the diner in the first cutscene) shows them clean with it on. I'll post here when I have such a run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!358
No description provided.