GPU: name the title slots a capped host heap could not hold #3475
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!3475
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3475"
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?
@tharun-37 on GitHub · 2026-11-27 05:16 UTC · original
tharun-37:gpu/capped-heap-slot-report→main· +186 −4 · 2 files · 4 commits · openSummary
Fixes #3474
Why
The warning is for the first slot past the host heap, but it fires for every new highest index the title reaches. How far the title's descriptor table overflows the host heap is the number that says whether a clamp (the shader reads a null slot) is enough or the title's views have to be made afresh, and it was nowhere in the log.
What the log says now
19 warnings instead of 310,720, and the count of the slots past the heap in the statistics. The count in the warning is the number of the title's slots past the heap (the slots are numbered from zero), not the number of times a slot was skipped, so it does not depend on how often the title asks for the same slot.
Verification
cargo test -p victory-gpu— 233 passed, 1 ignored; the 2 failures are the known NVIDIA heap-cap ones (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views), reproduced onmain.cargo clippy -p victory-gpu --all-targets -- -D warnings, with and withoutdiagnostics— clean.descriptor::host::tests::the_slots_past_a_capped_heap_are_counted_and_the_log_names_a_few, and the three tests for a repeat, a sparse index and concurrent asks (capped_heap_repeats_and_older_indices_do_not_warn_again,capped_heap_sparse_indices_warn_when_crossing_a_range,capped_heap_concurrent_repeats_warn_once_but_count_every_skip).@kalberts0089-hash on GitHub · 2026-11-27 05:34 UTC · original
NVIDIA test report: RTX 4060 (desktop, driver 610.88), Windows 11 Pro, rustc 1.98.1. Head
ec62b97(base main63bcca4).cargo test -p victory-gpu --lib -- --test-threads=1: 230 passed, 2 failed, 1 ignored (main: 229 / 2 / 1). The newthe_slots_past_a_capped_heap_are_counted_and_the_log_names_a_fewpasses, with and without--features diagnostics. The 2 failures are the known capped-heap ones (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views) and fail the same way on main.cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings: clean.cargo test -p victory-shader --no-fail-fast: the process dies with0xc0000005inheap_direct_texture_reads_mark_their_heap_index, as on main (#2571, not this PR). With only that test skipped: 298 passed, 3 failed, 3 ignored, the known NVIDIA failures (a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,gathers_at_a_level_match_the_hardware).mirrorpast the capped heap with a log subscriber, so this report doesn't confirm the 310,720 → 23 line count. Reading the change: a single ascending sweep over the 310,720 skipped slots gives 19 warnings (skip 1, then every power of two up to 2^18), and only the capped view heap can reach this path, because sampler heaps are made at full size or not at all.Synthetic tests only, no game files. AI-assisted (Claude Code).
@tharun-37 on GitHub · 2026-11-27 06:07 UTC · original
Thanks for the report. Two changes since
ec62b97(07107f6):With that, a world load on an RTX 4060 Laptop (driver 32.0.16.2140, Windows 11 build 26300) gives 19 warnings, the same 19 an ascending sweep over the 310,720 slots gives:
310,720 warnings (a 140 MB log) before, 19 now, and the whole run's log is 3.6 MB instead of 140 MB.
@playcations on GitHub · 2026-11-27 06:22 UTC · original
The current
cc7bd350d92a87ab44e6e45043ae3625871c678cstill repeats warnings if the retained high-water distance is a power of two.I replayed the exact production
PastHeap,slots_pastandworth_a_warningcode on CPU withcount = 934_464and this sequence of out-of-range indices:For each observation the replay calls the same
note -> slots_past -> worth_a_warningchain asmirror. It produces 7 warnings, although only three new warning distances (1, 2, 4) were reached. The state correctly ends at(skips=8, highest=count+3, count=count). Repeatingcountalone warns every time; after reachingcount+3, both a repeat and an older out-of-range index warn again becausenotereturns the retained maximum and its distance remains 4.The ascending-only test cannot catch this. The atomic
fetch_maxreturn already gives the previous maximum; carrying that into the emission decision would let the caller require a new high-water/threshold crossing while preserving the skip counter on every observation. It would also be useful to cover a first sparse observation and jumps over a threshold, so warnings do not disappear when a distance is not exactly a power of two.This is an isolated replay of the production CPU policy, not a
HostHeap::mirror/subscriber integration test or a game/GPU run. No game data used. AI-assisted with Codex GPT-6.1 Sol; source and failure were reviewed.@playcations on GitHub · 2026-11-27 06:41 UTC · original
I prepared the small follow-up below against current
cc7bd350, for inclusion in this PR if you want it.notekeepsfetch_max's previous maximum and returns both the retained maximum and the warning decision. The decision compares the old and new power-of-two ranges; repeats and older indices do not warn, while a first sparse observation or a jump over a boundary does. Every skip still increments the counter, and the statistics/log fields remain intact.Checked the actual Windows-target module tests under GPU-isolated Wine 11.22 Staging:
cargo xwin clippy -p victory-gpu --all-targets --target x86_64-pc-windows-msvc -- -D warningspasses with and without--features diagnostics;cargo xtask policypasses (191 files). A separate Sol source review found no material issue under the current fixed positive capped-heap size. This is CPU policy/testing only, not a new game/GPU run or a full suite claim. AI-assisted with Codex GPT-6.1 Sol.Proposed follow-up patch
@cloph-dsp on GitHub · 2026-11-27 06:42 UTC · original
Independent CPU-only verification of PR #3475 (
capped host heap slot logging).CARGO_TARGET_DIR(D:\Victory-Contrib\target-3475-watch),CARGO_BUILD_JOBS=2.cc7bd350d92a87ab44e6e45043ae3625871c678c, merge base63bcca43c6a00a758510398fa43096ce7e4f7df0.cargo test --locked -p victory-gpu --lib -- descriptor::host::tests::the_slots_past_a_capped_heap_are_counted_and_the_log_names_a_few --exact --test-threads=1 --quiet->1 passed; 0 failed; 232 filtered.git grep -Ffor the new test name on63bcca4returned no hits.git diff --check 63bcca4 HEADexit 0 (clean).@tharun-37 on GitHub · 2026-11-27 06:48 UTC · original
Good catch, and the patch works as you describe — taken with one change to the wording of the helper (it now takes the previous and the new distance, as in your patch).
deafedakeepsfetch_max's previous maximum and returns it with the warning decision, so:Your three tests are in (
capped_heap_repeats_and_older_indices_do_not_warn_again,capped_heap_sparse_indices_warn_when_crossing_a_range,capped_heap_concurrent_repeats_warn_once_but_count_every_skip), with the ascending sweep test now replaying the samenotechain so the 19 warnings are checked against the production path.On this machine (RTX 4060 Laptop, driver 32.0.16.2140, Windows 11 build 26300):
cargo test -p victory-gpu: 233 passed, 1 ignored; the 2 failures are the known capped-heap ones (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views), reproduced onmain.cargo clippy -p victory-gpu --all-targets -- -D warnings, with and withoutdiagnostics: clean.cargo fmt -p victory-gpu -- --checkandgit diff --check: clean.Thank you for the replay and the patch.
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.