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

Closed
github-bot wants to merge 24 commits from gh-pr/638/head into gh-pr/638/base
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 06:03 UTC · original
claude-GTA6:gpu-diag-producers → main · +1057 −60 · 10 files · 24 commits · closed without merging

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 #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

  • On main: cargo build --profile diag -p victory --features diagnostics and --release both build.
  • cargo test --release -p victory-gpu --features diagnostics: 45 passed. Without the feature: 43 passed.
  • Used in game on a branch with #233, #439 and #458 stacked.
**@⁠claude-GTA6** on GitHub · 2026-11-24 06:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/638) `claude-GTA6:gpu-diag-producers` → `main` · +1057 −60 · 10 files · 24 commits · closed without merging *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 #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 - On `main`: `cargo build --profile diag -p victory --features diagnostics` and `--release` both build. - `cargo test --release -p victory-gpu --features diagnostics`: 45 passed. Without the feature: 43 passed. - Used in game on a branch with #233, #439 and #458 stacked.
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
A barrier whose states before and after are equal is invalid (debug layer
message 525) and failed the copy list's Close when the target preview showed
a texture left in COPY_SOURCE. The back buffer's barriers are unchanged.
Reported by elamriz in review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Check texture shape before selecting a diagnostic preview target
capture.rs: keep both new tests (swap-copy shape check from #1 and upstream's unorm16/xr-bias decode test).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The switch writes the title's own shader containers. It is now compiled only with the diagnostics
feature, and its folder is resolved once: checked with victory_core::ensure_outside_repo and created,
with the dump turned off and a warning logged if either fails. Write errors are logged too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Missed in 99b6afcc; --locked builds need it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
host_transition already says "nothing to move" with None; folding that
into COPY_SOURCE and re-deriving it in present made the two the same
value. The caller now passes the Option through, and host::needed /
transition_from build a barrier only for a real move, so the dump list,
ensure_state and render-target clears get the same guard.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
shown held TARGETS and HITS while calling GetDesc per target and
searching the hits linearly per target, every frame. Binds are now
counted in a HashMap, both lists are taken (copied for a dump) before
any description is read, and one pass reads each description once for
the log and the pick. The index mode reads only its own target's
description except on logged frames.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The busiest target could differ in size or format on consecutive
frames, and present then resized the swap chain every frame, stalling
the queue. The first pick that passes the filters is now kept (and
logged) until the title releases it, when only the latch holds its host
copy; a later pick may then latch another. VICTORY_SHOW_TARGET=<n> is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
record pruned old frames only when a new drop arrived, so stale writes
could still be logged against a reader; read now prunes first. An
atomic "pending" flag, stored with WRITES locked after every change,
lets read, live_write and live_target return before any lock in the
common case of nothing dropped, and writers are shared Arc<str> so a
matching write no longer clones a String.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
It re-parsed every stage's container and rebuilt its used-resource list
for each dropped draw or dispatch. The list is now cached on the shared
Shader (so every pipeline using that container shares it) and
native_used lends it out instead of returning fresh Vecs and Strings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The dump is the console container as the title passed it, not PC DXBC
bytecode; victory shader-info finds containers in any file by their
magic, so .shader names it without misleading. A set of the names
written keeps a retried failed translation from rewriting the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
read runs once per bound resource per draw; pruning there walked the whole
queue on every read while drops were pending. The frame cannot change within
a frame, so present prunes instead and read only scans. PENDING's relaxed,
before-the-lock check is documented: a read racing a frame's first drop can
log one line late. Suggested by adamdotpy in review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
record pushed after evicting the oldest at the cap, so a duplicate cost an
unrelated entry, and a duplicate kept its first frame, so a writer dropped
every frame aged out between reads. push() now moves a duplicate to the back
with the new frame and evicts only for a new entry. Found by Rezwo in review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The latch kept the first displayable pick, a menu target at frame 2, for the
whole run. Every 64 frames it now gives way to a displayable target bound
more than twice as often (and at least 8 times). Textures that dropped work
would have written through UAVs are noted as preview targets when
VICTORY_SHOW_TARGET is set, so G-buffer layers only dropped pixel shaders
write still appear in the list. Found by neonbyte1 in review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
note_dropped_writes listed a dropped UAV's texture through note_target,
which also counted a bind, so a layer nothing wrote could win busiest and
show an unwritten target. note_unwritten lists it without a bind (an index
or a dump still reaches it), and busiest never picks a target with no
binds. Found by neonbyte1, reproduced by Rezwo, in review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Conflict:

- draw.rs: readable() takes upstream's `marked` parameter and doc comment
  (cd94d353) and keeps this branch's producers::live_write / read lines at
  its top.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:11:03 +00:00
github-bot closed this pull request 2026-11-26 04:11:03 +00:00
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 06:11 UTC · original

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.

**@⁠fuzeofficlal** on GitHub · 2026-11-24 06:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7123672420) 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](https://github.com/fuzeofficlal/VIctory/commit/3eed0733b7f78e12021de6116d138bde980f02b9). 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](https://github.com/fuzeofficlal/VIctory/commit/391941b4231b8cada717dfc489f75efb41ecccaf). 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.
Author
Owner

@⁠aycow on GitHub · 2026-11-24 06:31 UTC · original

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

**@⁠aycow** on GitHub · 2026-11-24 06:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7124019175) 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](https://github.com/aycow/VIctory/blob/a98be758f15cf5903c3142abd9fc0ba741bb6c64/docs/render-dependencies.md)
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 06:51 UTC · original

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

**@⁠claude-GTA6** on GitHub · 2026-11-24 06:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7124368575) *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 #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.
Author
Owner

@⁠Tanju42 on GitHub · 2026-11-24 08:57 UTC · original

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.

**@⁠Tanju42** on GitHub · 2026-11-24 08:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7126774288) 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.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 09:02 UTC · original

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.

**@⁠claude-GTA6** on GitHub · 2026-11-24 09:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7126882331) *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.
Author
Owner

@⁠Exorion1er on GitHub · 2026-11-24 09:33 UTC · original

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

**@⁠Exorion1er** on GitHub · 2026-11-24 09:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7127584262) 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).
Author
Owner

@⁠HrHd on GitHub · 2026-11-24 09:38 UTC · original

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.

**@⁠HrHd** on GitHub · 2026-11-24 09:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7127694846) 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.
Author
Owner

@⁠Da1syCR on GitHub · 2026-11-24 10:52 UTC · original

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.

**@⁠Da1syCR** on GitHub · 2026-11-24 10:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7129369592) 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.
Author
Owner

@⁠HrHd on GitHub · 2026-11-24 11:08 UTC · original

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 #621), 108 biased sample with 16-bit coordinates, 41 a descriptor chosen by control flow.

What removed classes, so it is not duplicated:

  • #539 (64-bit image atomics) took that class from 653 to 0, with the whole-pack emitted count going 21,866 -> 22,572 of 25,322 over the stack below.
  • #621 (packed input padding as zero) took its class from 166 to 0.
  • main's waterfall series alone took #704's unknown-stride class and #747's no-dynamic-slots drops to 0 before any of that.

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.

**@⁠HrHd** on GitHub · 2026-11-24 11:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7129709883) `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 #621), 108 biased sample with 16-bit coordinates, 41 a descriptor chosen by control flow. What removed classes, so it is not duplicated: - **#539** (64-bit image atomics) took that class from 653 to 0, with the whole-pack emitted count going 21,866 -> 22,572 of 25,322 over the stack below. - **#621** (packed input padding as zero) took its class from 166 to 0. - **`main`'s waterfall series** alone took `#704`'s unknown-stride class and #747's no-dynamic-slots drops to 0 before any of that. 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.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 11:47 UTC · original

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

**@⁠claude-GTA6** on GitHub · 2026-11-24 11:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7130555816) *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 #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.
Author
Owner

@⁠desplmfao on GitHub · 2026-11-24 11:21 UTC · original · edited 2026-11-24 12:05 UTC

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

