Draws: keep each host copy's heap buffer spans up to date (VICTORY_INDEX_HEAP_SPANS; from mandy) #545

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

@⁠voiceovarian1-max on GitHub · 2026-12-03 09:43 UTC · original
voiceovarian1-max:port-heap-spans → main · +619 −24 · 4 files · 1 commits · open

With VICTORY_INDEX_HEAP_SPANS=1 (the launcher sets it; off in the code), the buffer range each
host copy of the indexed descriptor heap covers is kept up to date as the heap's slots change
(draw/heap_sweep.rs), instead of being made again from the slots at every pass.

Ported from ProjectLeonida/mandy d367675c7 (ubiquitarianism), GPL-3.0-or-later. mandy measured
the frame median -1.6 ms standing on an RTX 4060 Ti and about -5 ms walking on an RX 6800.

Tests: draw/heap_sweep_tests.rs.

What is in it

  • crates/victory-gpu/src/draw.rs | 180 +++++++++++++---
  • crates/victory-gpu/src/draw/heap_sweep.rs | 274 ++++++++++++++++++++++++
  • crates/victory-gpu/src/draw/heap_sweep_tests.rs | 185 ++++++++++++++++
  • scripts/play-foxhound.ps1 | 4 +

Tested

  • cargo check --workspace --tests --locked on main 7dbcdcb: no errors, no warnings.
  • In the game: only together with the other ports from mandy, in one combined build (results to follow here before this leaves draft).

Not tested

  • This change on its own in the game; AMD and Intel cards; the Series X profile.

AI use

Claude Code with Claude Opus 5.5 ported this from mandy, resolved its conflicts with this tree and wrote this description.

🤖 Generated with Claude Code

**@⁠voiceovarian1-max** on GitHub · 2026-12-03 09:43 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/545) `voiceovarian1-max:port-heap-spans` → `main` · +619 −24 · 4 files · 1 commits · open With VICTORY_INDEX_HEAP_SPANS=1 (the launcher sets it; off in the code), the buffer range each host copy of the indexed descriptor heap covers is kept up to date as the heap's slots change (draw/heap_sweep.rs), instead of being made again from the slots at every pass. Ported from ProjectLeonida/mandy d367675c7 (ubiquitarianism), GPL-3.0-or-later. mandy measured the frame median -1.6 ms standing on an RTX 4060 Ti and about -5 ms walking on an RX 6800. Tests: draw/heap_sweep_tests.rs. **What is in it** - `crates/victory-gpu/src/draw.rs` | 180 +++++++++++++--- - `crates/victory-gpu/src/draw/heap_sweep.rs` | 274 ++++++++++++++++++++++++ - `crates/victory-gpu/src/draw/heap_sweep_tests.rs` | 185 ++++++++++++++++ - `scripts/play-foxhound.ps1` | 4 + **Tested** - `cargo check --workspace --tests --locked` on `main` 7dbcdcb: no errors, no warnings. - In the game: only together with the other ports from mandy, in one combined build (results to follow here before this leaves draft). **Not tested** - This change on its own in the game; AMD and Intel cards; the Series X profile. **AI use** Claude Code with Claude Opus 5.5 ported this from mandy, resolved its conflicts with this tree and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With VICTORY_INDEX_HEAP_SPANS=1 (the launcher sets it; off in the code), the buffer range each
host copy of the indexed descriptor heap covers is kept up to date as the heap's slots change
(draw/heap_sweep.rs), instead of being made again from the slots at every pass.

Ported from ProjectLeonida/mandy d367675c7 (ubiquitarianism), GPL-3.0-or-later. mandy measured
the frame median -1.6 ms standing on an RTX 4060 Ti and about -5 ms walking on an RX 6800.

Tests: draw/heap_sweep_tests.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 09:46:06 +00:00
Author
Owner

@⁠voiceovarian1-max on GitHub · 2026-12-03 10:04 UTC · original

Combined test of this PR with #521, #543 and #544-#556, all merged onto main 7dbcdcb (branch fox-all of voiceovarian1-max/foxhound):

  • RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; release.
  • cargo test --workspace --locked -- --test-threads=4: 1,415 passed, 0 failed, 50 ignored (29 binaries), no SKIPPED.
  • Retail title, Series S profile, DLSS Balanced, 60 fps limit, keys pressed by the layer only (VICTORY_KEYS, no input from the PC): window scene 38-42 fps against 34-37 for main on the same boot; no device removal, no crash; a burst of 67 pictures showed no one-picture flicker of the character's clothes.
  • Not tested: each PR alone in the game; AMD and Intel; the Series X profile; long play.

Tested by Claude Code with Claude Opus 5.5 on the hardware named.

