GPU diagnostics: trace each draw and dispatch of captured frames with its targets and drop reason #591
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/591"
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?
Imported from Marvisak/VIctory. Originally posted by ghost on 2026-11-24T05:14:59Z.
What
With
VICTORY_LOG=victory_gpu::draw=debugand frames listed for capture, every draw, mesh dispatch, indirect execution and dispatch in those frames logs one line:VICTORY_DUMP_TARGETSfile names, so a dumped target can be traced to the work that writes it;ran, orDROPPED:and why: the shader that does not translate,being made, a host pipeline that could not be prepared, or the indirect or dispatch path's own early reason;pipeline::drop_reasongivesnote_drop's reason in words. In listed frames this replaces the existing per-draw debug line, which overlapped it. Diagnostics builds only. It works withVICTORY_CAPTURE_DRAWS(#500).Why
The world's picture is black, but its targets are not all empty. To see which dropped work leaves which target empty, each operation has to be tied to its targets. One world frame on an RX 9060 XT (
d2a4bae+ #135 + #365):7bdefdfde461f6e3(655ExecuteIndirectcalls,image_sample_d_cl, #318).b37565055f2f7d3b(#385) and 194 rectangle-list indirect draws (#346).Dispatches carry no targets here, so their UAV writes are not attributed; their drops are still listed. With #318, #385, #346 and #305 applied, the largest drops in another world frame are about 2,500 compute dispatches of six programs with
an address in an SGPR that is no root parameter(#302/#489).Tested
936c4c7merged with #135, #365 and #500 (mainalone stops before the world),diag, on the title withVICTORY_LOG=victory_gpu::draw=debug,infoandVICTORY_CAPTURE_DRAWS=10000,2. Two world frames logged 8,409 and 7,018 lines (2,534 and 3,344 dropped), 0.5–0.6 KB a line, about 4–5 MB a frame.cargo test --workspace: all pass exceptvictory-shader --lib, which hits the WARP concurrency crash in #181 and passes single-threaded (69/69). Thediagnosticstest build compiles.cargo xtask policypasses. Release builds.main533b7e2merged in andec2e184(a frame line for dispatches #336 drops when a table cannot be made):cargo check -p victory-gpuwith and withoutdiagnostics, clippy-D warnings,cargo test -p victory-gpu --features diagnostics(50 passed),cargo xtask policy. On the title (ec2e184alone, 150 s, frames 60–1100 listed): 46 frame lines, allran, no errors; the new exit did not fire. This build reaches the world, but no world frame was listed.AI-assisted (Claude Code, Claude Opus 5.5); no game data.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T05:21:11Z.
Review: APPROVED
Verified and tested on Windows 11 x64 (D3D12).
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T07:44:59Z.
The #71 capture grouped 115 dropped G-buffer writers under preparation failures. I tested a small follow-up on
936c4c7that gives the indirect preparation exits separate reasons for a mismatched host pipeline kind, a missing index-buffer shadow, and unsupported indirect rectangles. The captured frame line and the drop aggregate use the same reason. If pipeline creation finishes after preparation already returned unavailable, the operation still gets counted with an unavailable-at-prepare reason.The synthetic indirect tests on RTX 5090 and WARP distinguish the wrong-kind and rectangle cases. The no-pipeline control remains counted once on both backends. The missing-shadow and late-readiness paths were checked in source.
Follow-up commit
Imported from Marvisak/VIctory. Originally posted by nullmarsh on 2026-11-24T08:06:54Z.
Merged
main533b7e2into the branch (no rebase, so936c4c7stays as it was). Since #336, a dispatch is dropped whenbindcannot make a table it reads; that exit had no frame line, soec2e184adds one (DROPPED: a table it reads could not be made) and wraps four indirect trace calls the way rustfmt does. Draws already report a failedbindthroughprepare.cargo check -p victory-gpuwith and withoutdiagnostics, clippy with-D warnings,cargo test -p victory-gpu --features diagnostics(50 passed) andcargo xtask policypass. Not re-run on the title since, and that exit has not fired in any run yet.@fuzeofficlal thanks, separate reasons for those three exits would help. Your commit changes
prepare's signature in all builds, not only diagnostics ones, and on top of this branch it now conflicts indraw.rs, where #336 changedprepare, so I'd keep it as its own PR on top of this one rather than fold it in. I can run it on the title once it's up.AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T08:52:13Z.
I rebased the separate follow-up on
ec2e184, including the fallible table binding from #336. The indirect compute and graphics paths now report the table failure as a specific drop reason. The frame line and aggregate count use the same reason, and the direct dispatch diagnosis is preserved.On RTX 5090 and WARP, a synthetic exhausted descriptor heap exercised both indirect table failures. All six indirect cases produced one matching frame line and one aggregate count each. The direct dispatch control still produced its existing diagnosis once.
Source commit
83cc0e4is based on this PR head and ready to use for your offered test.Pull request closed