**@⁠desplmfao** on GitHub · 2026-11-24 11:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7129983795) · edited 2026-11-24 12:05 UTC 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 `CopyResource`s 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: ```rust 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).
Author
Owner

@⁠elamriz on GitHub · 2026-11-24 12:20 UTC · original

Tested #638 at d6e50b8 on an RTX 4070 Ti, locally applied to 6aa72a6 + #322 + #454, with the watchdog enabled. With VICTORY_SHOW_TARGET=busiest and D3D12 Debug, the first run hit message 525 (equal before/after resource states) and command-list Close failed. In this integration, Host::present unconditionally transitions the source texture to COPY_SOURCE and back. Skipping both source barriers when the texture is already in COPY_SOURCE eliminated message 525 in the next run. I left the swap-chain back-buffer barriers intact.

The second run reached the 300 s limit and the target preview showed poles, utility wires and traffic lights in false colour. This was an intermediate target; the normal presentation on the preceding #322 run was dark. Producer tracing repeated the same set across both runs, including 1c4b3c0547e3e6fa (divergent firstlane), 17af15c4015cb4b6 and fdd56d97a806bcca (divergent cross-lane operation), 55679a0547649d0b and 89d08e561897d4e5 (LDS fence), and 9209777e8face9dd and 42f717f1b4d18e94 (unknown buffer stride). These are observed dependencies, not a root-cause assignment. AI-assisted testing. No raw logs or title data attached.

**@⁠elamriz** on GitHub · 2026-11-24 12:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7131300556) Tested #638 at `d6e50b8` on an RTX 4070 Ti, locally applied to `6aa72a6` + #322 + #454, with the watchdog enabled. With `VICTORY_SHOW_TARGET=busiest` and D3D12 Debug, the first run hit message 525 (equal before/after resource states) and command-list Close failed. In this integration, `Host::present` unconditionally transitions the source texture to COPY_SOURCE and back. Skipping both source barriers when the texture is already in COPY_SOURCE eliminated message 525 in the next run. I left the swap-chain back-buffer barriers intact. The second run reached the 300 s limit and the target preview showed poles, utility wires and traffic lights in false colour. This was an intermediate target; the normal presentation on the preceding #322 run was dark. Producer tracing repeated the same set across both runs, including `1c4b3c0547e3e6fa` (divergent firstlane), `17af15c4015cb4b6` and `fdd56d97a806bcca` (divergent cross-lane operation), `55679a0547649d0b` and `89d08e561897d4e5` (LDS fence), and `9209777e8face9dd` and `42f717f1b4d18e94` (unknown buffer stride). These are observed dependencies, not a root-cause assignment. AI-assisted testing. No raw logs or title data attached.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 12:22 UTC · original

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

@⁠elamriz thanks, fixed in ed63baae: Host::present now skips both source transitions when the source is already in COPY_SOURCE. The back buffer's barriers are unchanged.

Checked on Windows 11 / RTX 5090: victory-gpu builds with and without --features diagnostics, cargo test -p victory-gpu --features diagnostics passes 47 (1 ignored), and clippy adds no warnings. I haven't reproduced message 525 myself, so your run is the in-game evidence for it.

The producers you list (fdd56d97, 17af15c4, 55679a05, 89d08e56, 9209777e, 42f717f1, 1c4b3c05) match the ones I see dropped or slow around world entry. On my branch, the four that only translate with an extra lane-mask retry hang when they run, so I'd treat a stack that makes them translate with care.

**@⁠claude-GTA6** on GitHub · 2026-11-24 12:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7131353628) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠elamriz thanks, fixed in `ed63baae`: `Host::present` now skips both source transitions when the source is already in `COPY_SOURCE`. The back buffer's barriers are unchanged. Checked on Windows 11 / RTX 5090: `victory-gpu` builds with and without `--features diagnostics`, `cargo test -p victory-gpu --features diagnostics` passes 47 (1 ignored), and clippy adds no warnings. I haven't reproduced message 525 myself, so your run is the in-game evidence for it. The producers you list (`fdd56d97`, `17af15c4`, `55679a05`, `89d08e56`, `9209777e`, `42f717f1`, `1c4b3c05`) match the ones I see dropped or slow around world entry. On my branch, the four that only translate with an extra lane-mask retry hang when they run, so I'd treat a stack that makes them translate with care.
Author
Owner

@⁠erLCoder on GitHub · 2026-11-24 13:09 UTC · original

GTX 1660 Ti runtime data point for historical revision d6e50b8 (the PR has since advanced). NVIDIA 581.42, Windows 10 22H2 19045.6466, Ryzen 5 3600, Agility SDK 1.620.2, non-admin RDP session. Diagnostic build of main 8e79c80 + #493 c48b240 + #189 d0fd9bf + #206 05981dd + #638 d6e50b8, with local Agility exports. Fresh cache and copy of a prior profile. Per-process GPU counters confirmed NVIDIA LUID 00000000:00017c52.

Settings: VICTORY_SHOW_TARGET=busiest, VICTORY_CAPTURE_BUSY=1000,4, VICTORY_DUMP_TARGETS=1, VICTORY_SHADER_LOOP_LIMIT=32 and VICTORY_D3D12_DRED=1. The window opened and saved loading frames and intermediate targets. After 6m56s, near transition from loading, host command-list Close failed with 0x80070057 and process exit 0x887A0005. The log did not identify the invalid command or contain a DRED breadcrumb for this failure. The shader loop limit is experimental.

A subsequent control run on the same base stack without #638, with a copy of the same seed profile and a separate fresh cache, continued past 16 minutes. Its captured frame 9000 contained three recognizable character meshes in a 2560x1440 format-28 target; the final frame showed credits over black. One run of each is insufficient to attribute the Close failure. Live preview, animation and input response remain unverified. No title files, screenshots or full logs attached.

The d6e50b8 and 3d7756e variants built with cargo build --offline --locked --profile diag -p victory --features diagnostics. At 3d7756e the filtered producers::tests passed 2, failed 0, ignored 0, 56 filtered. Those are CPU tests. Codex assembled the builds, ran the checks and drafted this report.

**@⁠erLCoder** on GitHub · 2026-11-24 13:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7132428733) GTX 1660 Ti runtime data point for historical revision d6e50b8 (the PR has since advanced). NVIDIA 581.42, Windows 10 22H2 19045.6466, Ryzen 5 3600, Agility SDK 1.620.2, non-admin RDP session. Diagnostic build of main 8e79c80 + #493 c48b240 + #189 d0fd9bf + #206 05981dd + #638 d6e50b8, with local Agility exports. Fresh cache and copy of a prior profile. Per-process GPU counters confirmed NVIDIA LUID 00000000:00017c52. Settings: VICTORY_SHOW_TARGET=busiest, VICTORY_CAPTURE_BUSY=1000,4, VICTORY_DUMP_TARGETS=1, VICTORY_SHADER_LOOP_LIMIT=32 and VICTORY_D3D12_DRED=1. The window opened and saved loading frames and intermediate targets. After 6m56s, near transition from loading, host command-list Close failed with 0x80070057 and process exit 0x887A0005. The log did not identify the invalid command or contain a DRED breadcrumb for this failure. The shader loop limit is experimental. A subsequent control run on the same base stack without #638, with a copy of the same seed profile and a separate fresh cache, continued past 16 minutes. Its captured frame 9000 contained three recognizable character meshes in a 2560x1440 format-28 target; the final frame showed credits over black. One run of each is insufficient to attribute the Close failure. Live preview, animation and input response remain unverified. No title files, screenshots or full logs attached. The d6e50b8 and 3d7756e variants built with `cargo build --offline --locked --profile diag -p victory --features diagnostics`. At 3d7756e the filtered `producers::tests` passed 2, failed 0, ignored 0, 56 filtered. Those are CPU tests. Codex assembled the builds, ran the checks and drafted this report.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 13:15 UTC · original

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

@⁠erLCoder thanks. A command-list Close failing with 0x80070057 under VICTORY_SHOW_TARGET matches what @⁠elamriz found on d6e50b8: when the shown target was already in COPY_SOURCE, Host::present recorded a barrier with equal before/after states, and the list's Close then failed. That's fixed in ed63baae: the source transitions are skipped in that case. I can't confirm from your log that it was the same barrier, so a run on ed63baae would settle it.

**@⁠claude-GTA6** on GitHub · 2026-11-24 13:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7132582431) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠erLCoder thanks. A command-list `Close` failing with `0x80070057` under `VICTORY_SHOW_TARGET` matches what @⁠elamriz found on `d6e50b8`: when the shown target was already in `COPY_SOURCE`, `Host::present` recorded a barrier with equal before/after states, and the list's `Close` then failed. That's fixed in `ed63baae`: the source transitions are skipped in that case. I can't confirm from your log that it was the same barrier, so a run on `ed63baae` would settle it.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 13:24 UTC · original

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

@⁠mercuryVM thanks, and sorry this sat through two reviews. Fixed in 99b6afcc:

  • VICTORY_DUMP_FAILED is now compiled only with --features diagnostics, so release builds don't read it.
  • Its folder is resolved once (OnceLock): victory_core::ensure_outside_repo first, then create_dir_all. If either fails, a warning is logged and nothing is dumped. Failed writes are logged too, instead of the silent let _ =. victory-gpu now depends on victory-core for this.

Also merged current main (669e901e); the only conflict was two new tests side by side in capture.rs, both kept. This includes the contributed shape check from claude-GTA6/VIctory#1: the preview target must be a single-sampled 2D texture.

Windows 11 / RTX 5090: cargo test -p victory-gpu passes with and without --features diagnostics (56 with it). The one exception is frame::tests::waits_end_on_ticks_and_count_frames: it failed once while a game was running on the same machine and passed on rerun; it's in untouched code. Clippy shows no warnings either way.

On #530's VICTORY_SHOW_TARGET=<w>x<h>-f<fmt>: agreed. Whichever lands second should take both forms in one parser. I'll adapt this one if #530 goes in first.

**@⁠claude-GTA6** on GitHub · 2026-11-24 13:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7132794746) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠mercuryVM thanks, and sorry this sat through two reviews. Fixed in `99b6afcc`: - `VICTORY_DUMP_FAILED` is now compiled only with `--features diagnostics`, so release builds don't read it. - Its folder is resolved once (`OnceLock`): `victory_core::ensure_outside_repo` first, then `create_dir_all`. If either fails, a warning is logged and nothing is dumped. Failed writes are logged too, instead of the silent `let _ =`. `victory-gpu` now depends on `victory-core` for this. Also merged current `main` (`669e901e`); the only conflict was two new tests side by side in `capture.rs`, both kept. This includes the contributed shape check from claude-GTA6/VIctory#1: the preview target must be a single-sampled 2D texture. Windows 11 / RTX 5090: `cargo test -p victory-gpu` passes with and without `--features diagnostics` (56 with it). The one exception is `frame::tests::waits_end_on_ticks_and_count_frames`: it failed once while a game was running on the same machine and passed on rerun; it's in untouched code. Clippy shows no warnings either way. On #530's `VICTORY_SHOW_TARGET=<w>x<h>-f<fmt>`: agreed. Whichever lands second should take both forms in one parser. I'll adapt this one if #530 goes in first.
Author
Owner

@⁠erLCoder on GitHub · 2026-11-24 13:52 UTC · original

@⁠claude-GTA6 Retested the revision you requested, ed63baae2af4c24338633e049f7702d748c43ae7, on the same control stack: main 8e79c80 + #493 c48b240 + #189 d0fd9bf + #206 05981dd. The local integration is 790d924, plus the same local Agility SDK exports used in the earlier build. Built with cargo build --offline --locked --profile diag -p victory --features diagnostics and Rust 1.98.1.

Ryzen 5 3600, GTX 1660 Ti 6 GB (Turing), NVIDIA 581.42, Windows 10 Enterprise 22H2, 32 GB RAM, Agility SDK 1.620.2. Per-process GPU counters confirmed physical NVIDIA LUID 00000000:00017c52. Fresh cache and a copy of the same prior profile. Settings: VICTORY_SHOW_TARGET=busiest, VICTORY_CAPTURE_BUSY=1000,4, VICTORY_DUMP_TARGETS=1, VICTORY_SHADER_LOOP_LIMIT=32, VICTORY_D3D12_DRED=1. The loop limit is experimental.

The old d6e50b8 run failed command-list Close with 0x80070057 at 6m56s. The corrected Agility build ran for over 12 minutes, reached the world and remained running for over 3 minutes after world entry; no command-list Close failure or device removal was logged through that observation. This single comparison does not prove which command caused the old failure. Some texture creations were refused with 0x80070057, a separate operation, and many draws/dispatches lack host pipelines.

The live preview showed geometry in false colour. Saved 2560x1440 format-28 targets at frames 14070, 14079 and 14088 show a character and parts of the surroundings. Small background details change between captures, but character animation is not established. This is an intermediate diagnostic buffer, not complete game rendering; world performance was roughly 1 fps.

Two earlier attempts inadvertently lacked the local SDK exports and ended with title-image access violation 0xc0000005; they are not comparable Agility runs. PR head 99b6afcc merges newer main and conflicts with #189 in shader code on this control stack, so I did not resolve those substantive conflicts or claim a HEAD runtime result. One machine and one comparable fixed-revision run; longer-term stability remains unproven. No title files, images, shader binaries, full logs or dumps attached.

Testing and report were assisted by OpenAI Codex (GPT-6).

**@⁠erLCoder** on GitHub · 2026-11-24 13:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7133466070) @⁠claude-GTA6 Retested the revision you requested, `ed63baae2af4c24338633e049f7702d748c43ae7`, on the same control stack: main `8e79c80` + #493 `c48b240` + #189 `d0fd9bf` + #206 `05981dd`. The local integration is `790d924`, plus the same local Agility SDK exports used in the earlier build. Built with `cargo build --offline --locked --profile diag -p victory --features diagnostics` and Rust 1.98.1. Ryzen 5 3600, GTX 1660 Ti 6 GB (Turing), NVIDIA 581.42, Windows 10 Enterprise 22H2, 32 GB RAM, Agility SDK 1.620.2. Per-process GPU counters confirmed physical NVIDIA LUID `00000000:00017c52`. Fresh cache and a copy of the same prior profile. Settings: `VICTORY_SHOW_TARGET=busiest`, `VICTORY_CAPTURE_BUSY=1000,4`, `VICTORY_DUMP_TARGETS=1`, `VICTORY_SHADER_LOOP_LIMIT=32`, `VICTORY_D3D12_DRED=1`. The loop limit is experimental. The old `d6e50b8` run failed command-list `Close` with `0x80070057` at 6m56s. The corrected Agility build ran for over 12 minutes, reached the world and remained running for over 3 minutes after world entry; no command-list Close failure or device removal was logged through that observation. This single comparison does not prove which command caused the old failure. Some texture creations were refused with `0x80070057`, a separate operation, and many draws/dispatches lack host pipelines. The live preview showed geometry in false colour. Saved 2560x1440 format-28 targets at frames 14070, 14079 and 14088 show a character and parts of the surroundings. Small background details change between captures, but character animation is not established. This is an intermediate diagnostic buffer, not complete game rendering; world performance was roughly 1 fps. Two earlier attempts inadvertently lacked the local SDK exports and ended with title-image access violation `0xc0000005`; they are not comparable Agility runs. PR head `99b6afcc` merges newer main and conflicts with #189 in shader code on this control stack, so I did not resolve those substantive conflicts or claim a HEAD runtime result. One machine and one comparable fixed-revision run; longer-term stability remains unproven. No title files, images, shader binaries, full logs or dumps attached. Testing and report were assisted by OpenAI Codex (GPT-6).
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 13:54 UTC · original

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

@⁠erLCoder thanks for the retest. 12+ minutes on ed63baae with no Close failure, after the d6e50b8 run failed at 6m56s, fits the equal-state barrier fix, with the single-run caveat you note. The 0x80070057 texture creations are a separate issue and not from this PR. The conflict with #189 at the head is between #189 and newer main, not this PR's code.

**@⁠claude-GTA6** on GitHub · 2026-11-24 13:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7133515214) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠erLCoder thanks for the retest. 12+ minutes on `ed63baae` with no `Close` failure, after the `d6e50b8` run failed at 6m56s, fits the equal-state barrier fix, with the single-run caveat you note. The `0x80070057` texture creations are a separate issue and not from this PR. The conflict with #189 at the head is between #189 and newer `main`, not this PR's code.
Author
Owner

@⁠erLCoder on GitHub · 2026-11-24 14:37 UTC · original

@⁠claude-GTA6 Retested #638 head 99b6afc with main ffe310e, #189 c047885, #493 c48b240 and #206 05981dd. Local integration 7bdaa4e includes a Cargo.lock entry for the diagnostics dependency and local Agility exports. Control 790d924 used #638 ed63baae. Rust 1.98.1, offline locked diag build with diagnostics.

GTX 1660 Ti, NVIDIA 581.42, Windows 10 22H2, Ryzen 5 3600, Agility SDK 1.620.2. GPU counters confirmed physical NVIDIA LUID 00000000:00017c52, the process loaded the local SDK, and VIctory selected Wave32 lowering. Both runs used a fresh cache and a copy of the same profile. Settings: VICTORY_SHOW_TARGET=busiest, VICTORY_CAPTURE_BUSY=1000,4, VICTORY_DUMP_TARGETS=1, VICTORY_SHADER_LOOP_LIMIT=32, VICTORY_D3D12_DRED=1. The loop limit is experimental.

The new run was observed for 12m28s, including over four minutes after the first captured character geometry. No command-list Close failure or device removal appeared, and it passed the previous d6e50b8 failure point at 6m56s. Each run logged two texture-creation E_INVALIDARG warnings in its first 12 minutes. At frame 13152 the presented capture matched a 2560x1440 format-28 target and showed character geometry in false colour. The same target showed geometry at frame 13177. Control showed a character and parts of the surroundings. These are intermediate targets; animation and input response were not established.

The first busy capture was requested at 7m34s versus 8m01s on control. Over the next three minutes, the median of logged frame-time averages was 2,866 ms (27 windows, range 917–12,017 ms) versus 2,299 ms (29 windows, range 756–5,233 ms). In the first 12 minutes the new run logged 496 unique shader translation refusals and 47 host-pipeline warnings, versus 463 and 45 on control. The updated #189 still refused divergent cross-lane and unsafe LDS-fence cases. These are single runs on different stacks and observed scenes, so the comparison does not isolate #638.

Testing and report were assisted by OpenAI Codex (GPT-6).

**@⁠erLCoder** on GitHub · 2026-11-24 14:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7134679983) @⁠claude-GTA6 Retested #638 head `99b6afc` with main `ffe310e`, #189 `c047885`, #493 `c48b240` and #206 `05981dd`. Local integration `7bdaa4e` includes a Cargo.lock entry for the diagnostics dependency and local Agility exports. Control `790d924` used #638 `ed63baae`. Rust 1.98.1, offline locked diag build with diagnostics. GTX 1660 Ti, NVIDIA 581.42, Windows 10 22H2, Ryzen 5 3600, Agility SDK 1.620.2. GPU counters confirmed physical NVIDIA LUID `00000000:00017c52`, the process loaded the local SDK, and VIctory selected Wave32 lowering. Both runs used a fresh cache and a copy of the same profile. Settings: `VICTORY_SHOW_TARGET=busiest`, `VICTORY_CAPTURE_BUSY=1000,4`, `VICTORY_DUMP_TARGETS=1`, `VICTORY_SHADER_LOOP_LIMIT=32`, `VICTORY_D3D12_DRED=1`. The loop limit is experimental. The new run was observed for 12m28s, including over four minutes after the first captured character geometry. No command-list Close failure or device removal appeared, and it passed the previous `d6e50b8` failure point at 6m56s. Each run logged two texture-creation E_INVALIDARG warnings in its first 12 minutes. At frame 13152 the presented capture matched a 2560x1440 format-28 target and showed character geometry in false colour. The same target showed geometry at frame 13177. Control showed a character and parts of the surroundings. These are intermediate targets; animation and input response were not established. The first busy capture was requested at 7m34s versus 8m01s on control. Over the next three minutes, the median of logged frame-time averages was 2,866 ms (27 windows, range 917–12,017 ms) versus 2,299 ms (29 windows, range 756–5,233 ms). In the first 12 minutes the new run logged 496 unique shader translation refusals and 47 host-pipeline warnings, versus 463 and 45 on control. The updated #189 still refused divergent cross-lane and unsafe LDS-fence cases. These are single runs on different stacks and observed scenes, so the comparison does not isolate #638. Testing and report were assisted by OpenAI Codex (GPT-6).
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 14:54 UTC · original

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

@⁠erLCoder thanks again. You're right about Cargo.lock: 99b6afcc added the victory-core dependency without its lock entry. That's fixed in 2866d1f9, and cargo check --locked -p victory-gpu --features diagnostics passes. Your 12m28s run with no Close failure past the old 6m56s point is useful confirmation. The frame-time difference is on a different stack and scene, as you say, so I'm not reading anything into it.

**@⁠claude-GTA6** on GitHub · 2026-11-24 14:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7135149428) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠erLCoder thanks again. You're right about `Cargo.lock`: `99b6afcc` added the `victory-core` dependency without its lock entry. That's fixed in `2866d1f9`, and `cargo check --locked -p victory-gpu --features diagnostics` passes. Your 12m28s run with no `Close` failure past the old 6m56s point is useful confirmation. The frame-time difference is on a different stack and scene, as you say, so I'm not reading anything into it.
Author
Owner

@⁠adamdotpy on GitHub · 2026-11-24 15:12 UTC · original

Review of the head 2866d1f9 on Windows 11 / Rust 1.98.1. Your checks reproduce here, and nothing blocks the merge:

  • cargo test --workspace --locked: green
  • cargo test -p victory-gpu: 50 passed, 1 ignored; with --features diagnostics: 56 passed, 1 ignored
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean
  • cargo check --workspace --locked: clean

Findings, most useful first.

  1. The equal-state barrier is guarded at one call site, but its cause is upstream of it. resource::host_transition already returns None when the state is unchanged, and queue.rs:307 folds that None into COPY_SOURCE with map_or, so "nothing to move" and "already in COPY_SOURCE" become the same value; present then re-derives "was moved" from it. Passing before: Option<u32> (None = no transition) from the caller removes the ambiguity, and the other ResourceBarrier callers get the same protection rather than each needing its own check.

  2. VICTORY_SHOW_TARGET=busiest can pick targets of different size or format on consecutive frames. Host::present then calls ResizeBuffers per frame, which stalls the queue. Latching the chosen target for the run would avoid it.

  3. capture::shown holds TARGETS and HITS while calling GetDesc per target and searching hits linearly per target, every frame: O(targets × binds) with thousands of binds in a world frame. A single pass with a HashMap<usize, u32> for the hit counts costs much less. (No deadlock with note_target, which takes HITS and then releases it before TARGETS.)

  4. producers::record prunes old frames only when a new drop arrives, so in a stretch with no drops stale entries survive and can still be logged against a reader. Pruning in read (or at present) is a line.

  5. pipeline::native_used re-parses every stage's container and rebuilds its used-resource list for each dropped draw or dispatch. Where drops fire hundreds of times a frame in the world, caching it per pipeline object is the difference between useful and unaffordable.

  6. producers::read takes a global mutex and clones a String per matching write for every bound SRV. An atomic "drops pending" flag would let the common empty case skip all of it.

  7. VICTORY_DUMP_FAILED writes the whole container to <stage>-<hash>.dxbc, which is not DXBC (it is what victory shader-info reads); .shader or .bin would not mislead the next person. It also does not dedupe, so a failed translation retried for the same hash rewrites the same file.

Not tested here: in-game behaviour — I have no title data on this machine, so the above is the unit and build level only.

**@⁠adamdotpy** on GitHub · 2026-11-24 15:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7135637061) Review of the head `2866d1f9` on Windows 11 / Rust 1.98.1. Your checks reproduce here, and nothing blocks the merge: - `cargo test --workspace --locked`: green - `cargo test -p victory-gpu`: 50 passed, 1 ignored; with `--features diagnostics`: 56 passed, 1 ignored - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean - `cargo check --workspace --locked`: clean Findings, most useful first. 1. The equal-state barrier is guarded at one call site, but its cause is upstream of it. `resource::host_transition` already returns `None` when the state is unchanged, and `queue.rs:307` folds that `None` into `COPY_SOURCE` with `map_or`, so "nothing to move" and "already in `COPY_SOURCE`" become the same value; `present` then re-derives "was moved" from it. Passing `before: Option<u32>` (None = no transition) from the caller removes the ambiguity, and the other `ResourceBarrier` callers get the same protection rather than each needing its own check. 2. `VICTORY_SHOW_TARGET=busiest` can pick targets of different size or format on consecutive frames. `Host::present` then calls `ResizeBuffers` per frame, which stalls the queue. Latching the chosen target for the run would avoid it. 3. `capture::shown` holds `TARGETS` and `HITS` while calling `GetDesc` per target and searching `hits` linearly per target, every frame: O(targets × binds) with thousands of binds in a world frame. A single pass with a `HashMap<usize, u32>` for the hit counts costs much less. (No deadlock with `note_target`, which takes `HITS` and then releases it before `TARGETS`.) 4. `producers::record` prunes old frames only when a new drop arrives, so in a stretch with no drops stale entries survive and can still be logged against a reader. Pruning in `read` (or at present) is a line. 5. `pipeline::native_used` re-parses every stage's container and rebuilds its used-resource list for each dropped draw or dispatch. Where drops fire hundreds of times a frame in the world, caching it per pipeline object is the difference between useful and unaffordable. 6. `producers::read` takes a global mutex and clones a `String` per matching write for every bound SRV. An atomic "drops pending" flag would let the common empty case skip all of it. 7. `VICTORY_DUMP_FAILED` writes the whole container to `<stage>-<hash>.dxbc`, which is not DXBC (it is what `victory shader-info` reads); `.shader` or `.bin` would not mislead the next person. It also does not dedupe, so a failed translation retried for the same hash rewrites the same file. Not tested here: in-game behaviour — I have no title data on this machine, so the above is the unit and build level only.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 15:35 UTC · original

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

@⁠adamdotpy thanks for the thorough review. I've taken all seven, as six commits up to d4715c76:

  1. b22cd90d: Host::present takes before: Option<u32>; None = nothing to move. queue.rs passes host_transition's None through and restores only a real move. New host::needed / transition_from build a barrier only for different states, and the target dump, list::ensure_state and render-target clears use them too.
  2. 4bfc8763: busiest latches its first pick for the run, and lets go only when nothing but the latch still holds the texture (the title released it). The numeric <n> mode is unchanged.
  3. acc72831: bind counts in a HashMap<usize, u32>; both lists are taken before any GetDesc, so no lock is held during those calls, and each target is described once per pass.
  4. and 6. ea0d96c2: read prunes first through a shared prune(). An atomic PENDING flag lets read / live_write / live_target return before any lock when nothing was dropped. Writers are Arc<str>. A read racing a drop recorded at that same moment can miss it, which is fine for a diagnostic.
  5. e73d56ad: the used-resource list is cached once per shared Shader (OnceLock), so pipelines sharing a container share the parse too, and it lends out slices instead of new Vecs.
  6. d4715c76: <stage>-<hash>.shader, since victory shader-info finds containers by their magic, not their extension. Each name is written once per run.

Windows 11 / RTX 5090: cargo test -p victory-gpu 51 passed, with --features diagnostics 61 passed (1 ignored each); cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings and cargo check --workspace --locked are clean. Unit tests cover the barrier decision, bind counting, the latch, pruning and the dump dedupe. Not yet run in game; the only change outside the diagnostics feature is point 1.

**@⁠claude-GTA6** on GitHub · 2026-11-24 15:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7136295316) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠adamdotpy thanks for the thorough review. I've taken all seven, as six commits up to `d4715c76`: 1. `b22cd90d`: `Host::present` takes `before: Option<u32>`; `None` = nothing to move. `queue.rs` passes `host_transition`'s `None` through and restores only a real move. New `host::needed` / `transition_from` build a barrier only for different states, and the target dump, `list::ensure_state` and render-target clears use them too. 2. `4bfc8763`: `busiest` latches its first pick for the run, and lets go only when nothing but the latch still holds the texture (the title released it). The numeric `<n>` mode is unchanged. 3. `acc72831`: bind counts in a `HashMap<usize, u32>`; both lists are taken before any `GetDesc`, so no lock is held during those calls, and each target is described once per pass. 4. and 6. `ea0d96c2`: `read` prunes first through a shared `prune()`. An atomic `PENDING` flag lets `read` / `live_write` / `live_target` return before any lock when nothing was dropped. Writers are `Arc<str>`. A read racing a drop recorded at that same moment can miss it, which is fine for a diagnostic. 5. `e73d56ad`: the used-resource list is cached once per shared `Shader` (`OnceLock`), so pipelines sharing a container share the parse too, and it lends out slices instead of new `Vec`s. 7. `d4715c76`: `<stage>-<hash>.shader`, since `victory shader-info` finds containers by their magic, not their extension. Each name is written once per run. Windows 11 / RTX 5090: `cargo test -p victory-gpu` 51 passed, with `--features diagnostics` 61 passed (1 ignored each); `cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings` and `cargo check --workspace --locked` are clean. Unit tests cover the barrier decision, bind counting, the latch, pruning and the dump dedupe. Not yet run in game; the only change outside the diagnostics feature is point 1.
Author
Owner

@⁠adamdotpy on GitHub · 2026-11-24 15:46 UTC · original

Verified the new head d4715c7 here (Windows 11, Rust 1.98.1). All seven points are addressed, and one of them (the barrier) more thoroughly than I suggested.

What ran:

  • cargo test -p victory-gpu --features diagnostics: 61 passed, 1 ignored (56 at 2866d1f9)
  • cargo test -p victory-gpu: 51 passed, 1 ignored
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean
  • cargo build --release -p victory: builds

Point by point:

  1. Equal-state barrier — b22cd90 does more than I asked: present takes Option<u32>, and host::transition_from/needed give the dump list, ensure_state and the render-target clears the same guard. That removes the class, not just the instance.
  2. busiest resizing the swap chain — 4bfc876 latches the pick, and the kept strong-count rule lets a target the title releases be replaced instead of pinning a dead one.
  3. capture::shown cost — acc7283: binds counted in a HashMap, and the target list is taken before any GetDesc, so no lock is held across a device call.
  4. Stale producers — ea0d96c prunes in read, with a test for the frame window.
  5. native_used re-parsing — e73d56a.
  6. read's lock and string clones — the PENDING flag and Arc<str> writers.
  7. VICTORY_DUMP_FAILED — d4715c7: .shader (it is the container, not DXBC), and once per name per run.

One correction to my own review, now that it is in the code: I asked for pruning in read, and read runs once per bound resource per draw (draw.rs:1164). prune is a retain over the whole deque, so while drops are pending — exactly the case this detector exists for — every buffer SRV read walks up to MAX_WRITES entries. At a few thousand reads a frame and a queue of hundreds to thousands, that is single digits to tens of milliseconds a frame, in the build whose frame time is being measured. Pruning once per presented frame (or at present) keeps the fix and drops the cost: the frame cannot change within a frame, so nothing is gained by doing it per read.

Two smaller notes:

  • PENDING is relaxed and read before taking the lock, so a read that races the very first drop of a frame can miss a log line. Fine for a detector — a sentence saying so would stop the next reader wondering.
  • If the prune moves to the present side, read no longer needs queue::presented() at all, which is one less cross-module call on that path.

Not tested here: in-game behaviour; I have no title data on this machine, so this is the unit and build level only.

**@⁠adamdotpy** on GitHub · 2026-11-24 15:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7136598224) Verified the new head `d4715c7` here (Windows 11, Rust 1.98.1). All seven points are addressed, and one of them (the barrier) more thoroughly than I suggested. What ran: - `cargo test -p victory-gpu --features diagnostics`: 61 passed, 1 ignored (56 at `2866d1f9`) - `cargo test -p victory-gpu`: 51 passed, 1 ignored - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean - `cargo build --release -p victory`: builds Point by point: 1. **Equal-state barrier** — `b22cd90` does more than I asked: `present` takes `Option<u32>`, and `host::transition_from`/`needed` give the dump list, `ensure_state` and the render-target clears the same guard. That removes the class, not just the instance. 2. **`busiest` resizing the swap chain** — `4bfc876` latches the pick, and the `kept` strong-count rule lets a target the title releases be replaced instead of pinning a dead one. 3. **`capture::shown` cost** — `acc7283`: binds counted in a `HashMap`, and the target list is taken before any `GetDesc`, so no lock is held across a device call. 4. **Stale producers** — `ea0d96c` prunes in `read`, with a test for the frame window. 5. **`native_used` re-parsing** — `e73d56a`. 6. **`read`'s lock and string clones** — the `PENDING` flag and `Arc<str>` writers. 7. **`VICTORY_DUMP_FAILED`** — `d4715c7`: `.shader` (it is the container, not DXBC), and once per name per run. One correction to my own review, now that it is in the code: I asked for pruning in `read`, and `read` runs once per bound resource per draw (`draw.rs:1164`). `prune` is a `retain` over the whole deque, so while drops are pending — exactly the case this detector exists for — every buffer SRV read walks up to `MAX_WRITES` entries. At a few thousand reads a frame and a queue of hundreds to thousands, that is single digits to tens of milliseconds a frame, in the build whose frame time is being measured. Pruning once per presented frame (or at present) keeps the fix and drops the cost: the frame cannot change within a frame, so nothing is gained by doing it per read. Two smaller notes: - `PENDING` is relaxed and read before taking the lock, so a read that races the very first drop of a frame can miss a log line. Fine for a detector — a sentence saying so would stop the next reader wondering. - If the prune moves to the present side, `read` no longer needs `queue::presented()` at all, which is one less cross-module call on that path. Not tested here: in-game behaviour; I have no title data on this machine, so this is the unit and build level only.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 15:55 UTC · original

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

@⁠adamdotpy good catch on the cost: read runs per bound resource, so pruning there walked the queue on every read while drops were pending. In baa7f465 the present hook prunes once per frame (producers::presented(frame)), so read only scans and no longer calls queue::presented(). PENDING now has a doc comment saying it's relaxed and read before the lock, so a read racing a frame's first drop can log one line late.

cargo test -p victory-gpu 51 passed, with --features diagnostics 61 passed (1 ignored each); cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings is clean.

**@⁠claude-GTA6** on GitHub · 2026-11-24 15:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7136848834) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠adamdotpy good catch on the cost: `read` runs per bound resource, so pruning there walked the queue on every read while drops were pending. In `baa7f465` the present hook prunes once per frame (`producers::presented(frame)`), so `read` only scans and no longer calls `queue::presented()`. `PENDING` now has a doc comment saying it's relaxed and read before the lock, so a read racing a frame's first drop can log one line late. `cargo test -p victory-gpu` 51 passed, with `--features diagnostics` 61 passed (1 ignored each); `cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings` is clean.
Author
Owner

@⁠adamdotpy on GitHub · 2026-11-24 15:59 UTC · original

Verified baa7f465 here (Windows 11, Rust 1.98.1).

  • cargo test -p victory-gpu --features diagnostics: 61 passed, 1 ignored
  • cargo test -p victory-gpu: 51 passed, 1 ignored
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings (default features, so presented is compiled but never called from queue.rs): clean, no dead-code warning

The window is unchanged, which is the part I wanted to be sure of. prune keeps w.frame + 2 > frame, and the hook runs with the frame the present just started (FRAMES.fetch_add(1) + 1), so at the end of frame F it keeps drops stamped F-1 and F — exactly what a read in frame F+1 would have kept when it called prune itself with presented() = F. Moving the call did not move the horizon.

Two notes, neither a defect:

  • record still prunes with presented() un-incremented, one frame behind the hook's argument. Harmless — both windows keep at least the two frames a detector looks at — but the two prune callers now disagree by one, so it is worth a word in record if you touch it again.
  • The hang case, which is this PR's own subject: when nothing presents, the list stops being pruned and grows to MAX_WRITES = 8192, and each read scans it. That is still an improvement over the old order (prune walked the queue and then read walked it again, both per bound resource), so no action — just noting that the cap is what bounds the hang path, not the prune.

Nothing else from me on this branch: all seven review points hold on baa7f46, and this one closes point 5's cost.

**@⁠adamdotpy** on GitHub · 2026-11-24 15:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7136944556) Verified `baa7f465` here (Windows 11, Rust 1.98.1). - `cargo test -p victory-gpu --features diagnostics`: 61 passed, 1 ignored - `cargo test -p victory-gpu`: 51 passed, 1 ignored - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` (default features, so `presented` is compiled but never called from `queue.rs`): clean, no dead-code warning The window is unchanged, which is the part I wanted to be sure of. `prune` keeps `w.frame + 2 > frame`, and the hook runs with the frame the present just started (`FRAMES.fetch_add(1) + 1`), so at the end of frame F it keeps drops stamped F-1 and F — exactly what a read in frame F+1 would have kept when it called `prune` itself with `presented()` = F. Moving the call did not move the horizon. Two notes, neither a defect: - `record` still prunes with `presented()` un-incremented, one frame behind the hook's argument. Harmless — both windows keep at least the two frames a detector looks at — but the two `prune` callers now disagree by one, so it is worth a word in `record` if you touch it again. - The hang case, which is this PR's own subject: when nothing presents, the list stops being pruned and grows to `MAX_WRITES` = 8192, and each `read` scans it. That is still an improvement over the old order (prune walked the queue and then read walked it again, both per bound resource), so no action — just noting that the cap is what bounds the hang path, not the prune. Nothing else from me on this branch: all seven review points hold on `baa7f46`, and this one closes point 5's cost.
Author
Owner

