Device-method slot interface names + exit-time call summary (on top of #376) #495
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!495
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-495"
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?
@ZaneIceMaster11 on GitHub · 2026-11-25 01:35 UTC · original
ZaneIceMaster11:feature/device-method-interface-names→main· +220 −17 · 7 files · 2 commits · openDepends on #376 (VICTORY_SHADER_DIAG) - this diff includes that PR's changes too since GitHub won't let a PR target a branch that only exists on the fork. Once #376 merges this will shrink to just
device.rs/lifecycle.rs.What this adds
Addresses a review comment on #376: when a slot number is in the detail field, name the resolved D3D12 interface too, and add a per-slot total at process exit next to the running per-call counter.
Interface resolution
Computed exact PC vtable slot boundaries for IUnknown through ID3D12Device4 directly from the pinned
windows0.62.2 crate source (counting eachID3D12DeviceN_Vtbl's fields, accounting for how windows-rs keeps feature-gated fields at a fixed slot with a dummy type rather than removing them - confirmed this by reading the actual generated vtable structs, not assuming). Deliberately hedged pastID3D12Device4(slot 56): this module's own doc comment already says the title's vtable only matches PC order until "console additions follow", and I found that boundary is demonstrably at or before Device5 - the file's existing hand-written comment claims Device5/Device8 each add 9 methods, but the pinned crate has 8 and 5. Both slots this project actually hits (0x1c8,0x218) are past that boundary, so they now report"ID3D12Device5-or-later, console layout may diverge from PC here"rather than a wrong confident name - a bad guess here would be worse than the honest uncertainty.Exit summary
unknown_pipeline's per-monomorphizationstatic CALLS: [AtomicU32; 2](a separate array per const-genericSLOT, despite looking shared) became one module-levelMutex<BTreeMap<usize, u32>>both instantiations write into, soreport_unimplemented_calls()can summarize every slot at once. Called fromlifecycle::end()next to the existing pipeline-cache save, since the process terminates viaTerminateProcessthere (noatexit/normal shutdown runs).Verification
Real run (Series X, opening cutscene, no crash): exit summary printed exactly as designed, matching the live per-call counters seen during the run (
slot=0x1c8 calls=25450,slot=0x218 calls=2689). Build, clippy (-p victory-gpu -p victory-hle --all-targets --release --features diagnostics), and tests (213, both crates) all clean.Co-authored with Claude Code (Claude Sonnet 5).
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.