GPU: log title slots past a capped heap once per 64 Ki, not each #1799

Open
AgneyaK wants to merge 1 commit from upstream-pr/1800 into main
AgneyaK commented 2026-11-24 22:46:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AgneyaK on 2026-11-24T22:46:31Z.


On a host that caps the view heap (NVIDIA: 1,000,000 views, while the title's heap has 1,245,184), HostHeap::mirror warns title slot past the host heap on every new highest index. The title walks its slots in order, so the log gets one line per slot: about 310,000 lines in the first minute (reported in #1753, #1754 and #1781; 136,104 lines in 33 s in a run on this laptop, a quarter of that log).

Change. The warning is kept for the first slot past the heap and then given once per new 64 Ki step of slots (past_heap_step). For that heap that's 6 lines instead of 310,720. Nothing else changes: the slot still returns None as before.

Tested (Windows 11 26300, Rust 1.98.1, on top of main 70564ae):

  • New unit test slots_past_the_heap_log_once_per_step: walks 934,464..1,245,184 as the title does, expects 6 logged slots, none for a lower or equal index.
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean. My hunks are rustfmt-clean.

Not tested: a title run with this change (the RTX 3050 here hits the #1754 removal on main within a minute; the line count above is from that run without the change). It doesn't touch the heap cap itself (#1627, #1777, #1779).

AI use: Claude Code (Claude Opus 5.5) wrote the change and the test and ran them; the results are from the runs described.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6592932620 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1800). Originally posted by [AgneyaK](https://github.com/AgneyaK) on 2026-11-24T22:46:31Z. --- On a host that caps the view heap (NVIDIA: 1,000,000 views, while the title's heap has 1,245,184), `HostHeap::mirror` warns `title slot past the host heap` on **every** new highest index. The title walks its slots in order, so the log gets one line per slot: about 310,000 lines in the first minute (reported in #1753, #1754 and #1781; 136,104 lines in 33 s in a run on this laptop, a quarter of that log). **Change.** The warning is kept for the first slot past the heap and then given once per new 64 Ki step of slots (`past_heap_step`). For that heap that's 6 lines instead of 310,720. Nothing else changes: the slot still returns `None` as before. **Tested** (Windows 11 26300, Rust 1.98.1, on top of `main` `70564ae`): - New unit test `slots_past_the_heap_log_once_per_step`: walks 934,464..1,245,184 as the title does, expects 6 logged slots, none for a lower or equal index. - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings`: clean. My hunks are rustfmt-clean. Not tested: a title run with this change (the RTX 3050 here hits the #1754 removal on `main` within a minute; the line count above is from that run without the change). It doesn't touch the heap cap itself (#1627, #1777, #1779). AI use: Claude Code (Claude Opus 5.5) wrote the change and the test and ran them; the results are from the runs described. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
catminou4 commented 2026-11-24 23:05:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:03:23Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Title slots past a capped heap logged once per 64 Ki instead of per slot: log-spam fix, 2.4K.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048801229 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1800#pullrequestreview-6048801229). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:03:23Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Title slots past a capped heap logged once per 64 Ki instead of per slot: log-spam fix, 2.4K.
MrEjecutor commented 2026-11-25 01:08:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MrEjecutor on 2026-11-25T00:42:59Z.


A title run with this change, RTX 5060 Ti (Blackwell): without it the boot ends at 52 s in the title's own watchdog; with it the menus run and the world is reached

The PR says a title run was not tested; here is one, before and after, where the only difference is this PR.

Setup: RTX 5060 Ti 16 GB, driver 621.24; Intel Core Ultra 5 225F; 32 GB; Windows 11 26200; Rust 1.100; Series X profile. main 70564ae + #1775 (3f91087), then the same with this PR merged (2a4698a). Diag build, VICTORY_D3D12_DRED=1, stderr to a file, the same scripted Enter presses, the same shader cache and pipeline library for both runs (translate --cache --pipelines first). One run each.

70564ae + #1775 + this PR
title slot past the host heap lines 165,284 5 (934,464, then each 64 Ki step)
frames presented when the walk starts 2 –
menus never reached 30 fps
world never reached from 119 s
end process ends at 52 s: 0xc0000005 at victory-image-…dll+0x258b000, stack through +0x2215c35 / +0x2215eca device removed at 186 s (0x887A0006), see below

Without the PR the walk begins right after frame 2 and writes those 165,284 lines in 39 s (slots 934,464 to 1,099,747, about 236 µs a slot here), and no frame is presented in that time. Then the title ends itself; the stack is the one #1317 attributes to the title's watchdog thread, and the title tries to upload its crash report (blocked). No device removal in that run. So on this machine the per-slot warning is more than log volume: it holds the title long enough for its watchdog. With the PR the same walk passes unnoticed.

What ends the run with the PR is a different problem, in the world: 10 submissions of 5.3 to 5.7 s (slow host submission, about 5.7 s of GPU time per frame), 9 of them with [compute 00167d58cc5a78d7] in their lists (the program in the RTX 2070 SUPER report on #1753), then host GPU device removed after a submission of 15 lists with 0x887A0006; the last command DRED shows is dispatch 16x16x6 [compute 7ec32976ba4a1227]. Two nvlddmkm resets.

Not tested: 70564ae without #1775 on this card (so nothing here measures #1775 itself); current main; more than one run each.

AI use: Claude Code built, ran and wrote this; checked by mrejecutor. No game data attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148800922 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1800#issuecomment-7148800922). Originally posted by [MrEjecutor](https://github.com/MrEjecutor) on 2026-11-25T00:42:59Z. --- **A title run with this change, RTX 5060 Ti (Blackwell): without it the boot ends at 52 s in the title's own watchdog; with it the menus run and the world is reached** The PR says a title run was not tested; here is one, before and after, where the only difference is this PR. **Setup:** RTX 5060 Ti 16 GB, driver 621.24; Intel Core Ultra 5 225F; 32 GB; Windows 11 26200; Rust 1.100; Series X profile. `main` `70564ae` + #1775 (`3f91087`), then the same with this PR merged (`2a4698a`). Diag build, `VICTORY_D3D12_DRED=1`, stderr to a file, the same scripted `Enter` presses, the same shader cache and pipeline library for both runs (`translate --cache --pipelines` first). One run each. | | `70564ae` + #1775 | + this PR | |---|---|---| | `title slot past the host heap` lines | 165,284 | 5 (934,464, then each 64 Ki step) | | frames presented when the walk starts | 2 | – | | menus | never reached | 30 fps | | world | never reached | from 119 s | | end | process ends at 52 s: `0xc0000005 at victory-image-…dll+0x258b000`, stack through `+0x2215c35` / `+0x2215eca` | device removed at 186 s (`0x887A0006`), see below | Without the PR the walk begins right after frame 2 and writes those 165,284 lines in 39 s (slots 934,464 to 1,099,747, about 236 µs a slot here), and no frame is presented in that time. Then the title ends itself; the stack is the one #1317 attributes to the title's watchdog thread, and the title tries to upload its crash report (blocked). No device removal in that run. So on this machine the per-slot warning is more than log volume: it holds the title long enough for its watchdog. With the PR the same walk passes unnoticed. What ends the run with the PR is a different problem, in the world: 10 submissions of 5.3 to 5.7 s (`slow host submission`, about 5.7 s of GPU time per frame), 9 of them with `[compute 00167d58cc5a78d7]` in their lists (the program in the RTX 2070 SUPER report on #1753), then `host GPU device removed after a submission of 15 lists` with `0x887A0006`; the last command DRED shows is `dispatch 16x16x6 [compute 7ec32976ba4a1227]`. Two `nvlddmkm` resets. **Not tested:** `70564ae` without #1775 on this card (so nothing here measures #1775 itself); current `main`; more than one run each. **AI use:** Claude Code built, ran and wrote this; checked by mrejecutor. No game data attached.
Marvisak commented 2026-11-25 07:03:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:24:52Z.


Automated triage for the maintainers.

This pull request no longer merges cleanly into main (conflicts in crates/victory-gpu/src/descriptor/host.rs). It will be reviewed once it is rebased onto the current main. The earlier verdict (merge candidate) was for an older state of main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154765354 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1800#issuecomment-7154765354). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:24:52Z. --- <!-- victory-triage v1 head=2a4698a66b916d559cd2a0ee67417bb3309d9ea7 verdict=needs-rebase at=2026-11-25T16:02:00Z --> Automated triage for the maintainers. This pull request no longer merges cleanly into `main` (conflicts in `crates/victory-gpu/src/descriptor/host.rs`). It will be reviewed once it is rebased onto the current `main`. The earlier verdict (merge candidate) was for an older state of `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
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/1800:upstream-pr/1800'
git switch 'upstream-pr/1800'

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/1800'
git switch 'upstream-pr/1800'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1800'
git switch 'upstream-pr/1800'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1800'
git switch 'main'
git merge --squash 'upstream-pr/1800'
git switch 'main'
git merge --ff-only 'upstream-pr/1800'
git switch 'main'
git merge 'upstream-pr/1800'
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
Marvisak/VIctory!1799
No description provided.