@⁠Rezwo on GitHub · 2026-11-24 17:58 UTC · original

I reproduced two cases where VICTORY_PRODUCERS misses a warning at baa7f465:

  • A writer skipped at frame stamps 9 and 10 is pruned at present 11 because the second drop doesn’t refresh the timestamp. A reader arriving then gets no warning.
  • At MAX_WRITES (8,192), recording a duplicate that isn’t the oldest entry evicts an unrelated entry before checking for the duplicate. A reader of that unrelated target gets no warning.

In a standalone Rust harness with synthetic inputs, the current logic passed 5/8 checks. Refreshing and requeuing duplicates before considering eviction passed 8/8. No game files or GPU run; this is a diagnostics finding, not a black-screen fix. Would you like a small follow-up commit against this branch with the regression tests?

AI-assisted (Codex).

**@⁠Rezwo** on GitHub · 2026-11-24 17:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7139979990) I reproduced two cases where `VICTORY_PRODUCERS` misses a warning at `baa7f465`: - A writer skipped at frame stamps 9 and 10 is pruned at present 11 because the second drop doesn’t refresh the timestamp. A reader arriving then gets no warning. - At `MAX_WRITES` (8,192), recording a duplicate that isn’t the oldest entry evicts an unrelated entry before checking for the duplicate. A reader of that unrelated target gets no warning. In a standalone Rust harness with synthetic inputs, the current logic passed 5/8 checks. Refreshing and requeuing duplicates before considering eviction passed 8/8. No game files or GPU run; this is a diagnostics finding, not a black-screen fix. Would you like a small follow-up commit against this branch with the regression tests? AI-assisted (Codex).
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-24 18:12 UTC · original

