GPU: the frame line splits a heap sync's slots by outcome #3233
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!3233
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3233"
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?
@Jackster on GitHub · 2026-11-26 14:03 UTC · original
Jackster:gpu/mirror-outcomes→main· +80 −2 · 2 files · 3 commits · openThe frame line reports the time a heap sync takes and the slots it looks at, but not what it does with them. On the world's frames a sync looks at ~400,000-600,000 slots and mirrors ~160,000 of them; which of those get a view, which are already current and which name nothing decides whether a change to the sync can help — batching (#3139) only gains where many slots are unchanged — and today it can only be guessed.
This splits the clause. Measured line from a 300 s world run of the retail title on
main(63bcca4), diagnostics build:HostHeap::mirrorcounts what it does with a slot, on every path it can take:later), which creates nothing.prepare.The outcomes sum to the calls by construction (
made + deferred + current + nulled + empty + past == mirrors), which the two samples above show exactly: 64,340 + 828 + 74,847 + 21,877 = 161,892. That invariant is the property the first version of this change lacked, and it is why the counters are now reported against the mirror calls rather than against the sync's slot count:mirroralso runs from descriptor writes, table binding andmake_read, so only the call count is a valid denominator.What it shows
In this run 68% of the views made are "other" — constant buffers and memory views — not textures (already made lazily on their read marks) and not the per-page scan. That is the number to look at before changing the sync.
Cost and behaviour
No runtime change: the counters and the two predicates they use are
#[cfg(feature = "diagnostics")], and the enum's length is now asserted by construction (COUNTERSis the exact variant count, so a counter added without its slot fails to compile rather than reading past the array).Testing
cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warningscargo build --release -p victory --features diagnosticsNo game data is included in this PR.
Written with an AI assistant.
@Dukestar69 on GitHub · 2026-11-26 14:07 UTC · original · approved these changes
Verified on RTX 5090 against
origin/main(63bcca4):cargo test -p victory-gpu --lib descriptor::host:: -- --test-threads=1 --skip dynamic_slots_are_held_until_released: 14/14 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings&--features diagnostics: clean.cargo xtask policy: 191 files ok.Cleanly splits heap-sync slot counts by outcome in the frame summary line.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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.