Diagnostics: trace command-list waits and memory write progress #1251
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!1251
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1251/head"
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?
@LaunchDoesntCode on GitHub · 2026-11-24 16:47 UTC · original
diagnostics/trace-command-list-memory-waits→main· +48 −5 · 4 files · 1 commits · closed without mergingWhich list will produce the value a command list is waiting for, and how far did that write get? This adds opt-in diagnostics for the 32-bit masked and 64-bit wait requests, queue fence calls, and the lifecycle of a constant-value write on a host command list. The existing wait behavior is unchanged.
Enable
VICTORY_LOG=info,victory_gpu::sync_wait=trace,victory_gpu::sync_write=tracein a diagnostics build. Match the guest memory address, value and width to the requested comparison. For the producer, follow the same host list and write acrossrecorded,submitted(after the D3D12 execute call, with its submission fence), andstored(after writing the guest bytes). Timestamp writes are excluded.In a Windows WARP loading trace on an integrated playtest build, 42 of 43 addresses in the final wait set had an exact-value producer recorded. None of those producers had been submitted after recording the write when the title stopped. A later run with a separate copyback optimization completed three expected writes and both texture readbacks, then lost the software graphics device. These observations distinguish a pending producer from a device failure and do not establish playable world rendering.
On this standalone branch based on
ffe310e, a WARP run produced a wait event and the same constant write at all three stages in order. The diagnostics GPU suite passed 53 tests with one ignored. Workspace Clippy with all targets and features, the default workspace check with all targets, and the asset-policy check passed.Related to #1023, which implements ordered waits. The trace can be used to validate its producer ordering separately.
@Zipettte on GitHub · 2026-11-24 17:59 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
17a15da:cargo test -p victory-gpupasses, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 01:20 UTC · original
Automated triage for the maintainers.
Needs work. The tracing is useful and compiled only with the
diagnosticsfeature. Thetrace_value_writecalls inHost::executeandHostList::defer_writeread correctly, including the per-run grouping whenVICTORY_GPU_TIMINGis set. CI: passing.What needs settling:
crates/victory-gpu/src/list.rs, the sharedwait_valuestub is replaced withwait32, read as(reference: u32, mask: u32, flags: u32), andwait64, read as(reference: u64, flags: u32). The trace output is only as good as that layout, and the PR gives no evidence for it. Please name the source (for example, the title's own call sites). Otherwise, log the arguments under the old signature and leave them unnamed.wait32. Move it so it covers both functions.Generated by Claude Code
Pull request closed