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

Open
voiceovarian1-max wants to merge 1 commit from upstream-pr/545 into main
voiceovarian1-max commented 2026-12-03 09:43:36 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by voiceovarian1-max on 2026-12-03T09:43:36Z.


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

<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:5623927728 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/545). Originally posted by [voiceovarian1-max](https://github.com/voiceovarian1-max) on 2026-12-03T09:43:36Z. --- 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)
voiceovarian1-max commented 2026-12-03 10:04:11 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by voiceovarian1-max on 2026-12-03T10:04:11Z.


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.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:comment:7374688496 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/545#issuecomment-7374688496). Originally posted by [voiceovarian1-max](https://github.com/voiceovarian1-max) on 2026-12-03T10:04:11Z. --- 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.
tillo88 commented 2026-12-04 00:47:13 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by tillo88 on 2026-12-04T00:47:13Z.


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.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:comment:7397160021 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/545#issuecomment-7397160021). Originally posted by [tillo88](https://github.com/tillo88) on 2026-12-04T00:47:13Z. --- **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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/545:upstream-pr/545'
git switch 'upstream-pr/545'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/545'
git switch 'upstream-pr/545'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/545'
git switch 'upstream-pr/545'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/545'
git switch 'main'
git merge --squash 'upstream-pr/545'
git switch 'main'
git merge --ff-only 'upstream-pr/545'
git switch 'main'
git merge 'upstream-pr/545'
git push origin 'main'
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
readmet3xt-lab/foxhound!545
No description provided.