victory-gpu: say once, not per slot, that the title's heap outgrew the host's (first frame 21 s -> 33 ms) #2634
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!2634
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2634"
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?
@pes7 on GitHub · 2026-11-25 17:17 UTC · original
pes7:perf/heap-slot-log→main· +9 −6 · 1 files · 1 commits · openThe title asks for 1 245 184 descriptor slots, more than the 1 000 000 a host heap holds (
D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2), and it walks them in increasing order. The diagnostic for the slots it cannot get was written as "log when the high-water mark moves", which is one line per distinct slot:In the first ~44 s of a run that is 199 846 of the first 200 000 log lines (~8 000 a second), emitted from the thread recording the frame - and it was the whole of the first frame's stall.
Measured on the same warm caches (926 MB pipeline library, 1 347 MB shader cache), same build otherwise, same 150 s window:
title slot pastlinespreparing 21 033 ms)The menu is up at once instead of after 21 s of writing warnings.
What this does not fix
The reason the slots are missing: 245 184 title slots can never be mirrored, because they exceed the heap limit. Every draw that reaches one gets a null view, and the same opening frames say so twice:
That needs a real change - several host heaps with the index arithmetic adjusted, or the views above 1 M placed elsewhere - and the second line says the usable part is not contiguous with what the title uses. This PR only stops the log from hiding everything else while that is decided;
VICTORY_LOGoutput is readable again, which is what makes the rest measurable.One file, the log statement.
cargo test --workspace --locked, both clippy configurations with-D warnings,cargo xtask policy.What it gives (to decide the merge): the per-slot warning about the title's heap outgrowing the host's was the whole of the first frame: 16 695 ms -> 33 ms, and 310 932 log lines -> 231. Re-measured on
main13f91ca.State: MERGEABLE, CI
checkgreen, rebased onto today'smain(f3578e3).Risk: the warning is said once, with the highest slot reached, instead of once per slot.
The title asks for 1 245 184 descriptor slots, more than the 1 000 000 a host heap holds, and it walks them in increasing order. "Log when the high-water mark moves" is therefore one line per distinct slot: 199 846 of the first 200 000 lines of a run, ~8 000 a second, on the thread recording the frame. That was the whole of the first frame's stall: before 310 932 lines in the run, first frame 21 433 ms after 231 lines in the run, first frame 33 ms Same build, same warm caches (926 MB pipeline library, 1 347 MB shader cache), same 150 s window. What the line said - that slots above the host heap's count are not mirrored - is what the one line now says. The underlying problem is not this change: 245 184 title slots can never be mirrored because they exceed the tier-2 heap limit, which needs either several host heaps with the index arithmetic adjusted or the views above 1 M placed elsewhere. That is why the first world frames get null views. cargo test --workspace --locked; both clippy configurations with -D warnings; cargo xtask policy.@Bj0rnis on GitHub · 2026-11-25 17:24 UTC · original
Independent Windows 11 hardware + WARP verification of #2634 at
a9eca143(cleangit merge-treewithorigin/main13f91cae, Rust 1.98.1 MSVC):cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1-> 144 passed, 2 failed, 2 ignored (only the 2 pre-existing #1744 NVIDIA 1M view-heap baseline failures).VICTORY_D3D12_WARP=1): 146 passed, 0 failed, 2 ignored (0.94s).cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings-> 0 warnings.cargo xtask policy-> 182 files ok.Not tested: live game workload / first-frame timing.
AI-assisted test run and summary.
@oni-swr on GitHub · 2026-11-25 17:38 UTC · original
Independent verification (no physical GPU, no game files, no competing PR). AI-assisted: Claude Code (Claude Sonnet 5.5).
VICTORY_D3D12_WARP=1with--features diagnostics(needed for the switch to select the software adapter) andVICTORY_WARP=1.origin/main=13f91caee2a9eca1430a(83 commits behindorigin/main; merges cleanly, and I tested the merge too)Results
cargo test -p victory-gpu --lib --features diagnostics --locked -- --test-threads=1on the head: 146 passed, 0 failed, 2 ignored.origin/main+ this PR merged (not committed): 198 passed, 0 failed, 1 ignored;origin/mainalone: 198 passed, 0 failed, 1 ignored.cargo clippy -p victory-gpu --all-targets --features diagnostics --locked: no warnings.tracing::Subscriber,HostHeap::new(false, 4)on WARP, and 1000 calls ofmirror(1000 + i, 0, false). Onorigin/mainit counts 1000 WARN events (assertion failed, left 1000, right 1); on the PR head it counts 1 and passes.Review: the
Onceis process-wide, so a second, differently sized heap never warns; fine for a diagnostic. The new message text is clearer. The 21 s -> 33 ms first-frame figure is the author's measurement on the title and is not reproduced here.Not tested: the retail-title numbers, physical GPU.
@kotekompotek on GitHub · 2026-11-25 17:47 UTC · original
Reviewed: warn-once is right — the previous per-new-high-water line could spam thousands/sec during world streaming, and the message now says what the consequence is (slots above count are not mirrored). CI green.
@pes7 on GitHub · 2026-11-25 17:49 UTC · original
Re-measured on today's main (
13f91ca), warm caches, same window, so this still applies as-is and the numbers hold up:So 99.9% of the run's log is that one line, and
preparing- the part of the frame that is our CPU work - is 16.5 s of a 16.7 s frame while the GPU does 1.5 ms. With theOncein this PR it is 33 ms and 231 lines (measured on the same warm caches).The removal that follows is unrelated (a TDR, #1633), but it comes 10 s after this stall, so every launch pays the 16.5 s before anything can be measured.
@Marvisak on GitHub · 2026-11-25 22:21 UTC · original
Automated triage for the maintainers.
Recommended for a maintainer's look. In
HostHeap::mirror(crates/victory-gpu/src/descriptor/host.rs), the warning for a title slot past a capped host heap went out at every new high-water mark. Because the title walks its slots in increasing order, that is one line per slot, and the author measured it as nearly all of a run's log and about 16–21 s of the first frame's preparing time. It is now a singleOncewarning that says slots above the count are not mirrored; the behaviour (Nonefor those slots) is unchanged. A reviewer confirmed with a counting subscriber that 1000 calls now log once. This overlaps the older #1800 (log once per 64 Ki), which needs a rebase. This one is smaller and merges cleanly. CIcheckpassing.Generated by Claude Code
@davesousa on GitHub · 2026-11-25 23:56 UTC · original
This also removes an intermittent boot crash on NVIDIA: the title's own watchdog kill. RTX 3070 Ti 8 GB, driver 621.40, Windows 11 26200, Series X profile,
diagbuild. Tree:mainf3578e3+ #2319 + #2178 + #2851 (what this card needs to reach the world), then the same with this PR (a9eca14, merges cleanly).The crash. Across today's runs of builds without this PR (several trees, stderr to a file), 4 of 15 boots ended within the first minute with
0xc0000005(write 0x0) atimage+0x2215c35, orimage+0x258b000called from it, with+0x2215ecabelow. That is the watchdog kill site in #630, and the stack MrEjecutor saw on #1800. In those runstitle slot past the host heapbegan about 5 s in at about 11,000 lines a second. In the killed boots it was still running at the kill, 30 s later. In a clean boot of the same build it ended after 27 s.A/B. Same tree with and without this PR, run as the README does (its own console window, output to the console), 3 boots each, 120 s each, window caption sampled every 5 s:
None of these six boots was killed, but without the PR the stall was 25-35 s against what #630 describes as a 30 s countdown. That fits the 4-in-15 rate above. With the PR the menus are up in 10 s, so the boot no longer runs near the limit.
AI-assisted (Claude Code); the runs are on my machine.
@Dukestar69 on GitHub · 2026-11-26 05:08 UTC · original · approved these changes
Tested merged onto
origin/main(63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090):cargo test -p victory-gpu --lib descriptor::host::tests -- --test-threads=1 --skip dynamic_slots_are_held_until_released: 14 passed, 0 failed (skipped pre-existing#1744NVIDIA 1M view-heap cap test; single-threaded due to pre-existingWHILE_PREPARINGparallel race in#2946).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@fuzeofficlal on GitHub · 2026-11-26 14:29 UTC · original · approved these changes
Reviewed
a9eca1430a0b2a133ee5ebc4ec07062ae6c562bamerged cleanly ontomain(63bcca43c6a0) and verified on Windows 11 x64 (NVIDIA GeForce RTX 5090 + Microsoft WARP,VICTORY_D3D12_DEBUG=1, Rust1.98.1).Code Review
crates/victory-gpu/src/descriptor/host.rs:634-652: Replacingstatic HIGHEST: AtomicU32withstatic ONCE: std::sync::Onceeliminates per-slot warning spam when a title walks past a capped host view heap, clarifies the warning message (slots above the host heap's count are not mirrored), and preserves theNonereturn path identically.ONCElogs the first out-of-bounds slot encountered—which is completely fine for a one-shot diagnostic.Verification (RTX 5090 + WARP +
VICTORY_D3D12_DEBUG=1, Rust1.98.1)cargo run --locked -p xtask -- policy:191 files ok.cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--all-features): 0 warnings.victory-gpudescriptor::(VICTORY_D3D12_DEBUG=1):dynamic_slots_are_held_until_released): 21/21 passed.--features diagnostics, full suite): 22/22 passed.HostHeap::mirror(heap.count + i, 0, false)calls under a countingtracing::Subscriber):origin/main(63bcca43, RTX 5090):nones=1000, warns=1000.#2634merged ontomain:nones=1000, warns=1on both RTX 5090 and WARP (VICTORY_D3D12_DEBUG=1).LGTM.
@neonbyte1 on GitHub · 2026-11-26 17:48 UTC · original
Tested in game on an RTX 5090 (driver 620.73.04), Linux, GE-Proton11-14 Wine with vkd3d-proton.
Build:
mainplus a few unmerged PRs this setup needs, with this PR merged on top (clean, one file). NVIDIA reports a 1,000,000-view host heap and the title asks for 1,245,184 slots, so the warning fires.title slot past the host heaplinesThe 531,904 lines all come from one ~2.3 s burst at startup, one per slot from 713,280 to 1,245,183, all with
for_draw=false. With this PR that's one line, and the log stays readable.One thing I first suspected but disproved: the stack overflows logged in every run happen with or without this PR. They're unrelated, and I'm tracking them separately.
AI-assisted (Claude); measured on my machine, no game data shared.
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.