Results from a port of this PR and #591 onto a larger stack (Linux, Wine 11.22 + vkd3d-proton, RTX 5090). VICTORY_PRODUCERS, VICTORY_CAPTURE_BUSY and VICTORY_DUMP_TARGETS worked as described. Here they named seven compute producers that fail on a structured buffer of unknown stride, which pointed us to #704.

A dump of one busy world frame (VICTORY_CAPTURE_BUSY=1000,1, about 16,500 operations ran) confirms what you saw. The 2560x1440 G-buffer layers hold picnic tables, street lamps, a lamp post and power lines, and no ground or buildings.

VICTORY_SHOW_TARGET=busiest never showed that G-buffer here, for two reasons:

  1. It latches too early. It picked a 3840x2160 RGBA8 target at frame 2, and again at frame 33, during the menu and intro. The title never released that target, so it stayed on screen for the whole run.
  2. The world's layers are missing from the target list. note_target sees render-target and depth binds and the UAV views of work that runs. Some of the world's 2560x1440 layers are written only through UAVs of pixel shaders that are dropped (for example fac9df8d21a00b68, which VICTORY_PRODUCERS attributes as the writer). Those layers never appear in the power-of-two-frame list. At frame 1024, during the world, the list held only shadow-sized and 64x64 targets.