**@⁠voiceovarian1-max** on GitHub · 2026-12-03 10:04 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/545#issuecomment-7374688496) Combined test of this PR with #521, #543 and #544-#556, all merged onto `main` 7dbcdcb (branch fox-all of voiceovarian1-max/foxhound): - RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; release. - `cargo test --workspace --locked -- --test-threads=4`: 1,415 passed, 0 failed, 50 ignored (29 binaries), no `SKIPPED`. - Retail title, Series S profile, DLSS Balanced, 60 fps limit, keys pressed by the layer only (`VICTORY_KEYS`, no input from the PC): window scene 38-42 fps against 34-37 for `main` on the same boot; no device removal, no crash; a burst of 67 pictures showed no one-picture flicker of the character's clothes. - Not tested: each PR alone in the game; AMD and Intel; the Series X profile; long play. Tested by Claude Code with Claude Opus 5.5 on the hardware named.
Author
Owner

@⁠tillo88 on GitHub · 2026-12-04 00:47 UTC · original

Replay-bench measurement on v0.8.3.5 with VICTORY_INDEX_HEAP_SPANS=1: no measurable difference

Measured: PR head 9edee15 merged onto release v0.8.3.5 (5e44415), with VICTORY_INDEX_HEAP_SPANS=1 set by hand (the launcher sets it in the PR), 2 measured runs (after a warm-up run that is not counted), against 5 runs of v0.8.3.5 without the PR (fps range 36.45-37.23), same route (~6.5 min).

run fps CPU prep ms median ms p95 ms p99 ms frames > 100 ms
release run 1 36.47 19.38 28.50 39.21 46.42 16
release run 2 36.45 19.10 28.70 39.06 45.68 17
release run 3 37.23 18.49 27.80 38.21 45.59 14
release run 4 36.53 19.26 28.25 39.23 45.32 12
release run 5 37.10 18.65 28.15 38.25 44.78 13
release, mean of 5 36.76 18.98 28.28 38.79 45.56 14.4
PR #545 run 1 36.98 19.08 27.85 38.23 45.24 14
PR #545 run 2 36.86 19.35 28.50 38.04 45.37 13

Mean fps: release 36.76, PR 36.92 (+0.4%): no measurable difference. Median frame time 28.18 ms against 28.28 ms for the release (release runs 27.80-28.70), so no median frame-time change shows on this route and machine; p95 and p99 are inside the release's range.

Crashes: none in the PR runs and none in the release runs (no host GPU failure, no device lost).

Config: RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB, Windows 11; default play-foxhound.ps1 settings (Series X profile, 1440p, DLSS balanced, no frame generation), fullscreen, no frame cap.

Measured unattended on a replay bench (same save, recorded controller input); numbers and text prepared with Claude.

**@⁠tillo88** on GitHub · 2026-12-04 00:47 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/545#issuecomment-7397160021) **Replay-bench measurement on v0.8.3.5 with `VICTORY_INDEX_HEAP_SPANS=1`: no measurable difference** Measured: PR head `9edee15` merged onto release **v0.8.3.5** (`5e44415`), with `VICTORY_INDEX_HEAP_SPANS=1` set by hand (the launcher sets it in the PR), 2 measured runs (after a warm-up run that is not counted), against 5 runs of v0.8.3.5 without the PR (fps range 36.45-37.23), same route (~6.5 min). | run | fps | CPU prep ms | median ms | p95 ms | p99 ms | frames > 100 ms | |---|---|---|---|---|---|---| | release run 1 | 36.47 | 19.38 | 28.50 | 39.21 | 46.42 | 16 | | release run 2 | 36.45 | 19.10 | 28.70 | 39.06 | 45.68 | 17 | | release run 3 | 37.23 | 18.49 | 27.80 | 38.21 | 45.59 | 14 | | release run 4 | 36.53 | 19.26 | 28.25 | 39.23 | 45.32 | 12 | | release run 5 | 37.10 | 18.65 | 28.15 | 38.25 | 44.78 | 13 | | **release, mean of 5** | **36.76** | **18.98** | **28.28** | **38.79** | **45.56** | **14.4** | | PR #545 run 1 | 36.98 | 19.08 | 27.85 | 38.23 | 45.24 | 14 | | PR #545 run 2 | 36.86 | 19.35 | 28.50 | 38.04 | 45.37 | 13 | Mean fps: release 36.76, PR 36.92 (+0.4%): **no measurable difference**. Median frame time 28.18 ms against 28.28 ms for the release (release runs 27.80-28.70), so no median frame-time change shows on this route and machine; p95 and p99 are inside the release's range. Crashes: none in the PR runs and none in the release runs (no host GPU failure, no device lost). Config: RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB, Windows 11; default `play-foxhound.ps1` settings (Series X profile, 1440p, DLSS balanced, no frame generation), fullscreen, no frame cap. Measured unattended on a replay bench (same save, recorded controller input); numbers and text prepared with Claude.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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