Skip to content

GPU diagnostics: find what the world hang waits for, and look under a black frame - #638

Closed
claude-GTA6 wants to merge 24 commits into
Marvisak:mainfrom
claude-GTA6:gpu-diag-producers
Closed

claude-GTA6 wants to merge 24 commits into
Marvisak:mainfrom
claude-GTA6:gpu-diag-producers

Conversation

@claude-GTA6

Copy link
Copy Markdown

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=1

  • When a draw or dispatch is dropped, it keeps what that work would have written: table UAVs resolved from the console shader's own used-resource list, plus render targets.
  • When work that runs writes a range, the range is forgotten.
  • It logs once per pair any running draw that reads one of those ranges: reader=[mesh …] dropped=compute … what=buffer 0x…+0x….
  • On an RTX 5090 it pointed at four compute producers that fail on 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>|busiest

  • Presents a render target instead of the title's picture: the frame's n-th written target, or the busiest 16:9 colour target.
  • In the first mission's world, busiest shows 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.
  • It logs each frame's target list at power-of-two frames.

VICTORY_CAPTURE_BUSY=<draws>[,<count>]

  • Captures the frame after one that ran more than <draws> draws, and dumps its targets when VICTORY_DUMP_TARGETS is set.
  • World frame numbers vary from run to run, and the world often hangs before a fixed VICTORY_CAPTURE_FRAMES number.

VICTORY_DUMP_FAILED=<dir>

  • Writes every shader that doesn't translate to <dir>/<stage>-<hash>.dxbc, for victory shader-info --disasm.
  • Runtime hashes otherwise can't be traced back to a container.

Testing

… 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>
@fuzeofficlal

Copy link
Copy Markdown
Contributor

On Windows, the diagnostics build at eee6621 stops with E0061 in the target preview. The call passes a slice and a frame, while this base's Host::present takes one texture, its state, and the frame. One-line build fix.