What I changed locally:

  • note_dropped_writes also calls capture::note_target for each dropped UAV texture write, whenever VICTORY_SHOW_TARGET is set, even without VICTORY_PRODUCERS.
  • busiest keeps its latch between frames, but re-picks at each list frame when a displayable 16:9 target has more than twice the latched target's binds. It still drops a target the title releases.

Those changes are diagnostics-only. I can send them as a patch against your branch if that's useful.

AI-assisted (Claude); runs on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-24 18:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7140321882) Results from a port of this PR and #591 onto a larger stack (Linux, Wine 11.22 + vkd3d-proton, RTX 5090). `VICTORY_PRODUCERS`, `VICTORY_CAPTURE_BUSY` and `VICTORY_DUMP_TARGETS` worked as described. Here they named seven compute producers that fail on `a structured buffer of unknown stride`, which pointed us to #704. A dump of one busy world frame (`VICTORY_CAPTURE_BUSY=1000,1`, about 16,500 operations ran) confirms what you saw. The 2560x1440 G-buffer layers hold picnic tables, street lamps, a lamp post and power lines, and no ground or buildings. `VICTORY_SHOW_TARGET=busiest` never showed that G-buffer here, for two reasons: 1. **It latches too early.** It picked a 3840x2160 RGBA8 target at frame 2, and again at frame 33, during the menu and intro. The title never released that target, so it stayed on screen for the whole run. 2. **The world's layers are missing from the target list.** `note_target` sees render-target and depth binds and the UAV views of work that runs. Some of the world's 2560x1440 layers are written only through UAVs of pixel shaders that are dropped (for example `fac9df8d21a00b68`, which `VICTORY_PRODUCERS` attributes as the writer). Those layers never appear in the power-of-two-frame list. At frame 1024, during the world, the list held only shadow-sized and 64x64 targets. What I changed locally: - `note_dropped_writes` also calls `capture::note_target` for each dropped UAV texture write, whenever `VICTORY_SHOW_TARGET` is set, even without `VICTORY_PRODUCERS`. - `busiest` keeps its latch between frames, but re-picks at each list frame when a displayable 16:9 target has more than twice the latched target's binds. It still drops a target the title releases. Those changes are diagnostics-only. I can send them as a patch against your branch if that's useful. _AI-assisted (Claude); runs on my machine, no game data shared._
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 18:26 UTC · original

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

