GPU: warn once when title descriptor slots exceed host heap (port of upstream VIctory #2634) #1052

Open
Moon0755 wants to merge 1 commit from upstream-pr/1054 into main
Moon0755 commented 2026-11-25 17:36:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Moon0755 on 2026-11-25T17:36:53Z.


Port of upstream Marvisak/VIctory#2634 (originally authored by @pes7).

Summary

In HostHeap::mirror, when a title descriptor index exceeds the host descriptor heap count (e.g., NVIDIA's capped heap), HIGHEST.fetch_max(index) < index previously emitted a tracing::warn!("title slot past the host heap") line for every new high-water mark as the title walked slots in increasing order — up to ~250,000 log lines (~8,000/s) on the frame-recording thread, stalling the first world frame (reported upstream as 21 s -> 33 ms).

Switching to std::sync::Once logs the overflow diagnostic once instead of once per slot.

Changes

  • crates/victory-gpu/src/descriptor/host.rs: replaced the per-high-water-mark AtomicU32 warning in HostHeap::mirror with std::sync::Once::call_once.

Verification

Verified on windows-latest via GitHub Actions (run 45665589388):

  • cargo clippy -p xtask --all-targets --locked -- -D warnings — passed
  • cargo check -p victory-gpu --all-targets --locked and --all-features — passed
  • cargo test -p victory-gpu descriptor --locked -- --test-threads=1 --nocapture — 28 passed; 0 failed
  • cargo test -p xtask --locked — 4 passed; 0 failed (repository_passes_policy passed)

— Neon

<!-- greyfinch-sync:fxceless/victory-fork:issue:6610156243 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1054). Originally posted by [Moon0755](https://github.com/Moon0755) on 2026-11-25T17:36:53Z. --- Port of upstream `Marvisak/VIctory#2634` (originally authored by `@pes7`). ### Summary In `HostHeap::mirror`, when a title descriptor index exceeds the host descriptor heap count (e.g., NVIDIA's capped heap), `HIGHEST.fetch_max(index) < index` previously emitted a `tracing::warn!("title slot past the host heap")` line for every new high-water mark as the title walked slots in increasing order — up to ~250,000 log lines (~8,000/s) on the frame-recording thread, stalling the first world frame (reported upstream as 21 s -> 33 ms). Switching to `std::sync::Once` logs the overflow diagnostic once instead of once per slot. ### Changes - `crates/victory-gpu/src/descriptor/host.rs`: replaced the per-high-water-mark `AtomicU32` warning in `HostHeap::mirror` with `std::sync::Once::call_once`. ### Verification Verified on `windows-latest` via GitHub Actions ([run 45665589388](https://github.com/Moon0755/victory-fork/actions/runs/45665589388)): - `cargo clippy -p xtask --all-targets --locked -- -D warnings` — passed - `cargo check -p victory-gpu --all-targets --locked` and `--all-features` — passed - `cargo test -p victory-gpu descriptor --locked -- --test-threads=1 --nocapture` — `28 passed; 0 failed` - `cargo test -p xtask --locked` — `4 passed; 0 failed` (`repository_passes_policy` passed) — Neon
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/1054:upstream-pr/1054'
git switch 'upstream-pr/1054'

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/1054'
git switch 'upstream-pr/1054'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1054'
git switch 'upstream-pr/1054'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1054'
git switch 'main'
git merge --squash 'upstream-pr/1054'
git switch 'main'
git merge --ff-only 'upstream-pr/1054'
git switch 'main'
git merge 'upstream-pr/1054'
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
fxceless/victory-fork!1052
No description provided.