perf: the launcher turns on VICTORY_TEXTURE_PREPARE_THREADS=2 (#395) #430

Open
github-bot wants to merge 1 commit from github-bot/gh-430 into main AGit
Owner

@⁠Skyfrye on GitHub · 2026-11-26 18:33 UTC · original
Skyfrye:nep/launcher-prepare-yield → main · +13 −4 · 9 files · 1 commits · open

Turns on VICTORY_TEXTURE_PREPARE_THREADS=2 (merged in #395) in anyxboxx run's tuned set and in the Windows + NVIDIA launcher profile.

Without it, the pass over the heap's texture views makes every new texture on the thread that records the frame. That means a host texture and an upload buffer each, about 0.7 ms of driver calls per texture. While a backlog is due, the pass may spend 250 ms of a frame, or 1.5 s while catching up. That is the opening cutscene's crawl and the dips when a new area streams in. With the switch, two threads of their own make, stage and detile those textures, and the pass only records the uploads of the ones that are ready.

The tuned set grows to 47 variables.

Measured (2026-11-26, RTX 5080, Series X)

Two 9-minute runs of the same stretch (opening cutscene, cell, corridor, a later cutscene), one without and one with. The runs did not alternate. Frame lines every 5 s from the VIctory log:

Without With 2 threads
Longest texture pass 1,576 ms 213 ms
Mean texture pass 108 ms 25.5 ms
Lines with the texture pass over 250 ms 11 0
10th-percentile fps 1.4 4.1
25th-percentile fps 5.2 10.3
Lines under 3 fps 15 of 100 6 of 101
Median fps 12.7 13.4
  • The second run also had the open #360 and #362. They do not touch the texture pass, so the texture-pass rows are this switch's own; the fps rows are the stack's.
  • Picture: checked from screen captures every 15 s and watched live. Textures are drawn, and some still show black for a moment, fewer than before. A texture now appears at least one frame later than without the switch. No device lost.
  • With the switch, the prepare threads took about 11 ms of their own time a frame, and the recording thread's part of the pass was 1-2 ms.

Changes

  • crates/anyxboxx/src/run/settings.rs (TUNED)
  • crates/anyxboxx-launcher/profiles.toml
  • the golden tests/fixtures/lancer_victory_neptune.ps1
  • the counts in crates/anyxboxx/src/run/tests.rs and tests/test_anyxboxx_run.py
  • docs/running-gta6.md, docs/fr/lancer-gta6.md, docs/rust-full-status.md, docs/fr/rust-full-status.md

Test plan

  • cargo test --release -p anyxboxx -p anyxboxx-launcher: 23 + 211 passed (1 ignored)
  • pytest tests/test_anyxboxx_run.py tests/test_lanceur_victory.py tests/test_readme_sync.py: 37 passed, 1 skipped (the test count is only compared on a full run)
  • The in-game runs above
  • CI green

AI assistance: written with Claude Code (Claude Opus 5.5): the measurements, the change and this description.

🤖 Generated with Claude Code

**@⁠Skyfrye** on GitHub · 2026-11-26 18:33 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/430) `Skyfrye:nep/launcher-prepare-yield` → `main` · +13 −4 · 9 files · 1 commits · open Turns on `VICTORY_TEXTURE_PREPARE_THREADS=2` (merged in #395) in `anyxboxx run`'s tuned set and in the Windows + NVIDIA launcher profile. Without it, the pass over the heap's texture views makes every new texture on the thread that records the frame. That means a host texture and an upload buffer each, about 0.7 ms of driver calls per texture. While a backlog is due, the pass may spend 250 ms of a frame, or 1.5 s while catching up. That is the opening cutscene's crawl and the dips when a new area streams in. With the switch, two threads of their own make, stage and detile those textures, and the pass only records the uploads of the ones that are ready. The tuned set grows to 47 variables. ## Measured (2026-11-26, RTX 5080, Series X) Two 9-minute runs of the same stretch (opening cutscene, cell, corridor, a later cutscene), one without and one with. The runs did not alternate. Frame lines every 5 s from the VIctory log: | | Without | With 2 threads | | --- | --- | --- | | Longest texture pass | 1,576 ms | 213 ms | | Mean texture pass | 108 ms | 25.5 ms | | Lines with the texture pass over 250 ms | 11 | 0 | | 10th-percentile fps | 1.4 | 4.1 | | 25th-percentile fps | 5.2 | 10.3 | | Lines under 3 fps | 15 of 100 | 6 of 101 | | Median fps | 12.7 | 13.4 | - The second run also had the open #360 and #362. They do not touch the texture pass, so the texture-pass rows are this switch's own; the fps rows are the stack's. - Picture: checked from screen captures every 15 s and watched live. Textures are drawn, and some still show black for a moment, fewer than before. A texture now appears at least one frame later than without the switch. No device lost. - With the switch, the prepare threads took about 11 ms of their own time a frame, and the recording thread's part of the pass was 1-2 ms. ## Changes - `crates/anyxboxx/src/run/settings.rs` (`TUNED`) - `crates/anyxboxx-launcher/profiles.toml` - the golden `tests/fixtures/lancer_victory_neptune.ps1` - the counts in `crates/anyxboxx/src/run/tests.rs` and `tests/test_anyxboxx_run.py` - `docs/running-gta6.md`, `docs/fr/lancer-gta6.md`, `docs/rust-full-status.md`, `docs/fr/rust-full-status.md` ## Test plan - [x] `cargo test --release -p anyxboxx -p anyxboxx-launcher`: 23 + 211 passed (1 ignored) - [x] `pytest tests/test_anyxboxx_run.py tests/test_lanceur_victory.py tests/test_readme_sync.py`: 37 passed, 1 skipped (the test count is only compared on a full run) - [x] The in-game runs above - [ ] CI green AI assistance: written with Claude Code (Claude Opus 5.5): the measurements, the change and this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Textures picked by index are made, staged and detiled on two threads of
their own, so the pass over the heap's texture views no longer holds the
thread that records the frame for up to 1.5 s while a backlog is due.
Measured on 2026-11-26 in two 9-minute runs (RTX 5080, Series X): longest
texture pass 1,576 -> 213 ms, 10th-percentile fps 1.4 -> 4.1.

The tuned set grows to 47 variables.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:35:11 +00:00
This pull request has changes conflicting with the target branch.
  • crates/anyxboxx-launcher/profiles.toml
  • crates/anyxboxx/src/run/settings.rs
  • crates/anyxboxx/src/run/tests.rs
  • tests/test_anyxboxx_run.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/430/head:github-bot/gh-430'
git switch 'github-bot/gh-430'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-430'
git switch 'github-bot/gh-430'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-430'
git switch 'github-bot/gh-430'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-430'
git switch 'main'
git merge --squash 'github-bot/gh-430'
git switch 'main'
git merge --ff-only 'github-bot/gh-430'
git switch 'main'
git merge 'github-bot/gh-430'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.