Thanks both. These are real misses, and I've fixed them here with regression tests instead of taking patches, so the branch stays one author's to review:

@⁠Rezwo, 545273b1: record now goes through push(). A duplicate moves to the back with the new frame, so a writer dropped at 9 and 10 survives the prune at present 11. Only a new entry evicts the oldest at the cap, so a duplicate never costs an unrelated one. Tests: a_repeated_drop_refreshes_its_frame, a_duplicate_at_the_cap_evicts_nothing.

@⁠neonbyte1, 7c7288ed, both of your points:

  1. Every 64 frames, busiest gives up its latch for a displayable target bound more than twice as often, with at least 8 binds (repick, tested). A menu pick from frame 2 gives way to the world's G-buffer, and swap-chain resizes stay rare.
  2. When VICTORY_SHOW_TARGET is set, note_dropped_writes notes textures that dropped work would have written through UAVs, even without VICTORY_PRODUCERS. Layers that only dropped pixel shaders write, like your fac9df8d case, now appear in the list.

Windows 11 / RTX 5090: cargo test -p victory-gpu 51 passed, with --features diagnostics 64 passed (1 ignored each). cargo clippy -p victory-gpu --all-targets with and without --all-features (-D warnings, --locked) and cargo check --workspace --locked are clean. Not run in game yet.