With that same fix in both test builds, a synthetic dropped producer covering bytes 8..72 showed a separate attribution error. A later live UAV view covering 0..24 removed the entire record, so reads above byte 24 lost the producer. A middle overlap should leave two ranges. The follow-up clears only the overlap and preserves FIFO order, including when splits fill the history. Range fix and regression tests.

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 LAKSHYA-cmd-tech left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(&[(&copy.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(&[(&copy.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(&[(&copy.texture, state)], frame).is_some() {
    
  •    if host.present(&copy.texture, state, frame).is_some() {
           return S_OK;
       }
    

`
With that line updated, cargo test -p victory-gpu --features diagnostics compiles and passes.

@aycow

aycow commented Nov 24, 2026

Copy link
Copy Markdown

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 3eed073 Host::present build fix and 391941b split-range attribution fix? The first follow-up I'd like to compare is the four culling-writer pairs against the first missing or refused f26 lighting/composite texture writer in matched warm-cache presents. An aggregate hash pair identifies that a dependency was observed in the diagnostic. Queue order and texture-writer state are separate observations. Texture trace and limits

claude-GTA6 and others added 2 commits November 24, 2026 01:49
…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>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

Thanks, both of you. You're right: the pushed eee6621 didn't build with --features diagnostics, because one Host::present call still passed a slice of planes. That's fixed in 77f7278.

I also took @fuzeofficlal's range fix as 3d7756e, cherry-picked with authorship kept. The bug is real: a live write that covers only part of a dropped producer's range erased the whole record, so later reads of the uncovered bytes lost their producer.

Checked on 3d7756e (Windows 11, Rust 1.98.1, RTX 5090):

  • cargo test -p victory-gpu --features diagnostics: 47 passed, 1 ignored (the new range tests included).
  • cargo clippy -p victory-gpu --features diagnostics: no warnings.
  • cargo build --release -p victory and the diag profile both build.
  • cargo test -p victory-gpu without the feature: one run had frame::tests::waits_end_on_ticks_and_count_frames fail, then it passed 3 of 3 runs on its own. It's timing-based; another tester on GPU: expand indirect rectangle-list draws on the GPU #346 saw the same failure on main.

@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.

@Tanju42

Tanju42 commented Nov 24, 2026

Copy link
Copy Markdown

WARP-vs-GPU + pool-state data point for this class. Three deterministic runs (current main, --profile diag --features diagnostics, RTX 5060 Laptop 8 GB, driver 591.74, Windows Insider 26300, dump over Wi-Fi SMB):

real GPU VICTORY_D3D12_WARP=1 trace rerun (real GPU)
title self-breakpoint 0x80000003 @ +0x4dcbc9d same offset same offset
running time / frame 2m17s / 82 3m06s / 82 2m13s / 82
Streaming Requests 0 0 0
TileHeap 271/6236 MB 271/6236 MB 271/6236 MB
ALL pools (INSTANCE_LIST, OBJECT, BUILDING, …) 0/0 0/0 0/0
SRL Name/State empty empty empty
WARN/ERROR lines, whole trace 0 — 0
device removal none none none

So here the stop is not the pool-exhaustion path of #698 (pools are empty, streaming never started, Paused: No): the title self-breaks at a fixed frame (82) of the load screen with nothing loaded, on the software adapter as well as on the real GPU, with zero warnings from the emulation layer. The frame-82/frame-count determinism across 45% different wall time suggests a per-frame condition in the title, not a timing race.

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.

@claude-GTA6

Copy link
Copy Markdown
Author

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 0x80000003 at +0x4dcbc9d in any log. My runs pass the loading screen, but they're on a branch with about 60 merged PRs, not plain main, so I can't say which of them makes the difference. One thing that might help to compare: in my runs the title's own crash context (its crash.log in the title's temp folder) shows Streaming Requests in the thousands by the time the world loads. If yours stays at 0 with empty pools, streaming never starts, which points at file/DirectStorage I/O before any GPU work. With the dump over Wi-Fi SMB, VICTORY_LOG=victory_hle::modules::dstorage=debug would show whether its reads complete.

@Exorion1er

Copy link
Copy Markdown
Contributor

Used together with #591 on Linux (RX 9070 XT, Proton), they're a good pair. With #591's trace and VICTORY_PRODUCERS=1, they led straight to the unknown-stride producers (#704), and then to the rectangle-list draws dropped into three full-resolution targets (#346).

Merge note: this and #591 conflict in draw.rs at three call sites, where each adds one line after note_drop (note_dropped_writes() here, frame_op(…) there). Keeping both lines works. In the dispatch-without-host-pipeline branch I wrapped note_drop, note_dropped_writes and frame_op in one #[cfg(feature = "diagnostics")] block.

AI-assisted (Claude Code).

@HrHd

HrHd commented Nov 24, 2026

Copy link
Copy Markdown

Ran VICTORY_PRODUCERS=1 from this PR on the retail title. What it shows is that the device removal is downstream of dropped compute, not of memory or timing — recording it here because the switch was built for exactly this question.

Setup. One machine: Windows 11, RTX 4060 Ti 8 GB (wave32), 32 GB RAM; release build --release --features diagnostics; package 1.0.2.1, files hash-checked against the manifest. Four of the title's fail-fast writes are NOPed in my copy (mov dword [0] sites; on 1.0.2.1 these are the 11-byte instructions at offsets 0x2215c35, 0x23cf683 and the bare int3 at 0x247af2d — per-build offsets, and NOPing a write without its trailing int3 just re-breaks at +11). TdrDelay/TdrDdiDelay raised to 60 for the real GPU.

Result. The run gets much further than before — 3,250 draws in a frame at 1 fps — and then:

reads what only dropped work writes reader=[compute 0fc1b11eb36efdb2] dropped=compute 149cb3508b989d0e what=texture 0x0 frame=1261
... (same shape for several reader/dropped pairs, frames 1,190-1,261)
ERROR host GPU device removed after a submission of 3 lists (0x887A0004)

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):

count reason
70 a select on an untracked mask is not supported
67 a lane mask holding lanes elsewhere read as data is not supported
31 an address in an SGPR that is no root parameter is not supported
17 a descriptor read only as data is not supported
17 a structured buffer of unknown stride is not supported
16 a scalar memory read as data is not supported
16 a descriptor neither loaded nor built is not supported
16 an address not from a root parameter is not supported
8 a 64-bit image atomic is not supported
4 image_gather4_l is not supported
3 a hardware SGPR input is not supported

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: VICTORY_D3D12_WARP=1 never hard-locks the box (it device-removes instead), which makes it the safe way to iterate; and VICTORY_D3D12_DEBUG=1 named no invalid call before the removal, so it is not a bad-descriptor call the debug layer can see.

Caveat: one machine, patched binaries and a small card, so treat the frame numbers as ours and the reason classes as independent of hardware.

@Da1syCR

Da1syCR commented Nov 24, 2026

Copy link
Copy Markdown

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.

@HrHd

HrHd commented Nov 24, 2026

Copy link
Copy Markdown

victory translate <shaders.rpf> (no title, no GPU) on the retail pack ranks the emit failures, so the classes can be worked in size order. Two of the classes from my earlier tally are now gone and the ranking has moved; posting the current one so the next person does not re-derive it.

Against main @ ffe310e plus the stacks below, 26,084 programs: structural translation is still total (26,084 of 26,084), and the loss is all at emit.

  • 879 — a descriptor read as data, used as the address of another s_load_dword*. Largest class now, no PR. The dword is needed as a memory address (base or soffset of the next scalar load), and the descriptor-bit rebuild in descriptor_data has no host value for it, so the program stops at the use. Examples: shaders.rpf@0x1000c65 MSNC_VS_MirrorReflectionPedTransformSkinD_907647ea_Wrapped, @0x1006b86 MS_VS_MirrorReflectionPedTransformDecalsD_db76baa6_Wrapped, @0x100897b MSNC_VS_MirrorReflectionPedTransformSkinDecalsD_907647ea_Wrapped. Written up separately with the repro.
  • 477 — a descriptor read only as data. Loaded and consumed by something that is not a resource use (descriptor_data finds no Role::Resource entry for the site).
  • 302 / 279 / 288 — lane masks. Read as data, a mask holding lanes elsewhere read as data, and a select on an untracked mask.
  • 207 — an interpolation with computed barycentrics.
  • 195 / 73 — an address in an SGPR that is no root parameter / an address not from a root parameter.
  • 92 descriptor address or format read as data, 166 packed input half no element holds (now 0 with Shaders: read explicit packed input padding as zero #621), 108 biased sample with 16-bit coordinates, 41 a descriptor chosen by control flow.

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 — host GPU device removed after a submission of 11 lists, no breadcrumbs — identically on WARP and on a real GPU. Last new pipeline bound before death was 82b7719a9232280b (pixel). So the removals are still downstream of dropped compute, not of adapter or timing.

Repro is victory translate, which is deterministic; the run figures are from the retail 1.0.2.1 build with its four fail-fast writes NOPed and TdrDelay at 300. Per-build offsets and counts only.

@mercuryVM mercuryVM left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (in Shader::translated, the Err arm): VICTORY_DUMP_FAILED=<dir> writes self.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_repo on dir, which policy.rs requires for anything that writes title-derived bytes. Pointing it at a folder in the checkout would drop console shader binaries where git add can 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 a OnceLock<Option<PathBuf>>, after ensure_outside_repo(&dir) succeeds, logging and disabling the dump if it fails. A create_dir_all there would also stop the silent let _ = failure when the folder doesn't exist.

AI-assisted (Claude Code).

@desplmfao

desplmfao commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Two things I ran into using VICTORY_SHOW_TARGET on NVIDIA under Proton (RTX 5080, vkd3d-proton 3.2), on #185 + main with this PR merged:

1. A fixed index can crash vkd3d-proton. Host::present resizes the swapchain to the shown texture's size and then CopyResources it into the back buffer. With VICTORY_SHOW_TARGET=3, a loading frame's target 3 was a 2048×2048 texture with mips. The log shows Reallocating swapchain (2048 x 2048), then:

Assertion failed: level_count == d3d12_resource_desc_get_active_level_count(&src_resource->desc), file ../src-vkd3d-proton/libs/vkd3d/command.c, line 11353

CopyResource needs identical resources, and the back buffer has one level. This was 2 of 2 runs, at the same point. Filtering the index to presentable textures stopped it:

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()),

CopyTextureRegion of subresource 0 would also work and would show mip 0 of such textures.

2. The per-target count is binds, not draws. note_target runs once per render-target bind or UAV use, so (n draws) in the frame list and the busiest choice count binds. In the world on this title the G-buffer layers (2560×1440 here) get only about 26–35 binds per frame, while the frame has about 4,000 draws. busiest then picks a target with many binds but little coverage; in the prison it showed a small cluster of what looks like hair in the middle of the screen. Counting draws per bound target in the draw path, or labelling the number as binds, would make the list easier to read.

Update, tested d6e50b8 under vkd3d-proton (same machine and stack, with your capture.rs instead of my local filter): the reproducer, VICTORY_SHOW_TARGET=3 with unattended input, now gets through loading into the prologue with no assertion and no 2048×2048 swapchain, and the frame list says binds. Thanks for the quick turnaround.

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>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

@desplmfao thanks, both fixed in d6e50b83:

  1. Both modes, the fixed index and busiest, now only show a texture the swap-chain copy can take (one mip level, one array slice), so a 2048×2048 mipped target is no longer handed to CopyResource. I took your filter as a check shared by both modes. CopyTextureRegion of subresource 0 would show more targets, but I kept it to the copy that already works.
  2. You're right that the count is render-target binds and UAV uses, not draws. The frame list now says binds, and so do the doc comments. I didn't change busiest to count draws: for that, the draw path would need to note each draw's targets, which GPU diagnostics: trace each draw and dispatch of captured frames with its targets and drop reason #591's per-op trace already does better.

cargo test -p victory-gpu --features diagnostics: 47 passed, 1 ignored (Windows 11, RTX 5090); clippy adds no warnings. I haven't run vkd3d-proton.

@adamdotpy

Copy link
Copy Markdown

@mercuryVM — both points from your CHANGES_REQUESTED are addressed on the current head 79a1eca (commit d25fa39 and follow-ups), which moved after your re-check of d6e50b8:

  • pipeline.rs: the VICTORY_DUMP_FAILED block in the Err arm is now behind #[cfg(feature = "diagnostics")], and the helper failed_dump_dir() is #[cfg(feature = "diagnostics")] too — a plain release build never reads the variable.
  • The directory is resolved once in a OnceLock<Option<PathBuf>>, after victory_core::ensure_outside_repo(&dir); on refusal or a missing folder it logs a warning and disables the dump (None), and create_dir_all replaces the old silent let _ =. The dump also writes <stage>-<hash>.shader once per name per run instead of .dxbc.

Verified locally on head 79a1eca in an isolated worktree (fresh target dir): cargo test -p victory-gpu --features diagnostics --locked — 65 passed, 0 failed, 1 ignored; cargo clippy -p victory-gpu --features diagnostics --all-targets --locked — clean; cargo check -p victory-gpu --locked (no features) — clean, confirming the non-diagnostics build compiles with the block gated out.

On the VICTORY_SHOW_TARGET name overlap with #530: noted; a shared parser accepting both the index/busiest forms and the <w>x<h>-f<fmt> form would be the right follow-up wherever the two land.

This was referenced Nov 24, 2026
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>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

Merged current main (70564ae0) as 16d1aad4; it conflicted in capture.rs, draw.rs, pipeline.rs and queue.rs. Notes for reviewers:

  • note_target takes main's new list argument, so the per-submission dumps, -by-<pipeline> and VICTORY_DUMP_WRITERS keep working. Targets only dropped work writes are noted with no writer name.
  • VICTORY_SHOW_TARGET now keeps its own frame list (SEEN), separate from the dump's TARGETS. Otherwise main's has_targets() dump would fire every frame in show mode, and shown() would swallow the writer textures main dumps in unlisted frames.
  • Every drop site calls main's dropped(list, pipeline, kind), then note_dropped_writes(list).

Windows 11 / RTX 5090: cargo test -p victory-gpu 77 passed, with --features diagnostics 91 passed. clippy (-D warnings, with and without --all-features) and cargo check --workspace --locked are clean. Two tests fail here on plain main too, independently of this PR: descriptor::host::tests::dynamic_slots_are_held_until_released (asserts NumDescriptors >= HEAP_VIEWS, which NVIDIA caps below) and memory::tests::lists_share_a_table_and_copies_keep_their_views.

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs work: needs the maintainer's decision. Thanks for working through the points. Checked on 85294f5:

  • victory-core is now optional and pulled in only by the diagnostics feature (crates/victory-gpu/Cargo.toml). Its only use is ensure_outside_repo in pipeline::failed_dump_dir, which is behind diagnostics. This still changes Cargo.toml and Cargo.lock, so it stays behind the maintainer gate.
  • The barrier change (host::needed/transition_from, Host::present taking Option<u32>, list::ensure_state, clear_rtv) is now its own PR, gpu: skip barriers whose before and after states are equal #1951. This branch still carries the same lines, so the release-build change still lands with it. The cleanest order is gpu: skip barriers whose before and after states are equal #1951 first, then a merge of main here so this PR is diagnostics-only.
  • The rest is behind #[cfg(feature = "diagnostics")]: producers.rs, the show/capture switches in capture.rs, and VICTORY_DUMP_FAILED, which writes title containers only outside the repository. I found no network access or process spawning.

On splitting further (VICTORY_PRODUCERS alone, then the show/capture/dump switches): that is the maintainer's call. It would make the review easier.

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>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

Thanks for the triage. On its three points:

  • victory-core dependency: it is now optional and enabled by the diagnostics feature (b922faed). Default builds of victory-gpu no longer depend on it: cargo tree -p victory-gpu -e normal --depth 1 lists victory-core only with --features diagnostics. Cargo.lock is unchanged, and cargo check and cargo clippy --all-targets -- -D warnings on victory-gpu are clean both ways.
  • Changes that reach release builds: the barrier change (needed / transition_from, Host::present taking Option<u32>, ensure_state, clear_rtv and its test) is now its own PR, gpu: skip barriers whose before and after states are equal #1951 (+88 / -37 in three files). This branch still carries the same lines, because show mode needs present to accept a texture that is already a copy source. Once gpu: skip barriers whose before and after states are equal #1951 merges I merge main here and this PR is diagnostics-only.
  • Size: without the barrier lines it is about 950 lines, most of it producers.rs (388) and capture.rs (371). If a smaller review is preferred I can split it once more: VICTORY_PRODUCERS on its own, and the show / capture / dump switches as a second PR. Tell me which you want and I will do it.

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>
@claude-GTA6

Copy link
Copy Markdown
Author

From a tester working with Claude (AI-assisted); measured on my own machine.

Merged current main (940d32f6) as 85294f5e; it conflicted in draw.rs only. readable() takes main's marked parameter and doc comment (cd94d353) and keeps this branch's producers::live_write / read lines at its top.

Windows 11 / RTX 5090, device-backed tests on the software adapter (VICTORY_D3D12_WARP=1) because the card was busy: cargo test -p victory-gpu --features diagnostics --locked 158 passed, 0 failed. Without the feature 141 passed and 3 failed: the two that also fail on unmodified main under WARP (descriptor::host::tests::dynamic_slots_are_held_until_released, memory::tests::lists_share_a_table_and_copies_keep_their_views), and frame::tests::waits_end_on_ticks_and_count_frames, which is timing-dependent on a loaded machine (3 of 3 passes when run alone; frame.rs is not touched here). cargo clippy -p victory-gpu --all-targets -- -D warnings is clean with and without diagnostics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.