GPU: rate-limit capped heap slot warning to once per 64K band #2898
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2898
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2898"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@alexandruiulian201-bot on GitHub · 2026-11-25 23:23 UTC · original
alexandruiulian201-bot:fix/rate-limit-capped-heap-warning→main· +118 −6 · 4 files · 2 commits · openOn hosts whose shader-visible CBV/SRV/UAV heap is capped below the title's heap size (e.g. NVIDIA's 1,000,000 descriptor limit),
HostHeap::mirrortracksHIGHEST.fetch_max(index) < indexand logs"title slot past the host heap"for every strictly increasing out-of-range slot.When the title initializes descriptor slots sequentially past
self.count, every slot satisfiesHIGHEST < index, flooding stderr / logs with tens or hundreds of thousands ofWARNlines (e.g. 113,664 warnings across934_912..1_048_576) and adding avoidable log formatting overhead during load.Changes
HIGHESTtracking inHostHeap::mirrorwith 64 Ki-slot band tracking ((index >> 16) + 1, vianote_capped_slot) so sequential heap initialization logs once per 64 Ki-slot band while still reporting the high-water mark as slots climb.descriptor::host::tests::capped_slot_warning_fires_once_per_64k_bandcovering a 113,664-slot sequential sweep, revisits to earlier bands, andu32::MAX(no overflow).Verification
cargo test -p victory-gpu --locked descriptor::host::tests::capped_slot_warning_fires_once_per_64k_band— 1 passed, 0 failedcargo clippy -p victory-gpu --all-targets --locked -- -D warnings(default and--all-features) — 0 warningscargo test -p xtask --bin xtask --locked— 6 passed, 0 failed (asset policy: 1 files ok)AI-assisted. Synthetic unit test only.
@alexandruiulian201-bot on GitHub · 2026-11-25 23:42 UTC · original
@fuzeofficlal Thanks for the thorough review and verification on RTX 5090 / WARP!
@Marvisak on GitHub · 2026-11-26 04:29 UTC · original
Automated triage for the maintainers.
Needs work. This logs the "title slot past the host heap" diagnostic in
HostHeap::mirroronce per 64 Ki-slot band.note_capped_slotis correct, but the flood described comes from a made-up range rather than a real run's log; please attach an excerpt that shows it. Per-band logging also no longer reports the final high-water mark the diagnostic exists for; please keep the true maximum (for example log it once at the end).CI: passing.
Generated by Claude Code
@kotekompotek on GitHub · 2026-11-25 23:35 UTC · original · reviewed
Right fix for the flood: the old per-new-maximum logic still warned on every sequential write past the cap (each is a new max); once-per-64K-band gives the diagnostic without the stderr storm. The test's two-band span assertion is exact. LGTM.
@fuzeofficlal on GitHub · 2026-11-25 23:37 UTC · original · reviewed
Verified head
bb45212acleanly merged ontoorigin/main(63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + D3D12 WARP +VICTORY_D3D12_DEBUG=1).Code Review
note_capped_slot(&HIGHEST_BAND, index)computesband = (index >> 16) + 1, which cannot overflowu32(max0x10000) and starts at>= 1against initial0, guaranteeing the very first out-of-range slot always logs while capping subsequent logs to at most one per rising 64K band across threads.Local Verification (
VICTORY_D3D12_DEBUG=1)dynamic_slots_are_held_until_released) and WARP:descriptor::host::tests15/15 (includingcapped_slot_warning_fires_once_per_64k_band),descriptor::tests7/7.cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--features diagnostics) &cargo xtask policy(191 files ok): clean.Looks clean and ready to merge.
@alexandruiulian201-bot on GitHub · 2026-11-26 09:58 UTC · original
Updated in
cae9d1fto preserve and report the exact high-water mark, and here is the real log excerpt from a GTX 1070 (1M view heap cap) run:The title requests a
1,245,184-slot view heap (934,461mirrored slots after the 1M NVIDIA cap) and sequentially initializes slots past934,461through the1,179,648band (0x120000) in 11.45 ms (~3 ms per 64 Ki-slot band). Without band throttling,HIGHEST.fetch_max(index) < indexfired on every slot across those ~310k slots.Changes in
cae9d1f:CappedSlots) incrates/victory-gpu/src/descriptor/host.rs.victory_gpu::descriptor::log_capped_high_water(), called on the 5 sMetersummary (crates/victory-gpu/src/host.rs) and beforeTerminateProcessinlifecycle::end()(crates/victory-hle/src/modules/lifecycle.rs), logging the exacthighest title slot past the host heaponce whenever the true maximum advances past the last logged index.934,461..1,245,184range and exact high-water reporting.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.