**@⁠claude-GTA6** on GitHub · 2026-11-24 18:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7140660433) *From a tester working with Claude (AI-assisted); measured on my own machine.* Thanks both. These are real misses, and I've fixed them here with regression tests instead of taking patches, so the branch stays one author's to review: @⁠Rezwo, `545273b1`: `record` now goes through `push()`. A duplicate moves to the back with the new frame, so a writer dropped at 9 and 10 survives the prune at present 11. Only a new entry evicts the oldest at the cap, so a duplicate never costs an unrelated one. Tests: `a_repeated_drop_refreshes_its_frame`, `a_duplicate_at_the_cap_evicts_nothing`. @⁠neonbyte1, `7c7288ed`, both of your points: 1. Every 64 frames, `busiest` gives up its latch for a displayable target bound more than twice as often, with at least 8 binds (`repick`, tested). A menu pick from frame 2 gives way to the world's G-buffer, and swap-chain resizes stay rare. 2. When `VICTORY_SHOW_TARGET` is set, `note_dropped_writes` notes textures that dropped work would have written through UAVs, even without `VICTORY_PRODUCERS`. Layers that only dropped pixel shaders write, like your `fac9df8d` case, now appear in the list. Windows 11 / RTX 5090: `cargo test -p victory-gpu` 51 passed, with `--features diagnostics` 64 passed (1 ignored each). `cargo clippy -p victory-gpu --all-targets` with and without `--all-features` (`-D warnings`, `--locked`) and `cargo check --workspace --locked` are clean. Not run in game yet.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 18:44 UTC · original

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

Housekeeping: I rewrote this branch's history to fix commit author metadata (a wrong local git identity), so the commit IDs changed. The contents are identical: same tree, same 20 commits. IDs cited in this thread map as follows:

was now commit
669e901e 63b2ce71 Merge upstream main
99b6afcc 84ab54af VICTORY_DUMP_FAILED only in diagnostics builds
2866d1f9 69bb3222 Cargo.lock entry
b22cd90d 3631a5c9 present takes the state as Option
acc72831 fed90c5d binds counted in a map
4bfc8763 49ab3532 busiest latches its pick
ea0d96c2 4cfa0026 producers prune / PENDING
e73d56ad e6d5c5d5 native_used parsed once
d4715c76 d25fa396 dump as .shader, once per run
baa7f465 bc8d1648 prune once per present
545273b1 a7ccf067 repeated drop refreshes its frame
7c7288ed ee7904bc busiest gives way; dropped UAV writes listed (head)

Earlier IDs (d6e50b83, ed63baae and before) are unchanged.

**@⁠claude-GTA6** on GitHub · 2026-11-24 18:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7141075167) *From a tester working with Claude (AI-assisted); measured on my own machine.* Housekeeping: I rewrote this branch's history to fix commit author metadata (a wrong local git identity), so the commit IDs changed. The contents are identical: same tree, same 20 commits. IDs cited in this thread map as follows: | was | now | commit | |---|---|---| | `669e901e` | `63b2ce71` | Merge upstream main | | `99b6afcc` | `84ab54af` | VICTORY_DUMP_FAILED only in diagnostics builds | | `2866d1f9` | `69bb3222` | Cargo.lock entry | | `b22cd90d` | `3631a5c9` | present takes the state as Option | | `acc72831` | `fed90c5d` | binds counted in a map | | `4bfc8763` | `49ab3532` | busiest latches its pick | | `ea0d96c2` | `4cfa0026` | producers prune / PENDING | | `e73d56ad` | `e6d5c5d5` | native_used parsed once | | `d4715c76` | `d25fa396` | dump as .shader, once per run | | `baa7f465` | `bc8d1648` | prune once per present | | `545273b1` | `a7ccf067` | repeated drop refreshes its frame | | `7c7288ed` | `ee7904bc` | busiest gives way; dropped UAV writes listed (head) | Earlier IDs (`d6e50b83`, `ed63baae` and before) are unchanged.
Author
Owner

@⁠adamdotpy on GitHub · 2026-11-24 19:04 UTC · original

Verified the new head ee7904b here (worktree on the PR head, isolated target dir, Windows 11 / Rust 1.98.1). The two new commits (a7ccf06, ee7904b) only touch the diagnostics feature's producers.rs/draw.rs: a repeated drop refreshes its frame instead of being treated as a duplicate, a duplicate never evicts, and busiest now yields to a much busier target with dropped UAV writes listed. With --features diagnostics: cargo test -p victory-gpu 64 passed / 0 failed / 1 ignored; cargo clippy -p victory-gpu --all-targets --all-features --locked -D warnings clean; cargo build --release -p victory builds. The prune-once-per-present change from baa7f46 that I verified earlier is unchanged, so the window semantics I checked then still hold. Nothing new to flag.

**@⁠adamdotpy** on GitHub · 2026-11-24 19:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7141567213) Verified the new head `ee7904b` here (worktree on the PR head, isolated target dir, Windows 11 / Rust 1.98.1). The two new commits (`a7ccf06`, `ee7904b`) only touch the diagnostics feature's `producers.rs`/`draw.rs`: a repeated drop refreshes its frame instead of being treated as a duplicate, a duplicate never evicts, and `busiest` now yields to a much busier target with dropped UAV writes listed. With `--features diagnostics`: `cargo test -p victory-gpu` 64 passed / 0 failed / 1 ignored; `cargo clippy -p victory-gpu --all-targets --all-features --locked -D warnings` clean; `cargo build --release -p victory` builds. The prune-once-per-present change from `baa7f46` that I verified earlier is unchanged, so the window semantics I checked then still hold. Nothing new to flag.
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-24 19:10 UTC · original

Verified 7c7288e and 545273b on Linux (Wine 11.22 + vkd3d-proton from GE-Proton11-14, RTX 5090, driver 620.73.04), first in the tests and then in game.

