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

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

@⁠Moon0755 on GitHub · 2026-11-25 17:36 UTC · original
Moon0755:fix/host-heap-warn-once → main · +9 −6 · 1 files · 1 commits · open

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

**@⁠Moon0755** on GitHub · 2026-11-25 17:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/1054) `Moon0755:fix/host-heap-warn-once` → `main` · +9 −6 · 1 files · 1 commits · open 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
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:56:45 +00:00
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/1054/head:github-bot/gh-1054'
git switch 'github-bot/gh-1054'

Merge

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