Repository navigation
GPU diagnostics: find what the world hang waits for, and look under a black frame - #638
claude-GTA6 wants to merge 24 commits into
Conversation
… black frame Four diagnostics-build switches: - VICTORY_PRODUCERS=1: when a draw or dispatch is dropped, keep what it would have written (its table UAVs, resolved from the console shader's own used-resource list, and its render targets); forget a range when work that runs writes it; log once per pair a running draw that reads one: reader, dropped writer, what. Points at the shaders a stalled pass waits on. - VICTORY_SHOW_TARGET=<n>|busiest: present the frame's n-th written target, or the busiest 16:9 colour target (a G-buffer layer in the world), instead of the title's picture; target lists are logged at power-of-two frames. - VICTORY_CAPTURE_BUSY=<draws>[,<count>]: capture (and with VICTORY_DUMP_TARGETS dump) the frame after one that ran more than <draws> draws: world frames, whose numbers vary run to run. - VICTORY_DUMP_FAILED=<dir>: keep each shader that does not translate, for victory shader-info --disasm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
On Windows, the diagnostics build at With that same fix in both test builds, a synthetic dropped producer covering bytes The Windows app passed the diagnostics build check. The diagnostics GPU suite reported 47 passed and one benchmark ignored. This verifies descriptor-range bookkeeping with synthetic data. |
LAKSHYA-cmd-tech
left a comment
There was a problem hiding this comment.
Review: compilation error E0061 in queue.rs under --features diagnostics
Tested on Windows 11 with Rust 1.98.1 (x86_64-pc-windows-msvc).
1. Compilation Error
Running cargo test -p victory-gpu --features diagnostics fails to compile:
ext error[E0061]: this method takes 3 arguments but 2 arguments were supplied --> crates\victory-gpu\src\queue.rs:291:17 | 291 | if host.present(&[(©.texture, state)], frame).is_some() { | ^^^^^^^ ----- argument #2 of type u32 is missing | note: expected &ID3D12Resource, found &[(&ID3D12Resource, u32); 1] --> crates\victory-gpu\src\queue.rs:291:25 | 291 | if host.present(&[(©.texture, state)], frame).is_some() { | ^^^^^^^^^^^^^^^^^^^^^^^^^ note: method defined here --> crates\victory-gpu\src\host.rs:1580:19 | 1580 | pub(crate) fn present(&self, texture: &ID3D12Resource, state: u32, frame: u64) -> Option<bool> {
2. Suggested Fix
In crates/victory-gpu/src/queue.rs:291, Host::present takes (&self, texture: &ID3D12Resource, state: u32, frame: u64):
`
ust
-
if host.present(&[(©.texture, state)], frame).is_some() {
-
if host.present(©.texture, state, frame).is_some() { return S_OK; }
`
With that line updated, cargo test -p victory-gpu --features diagnostics compiles and passes.
|
The distinct dropped-compute → buffer-reader links in #638 complement our existing submit-order texture lineage from the normal presentation source. #591 already covers detailed draw and dispatch refusals, and #530 has the target preview. I'll use those pieces for their respective parts of the trace. Could the next #638 revision incorporate the contributor's existing |
…t signature The diagnostics build stopped with E0061: one call still passed a slice of planes. Reported by LAKSHYA-cmd-tech and fuzeofficlal in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
From a tester working with Claude (AI-assisted); measured on my own machine. Thanks, both of you. You're right: the pushed I also took @fuzeofficlal's range fix as Checked on
@aycow: agreed on the split with #591 and #530. Comparing the culling-writer pairs against the first missing f26 writer is the next thing I'm measuring. |
|
WARP-vs-GPU + pool-state data point for this class. Three deterministic runs (current
So here the stop is not the pool-exhaustion path of #698 (pools are empty, streaming never started, A trace-side hint about what the title is waiting for at that frame (its own view of the load progress — e.g. which async request it expects an answer to) would short-circuit a lot of bisecting on our side. Happy to record anything specific (a known frame window, a specific counter, an env flag). No game data in this report. AI-assisted; all numbers measured on my machine. |
|
From a tester working with Claude (AI-assisted); measured on my own machine. @Tanju42 I can't tell you what the title waits for at frame 82; I haven't seen that stop. In more than 50 runs on an RTX 5090 (same title build, 1.0.2.1) I have no first-chance |
|
Used together with #591 on Linux (RX 9070 XT, Proton), they're a good pair. With #591's trace and Merge note: this and #591 conflict in AI-assisted (Claude Code). |
|
Ran Setup. One machine: Windows 11, RTX 4060 Ti 8 GB (wave32), 32 GB RAM; release build Result. The run gets much further than before — 3,250 draws in a frame at 1 fps — and then: So the world's frames are chained through compute that does not translate; its output textures are never written, the next dispatch reads one, and the next submit removes the device. On 8 GB it is deterministic at about frame 1,260; the same chain on a 16 GB card showed as a black frame rather than a removal in the reports I have seen. What fails to translate, tallied over the run (390 failures, reasons are the converter's own strings; counts only):
137 of the 390 are the two lane-mask classes, so this is mostly confirming where the control-flow work is already aimed — but the consequence is sharper than "missing visuals": a dispatch that reads a producer's texture turns the drop into a device removal. Two side notes that may be useful: Caveat: one machine, patched binaries and a small card, so treat the frame numbers as ours and the reason classes as independent of hardware. |
|
I tested VICTORY_SHOW_TARGET=busiest on a GeForce RTX 2070 (driver 32.0.15.9649, Windows 11 Pro build 26200). I could see some 3D geometry from the opening cutscene in the preview. I couldn't identify the exact render target from the log. The diagnostic build was based on d2a4bae with #493, #189, #206, and #638 (3d7756e). I also applied a local change that restricts the preview to textures compatible with the swap-chain copy and skips redundant COPY_SOURCE transitions. |
|
Against
What removed classes, so it is not duplicated:
The stack also changes the runtime picture: with the waterfall series, #704, #539, #621 and #233 merged, a run reaches 5,569 draws/frame (3,066 without #233) and then dies at the first bind of a new pipeline — Repro is |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 3d7756e on Windows 11, RTX 5070, MSVC: cargo test -p victory-gpu -- --test-threads=1 43 passed, and with --features diagnostics 47 passed. Clippy's 1 warning is the existing one in host.rs. I didn't run a title here, so the switches themselves aren't exercised.
The producers, show-target and capture-busy switches are behind cfg(feature = "diagnostics") as described. One isn't, and it writes title data:
pipeline.rs:128(inShader::translated, theErrarm):VICTORY_DUMP_FAILED=<dir>writesself.container, the title's own shader container, to<dir>/<stage>-<hash>.dxbc.- It isn't under
#[cfg(feature = "diagnostics")], so it is compiled into release builds too. That contradicts "Release builds are unchanged". - It doesn't call
victory_core::ensure_outside_repoondir, whichpolicy.rsrequires for anything that writes title-derived bytes. Pointing it at a folder in the checkout would drop console shader binaries wheregit addcan pick them up. The other dump switches (VICTORY_EMIT_DUMP, capture, dump paths) check this. - Fix: gate the block with
#[cfg(feature = "diagnostics")]and resolve the directory once, e.g. in aOnceLock<Option<PathBuf>>, afterensure_outside_repo(&dir)succeeds, logging and disabling the dump if it fails. Acreate_dir_allthere would also stop the silentlet _ =failure when the folder doesn't exist.
- It isn't under
AI-assisted (Claude Code).
|
Two things I ran into using 1. A fixed index can crash vkd3d-proton.
Show::Index(n) => targets
.get(n)
.filter(|(_, c)| {
// SAFETY: a live resource.
let d = unsafe { c.texture.GetDesc() };
d.MipLevels == 1 && d.DepthOrArraySize == 1
})
.map(|(_, c)| c.clone()),
2. The per-target count is binds, not draws. Update, tested One side effect with a fixed index: in frames where target 3 isn't presentable, the title's own picture is shown instead, at a different size. The swapchain then gets reallocated back and forth, 18 times each between 2560×1440 (the target) and 3840×2160 (the title's picture) in the first minutes. That costs a reallocation each time and reads as flicker. Keeping the last presentable target in those frames, or scaling into a fixed-size back buffer, would avoid it. AI-assisted (Claude Code). |
…in copy can take, and counts binds as binds A fixed index could pick a texture with mips or array slices, and CopyResource into the one-level back buffer is invalid (vkd3d-proton asserted). Both modes now only show one-level, one-slice textures. The per-target count is of render-target binds and UAV uses, not draws: the frame list and the docs say so. Reported by desplmfao in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
From a tester working with Claude (AI-assisted); measured on my own machine. @desplmfao thanks, both fixed in
|
|
@mercuryVM — both points from your CHANGES_REQUESTED are addressed on the current head
Verified locally on head On the |
Conflicts: - capture.rs: listed() keeps upstream's VICTORY_CAPTURE_WORLD frames and this branch's VICTORY_CAPTURE_BUSY frame. note_target takes upstream's list argument (per-submission dumps, -by-<pipeline>, VICTORY_DUMP_WRITERS); note_unwritten takes it too and notes with no writer, so dropped work is neither labelled as a pipeline's write nor matched by VICTORY_DUMP_WRITERS. VICTORY_SHOW_TARGET now keeps its own list (SEEN) apart from the dump's TARGETS, so show mode neither takes the VICTORY_DUMP_WRITERS textures upstream dumps in unlisted frames nor makes has_targets() dump every frame; binds, busiest, latch and repick are unchanged. - queue.rs: note_busy, then shown(), then upstream's presented() and its listed-or-has_targets dump. - pipeline.rs: upstream's Shader::new gains the diagnostics native field; the failed-translation warning keeps upstream's timing fields and this branch's VICTORY_DUMP_FAILED dump; both sides' helper functions kept. - draw.rs: upstream's dropped(list, pipeline, kind) at every drop site, each followed by note_dropped_writes(list), which now passes the list to note_unwritten; the indirect paths keep upstream's note_op lines; the bind keeps set_reader next to upstream's capture::binding and heap code. The dispatch whose bind fails, a drop site upstream added, notes its dropped writes too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
From a tester working with Claude (AI-assisted); measured on my own machine. Merged current
Windows 11 / RTX 5090: |
|
Automated triage for the maintainers. Needs work: needs the maintainer's decision. Thanks for working through the points. Checked on 85294f5:
On splitting further ( CI: not run. Generated by Claude Code |
victory-core is used for ensure_outside_repo by VICTORY_DUMP_FAILED alone, and that switch exists only in diagnostics builds. The dependency is now optional and enabled by the diagnostics feature, so default builds of victory-gpu no longer depend on it. Cargo.lock is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
From a tester working with Claude (AI-assisted); measured on my own machine. Thanks for the triage. On its three points:
|
Conflict: - draw.rs: readable() takes upstream's `marked` parameter and doc comment (cd94d35) and keeps this branch's producers::live_write / read lines at its top. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
From a tester working with Claude (AI-assisted); measured on my own machine. Merged current Windows 11 / RTX 5090, device-backed tests on the software adapter ( |
…userdata-440-111a HLE: ignore WM_COMMAND until xgameui dialog entry is stored (Marvisak#440)
From a tester working with Claude (AI-assisted); measured on my own machine.
These are diagnostics-only switches I used to chase the NVIDIA world hang (#71) and the black world. Release builds are unchanged.
Switches
VICTORY_PRODUCERS=1reader=[mesh …] dropped=compute … what=buffer 0x…+0x….a lane-mask join of an untracked mask, whose outputs mesh and compute passes read across the frame. Details in NVIDIA RTX 5070 Ti: world hang (DEVICE_HUNG) on 97c78d1 is not one program, not loops, not barriers; 77 compute pipelines refused #71.VICTORY_SHOW_TARGET=<n>|busiestbusiestshows the G-buffer: power lines, poles, a fence, signs and people in false colour. That shows the world is partly drawn under the black picture. The ground and buildings are missing because their mesh shaders don't translate.VICTORY_CAPTURE_BUSY=<draws>[,<count>]<draws>draws, and dumps its targets whenVICTORY_DUMP_TARGETSis set.VICTORY_CAPTURE_FRAMESnumber.VICTORY_DUMP_FAILED=<dir><dir>/<stage>-<hash>.dxbc, forvictory shader-info --disasm.Testing
main:cargo build --profile diag -p victory --features diagnosticsand--releaseboth build.cargo test --release -p victory-gpu --features diagnostics: 45 passed. Without the feature: 43 passed.