Tests (built for the Windows target, run under Wine):

  • cargo clippy -p victory-gpu --all-targets --locked -D warnings, with and without --all-features, is clean, and so is cargo check --workspace --locked.
  • victory-gpu: 51 tests, and 64 with --features diagnostics, 1 ignored each, the same totals as yours. The four new tests pass.
  • Two tests fail under Wine: indirect::tests::argument_clamp_builds and pipeline::library::tests::a_rejected_blob_gives_an_empty_library. They fail the same way on plain ffe310e under Wine, so they are not from this PR.

In game: I replaced my own equivalent fix with your two commits on a larger stack. capture.rs and producers.rs are byte-identical to your head. Three 7-minute runs of the first mission with VICTORY_SHOW_TARGET=busiest and no VICTORY_PRODUCERS:

  • busiest latches the 3840x2160 RGBA8 target at frames 2 and 33–40. At frame 832 in one run and frame 1280 in the other two, it moves to a 2560x1440 RGBA8 world layer (binds=30, and binds=172 in the warm-cache run).
  • The frame-1024 list now includes the world's 2560x1440 layers (f19, f27, f28, f34), each with 56–70 binds. Before, that list held only shadow-sized and 64x64 targets.
  • The presented frame then shows the G-buffer layer: street lamps, power lines, a sign and props. Before, it stayed on the menu target for the whole run. No crash or Xid in any of the runs.

One caveat for users of the view: a layer that only dropped work writes now counts toward busiest like any other. If such a layer wins, the view shows a target nothing wrote. Listing those targets without adding to their bind count would keep them out of the pick.

AI-assisted (Claude); runs on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-24 19:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7141696283) Verified `7c7288e` and `545273b` on Linux (Wine 11.22 + vkd3d-proton from GE-Proton11-14, RTX 5090, driver 620.73.04), first in the tests and then in game. **Tests** (built for the Windows target, run under Wine): - `cargo clippy -p victory-gpu --all-targets --locked -D warnings`, with and without `--all-features`, is clean, and so is `cargo check --workspace --locked`. - `victory-gpu`: 51 tests, and 64 with `--features diagnostics`, 1 ignored each, the same totals as yours. The four new tests pass. - Two tests fail under Wine: `indirect::tests::argument_clamp_builds` and `pipeline::library::tests::a_rejected_blob_gives_an_empty_library`. They fail the same way on plain `ffe310e` under Wine, so they are not from this PR. **In game:** I replaced my own equivalent fix with your two commits on a larger stack. `capture.rs` and `producers.rs` are byte-identical to your head. Three 7-minute runs of the first mission with `VICTORY_SHOW_TARGET=busiest` and no `VICTORY_PRODUCERS`: - `busiest` latches the 3840x2160 RGBA8 target at frames 2 and 33–40. At frame 832 in one run and frame 1280 in the other two, it moves to a 2560x1440 RGBA8 world layer (`binds=30`, and `binds=172` in the warm-cache run). - The frame-1024 list now includes the world's 2560x1440 layers (f19, f27, f28, f34), each with 56–70 binds. Before, that list held only shadow-sized and 64x64 targets. - The presented frame then shows the G-buffer layer: street lamps, power lines, a sign and props. Before, it stayed on the menu target for the whole run. No crash or Xid in any of the runs. One caveat for users of the view: a layer that only dropped work writes now counts toward `busiest` like any other. If such a layer wins, the view shows a target nothing wrote. Listing those targets without adding to their bind count would keep them out of the pick. _AI-assisted (Claude); runs on my machine, no game data shared._
Author
Owner

@⁠Rezwo on GitHub · 2026-11-24 19:16 UTC · original

I reproduced the busiest caveat on ee7904bc with two synthetic displayable textures. A dropped-only texture was picked even with no live candidate, then beat a texture with a real bind.

Follow-up commit for review/cherry-pick: github.com/Rezwo/VIctory@a7d59a1220. The dropped UAV target stays in the target list (including for explicit index selection), but skipped writes don't add to its bind count and zero-bind targets can't win busiest. The test also confirms the same texture becomes eligible when actually bound later.

On WARP, the focused regression failed before and passed after; the diagnostics GPU crate suite had 65 passed, 1 ignored. Diagnostics Clippy and the default-feature check also passed. No game files or title run. AI-assisted (Codex).

**@⁠Rezwo** on GitHub · 2026-11-24 19:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7141856090) I reproduced [the `busiest` caveat](https://git.gtahub.st/github/Marvisak--VIctory/pulls/638) on `ee7904bc` with two synthetic displayable textures. A dropped-only texture was picked even with no live candidate, then beat a texture with a real bind. Follow-up commit for review/cherry-pick: https://github.com/Rezwo/VIctory/commit/a7d59a1220f6eaef9d1c01356475f5c6369f6bdd. The dropped UAV target stays in the target list (including for explicit index selection), but skipped writes don't add to its bind count and zero-bind targets can't win `busiest`. The test also confirms the same texture becomes eligible when actually bound later. On WARP, the focused regression failed before and passed after; the diagnostics GPU crate suite had 65 passed, 1 ignored. Diagnostics Clippy and the default-feature check also passed. No game files or title run. AI-assisted (Codex).
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 19:18 UTC · original

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

@⁠neonbyte1 thanks for the in-game check: the switch from the menu target to the world layer at frame 832/1280, with the 2560x1440 layers now in the list, is what this was for. You're right about the caveat, and @⁠Rezwo thanks for reproducing it. Fixed in 79a1ecad, the same approach as your commit, written here:

  • note_dropped_writes now calls a new capture::note_unwritten. The texture is listed, so an index or a dump still reaches it, but no bind is counted.
  • busiest never picks a target with 0 binds, so an unwritten layer can't win alone or beat a bound one. When the same texture is really bound later, it counts as usual.
  • Test: a_target_only_dropped_work_writes_is_listed_but_never_busiest.

Windows 11 / RTX 5090: cargo test -p victory-gpu 51 passed, with --features diagnostics 65 passed (1 ignored each). cargo clippy -p victory-gpu --all-targets with and without --all-features (--locked -D warnings) is clean.

@⁠adamdotpy thanks for re-verifying ee7904b.

**@⁠claude-GTA6** on GitHub · 2026-11-24 19:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7141914369) *From a tester working with Claude (AI-assisted); measured on my own machine.* @⁠neonbyte1 thanks for the in-game check: the switch from the menu target to the world layer at frame 832/1280, with the 2560x1440 layers now in the list, is what this was for. You're right about the caveat, and @⁠Rezwo thanks for reproducing it. Fixed in `79a1ecad`, the same approach as your commit, written here: - `note_dropped_writes` now calls a new `capture::note_unwritten`. The texture is listed, so an index or a dump still reaches it, but no bind is counted. - `busiest` never picks a target with 0 binds, so an unwritten layer can't win alone or beat a bound one. When the same texture is really bound later, it counts as usual. - Test: `a_target_only_dropped_work_writes_is_listed_but_never_busiest`. Windows 11 / RTX 5090: `cargo test -p victory-gpu` 51 passed, with `--features diagnostics` 65 passed (1 ignored each). `cargo clippy -p victory-gpu --all-targets` with and without `--all-features` (`--locked -D warnings`) is clean. @⁠adamdotpy thanks for re-verifying `ee7904b`.
Author
Owner

@⁠adamdotpy on GitHub · 2026-11-24 20:53 UTC · original

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

**@⁠adamdotpy** on GitHub · 2026-11-24 20:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7144189873) @⁠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.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-24 21:55 UTC · original

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.

**@⁠claude-GTA6** on GitHub · 2026-11-24 21:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7145574984) *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`.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:28 UTC · original · edited 2026-11-25 02:29 UTC

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, #1951. This branch still carries the same lines, so the release-build change still lands with it. The cleanest order is #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

**@⁠Marvisak** on GitHub · 2026-11-25 01:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7149590875) · edited 2026-11-25 02:29 UTC <!-- victory-triage v1 head=85294f5ea77bae5d8efa8bcea7b37a061f1f3b95 verdict=needs-work at=2026-11-25T02:20:29Z --> 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, #1951. This branch still carries the same lines, so the release-build change still lands with it. The cleanest order is #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](https://claude.ai/code)_
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-25 01:42 UTC · original

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, #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 #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.
**@⁠claude-GTA6** on GitHub · 2026-11-25 01:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7149868397) *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, #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 #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.
Author
Owner

@⁠claude-GTA6 on GitHub · 2026-11-25 01:57 UTC · original

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.

**@⁠claude-GTA6** on GitHub · 2026-11-25 01:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/638#issuecomment-7150148164) *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`.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!638
No description provided.