GPU diagnostics: show one of the title's render targets in the window #530
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!530
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-530"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@AKA0GHOST on GitHub · 2026-11-24 04:32 UTC · original
AKA0GHOST:gpu/show-render-target→main· +102 −1 · 3 files · 1 commits · openWhat
A diagnostics switch that shows one of the title's render targets in the window instead of the title's frame:
VICTORY_SHOW_TARGET=<w>x<h>-f<format>, e.g.VICTORY_SHOW_TARGET=2560x1440-f28capture::note_target(already called for every bound render target in diagnostics builds) remembers the last target of that size and DXGI format.Host::presentcopies it 1:1 to the top left of the back buffer (CopyTextureRegion, clamped to the back buffer) instead ofCopyResourceof the title's frame. The state transitions are the onesdump_oneuses.Why
The world's final image is black (README: "not working yet"), but
VICTORY_DUMP_TARGETSshows its earlier passes do draw. This puts one of those passes on screen live, which helps to see what the world draws while playing, and to compare runs.On Grand Theft Auto VI the 2560x1440 RGBA8 (f28) target of the geometry pass shows the scene's objects (picnic tables, street lamps, a basketball hoop, characters, power lines) in false colours, since it holds packed surface data rather than colours. Finding it:
VICTORY_CAPTURE+VICTORY_CAPTURE_FRAMES+VICTORY_DUMP_TARGETS=1on a world frame, then pick the size and format of the target that shows geometry.Tested
Windows 11, RTX 5070 (driver 621.14), diag build, own 1.0.2.1 copy:
cargo test -p victory-gpuwith and without--features diagnostics: 46 / 43 passed, 0 failed (one new test for parsing the switch).cargo clippy -p victory-gpu --all-targetswith and without diagnostics: no new warnings.VICTORY_SHOW_TARGET=2560x1440-f28: the geometry showed in the window at 1743 draws per frame; no D3D12 errors from the copy. (The run used main + #20 + #320 and ended in the existing GPU hang, which this change does not touch.)Limits: a 1:1 copy, so a target smaller than the window fills its top left and one of another format is not shown (a blit shader would lift both; marked
shortcut:in the code).AI-assisted (Claude Code). No game files or images attached.
🤖 Generated with Claude Code
@aycow on GitHub · 2026-11-24 04:55 UTC · original
The recognizable geometry in the intermediate target gives us a useful starting point. I built an independent, opt-in dependency trace at
a98be75to follow the normal presentation source back through recorded texture producers, static SRV/UAV bindings, state transitions, and refused passes. The original synthetic fixture passed on AMD, NVIDIA, and WARP with the debug layer and full GPU validation. The normal chain returned red with a current writer. Omitting its producer returned black with the previous writer.If you're authorized to retest the reproduction described here, build the diagnostic branch with
cargo build --profile diag -p victory --features diagnostics. In PowerShell set$env:VICTORY_RENDER_DEPENDENCIES = '256'(replace 256 with the matching present number, or use an inclusive range such as255-256). Use the same adapter, settings and scene as the #530 run. Run #509 separately if also measuring GPU time.Please share only the revision, adapter and driver, present number, selected intermediate dimensions/format and whether it showed geometry, the final black flag, aggregate no-prior-writer/unresolved/refused/omitted counts, and the first suspect
on_pathedge. For that edge, the shader/pipeline hashes, resource ID and extent, writer/refusal frame, andhost_resource_matchesif available are enough. Texture IDs are run-local. Keep captures, title assets, shader binaries and dumps local. Reproduction steps and interpretation limits@Fimpos on GitHub · 2026-11-24 05:03 UTC · original
Tested
VICTORY_SHOW_TARGET=2560x1440-f28on Windows 11 Pro 25H2 (26200), Ryzen 7 7800X3D, NVIDIA GeForce RTX 5070 12 GB (driver 621.24), 32 GiB RAM (diagprofile, v1.0.2.1).When merged together with #483, #493 (#336), #439, #492, #459, and #546 (
VICTORY_SHADER_LOOP_LIMIT=256):DXGI_ERROR_DEVICE_HUNG(0x887A0006) on the first 30-list 3D world submission is completely gone.333–466 ms/frame) with 0 device removals.VICTORY_SHOW_TARGET=2560x1440-f28cleanly presents the live G-buffer geometry across camera transitions with no D3D12 copy errors.@jeremygold02 on GitHub · 2026-11-24 06:51 UTC · original
I compared the 2560×1440 RGBA8 target with the normal 3840×2160 present on a physical RTX 5070 and Core Ultra 7 265K under Windows 11. I used the size selector from this PR at
951ceb1on the same private mission build used to verify #294 and #489. The test saved the original and the composited backbuffer from the same submission. It selected a target recorded for that frame after a fence-confirmed loading readback. The launcher loaded a verified 682-key pipeline cache.Three consecutive matching presents completed their copy fences and returned
S_OKfrom DXGI. The saved PNGs sample every other pixel in each direction:Across all three pairs, every sampled pixel outside the copied area matched the normal image. A late interval measured 0.3 FPS, and the watchdog ended the run 12 seconds after the loading checkpoint. This pins down an early interval where the selector matched and the copy worked, while the selected target was still black. Later world frames remain unverified on this build.
For anyone comparing captures, the stock patch reads back the normal present source even when the alternate target is displayed. Reading back the composited backbuffer as well was what let me check the image that went to DXGI.
@AKA0GHOST on GitHub · 2026-11-24 08:16 UTC · original
Thanks all for testing this, and sorry for the late follow-up.
@jeremygold02 — good catch: with a target shown,
VICTORY_CAPTUREstill reads back the title's own present source, not the back buffer the window gets. Soframe-N.pngdoes not show the selected target. WithVICTORY_DUMP_TARGETS=1the selected target is in the dump of that frame, which is how I checked it. Reading back the composited back buffer when a target is shown would be the better behaviour; happy to add it here if wanted. A target that is all black in the loading frames matches what I saw: it only fills once world draws bind it.@Fimpos — thanks, that combination going 800+ world frames without a removal is the furthest I have seen reported.
@aycow — thanks for the trace branch, I'll run it when I'm back.
What I saw since opening this, on an RTX 5070 (driver 621.14), with main + #20 + #320 (later + #439), the two stuck mesh passes skipped with
VICTORY_SKIP_PIPELINES:VICTORY_DUMP_TARGETScapture of the same frames, every 2560x1440 RGBA16F and R11G11B10F target stays at exactly 0: the lighting writes nothing. On NVIDIA that is the screen-size lighting compute (160x90 / 320x180 dispatches) being dropped for wave64 reasons. With #439, six of the seven such shaders I dumped translate and run; the seventh needsv_permlanex16(#98). I have not yet captured a world frame on #439 to see whether the lighting targets fill.AI-assisted (Claude Code); no game files attached.
@erLCoder on GitHub · 2026-11-24 13:09 UTC · original
Target-selection observations on GTX 1660 Ti, NVIDIA 581.42, Windows 10 22H2 19045.6466, Ryzen 5 3600, Rust 1.98.1 MSVC and Agility SDK 1.620.2. Built PR
951ceb1separately on main8e79c80+ #493c48b240+ #189 d0fd9bf + #20605981dd, with local SDK exports. The diagnostic build and CLI smoke check passed.cargo test --offline --locked --profile diag -p victory-gpu --features diagnostics --lib show_spec_reads_size_and_format -- --nocapture --test-threads=1— 1 passed, 0 failed, 0 ignored, 56 filtered out (CPU parser). A native D3D12 probe created a synthetic 2560x1440 format-28 RTV/UAV on NVIDIA LUID 00000000:00017c52.A separate title run of the base stack without either preview PR captured several 2560x1440 format-28 targets on frame 9000. Two contained three recognizable character meshes; other targets of that same size and format were flat or black. The size-and-format selector remembers the last matching target, so this observation does not determine which one #530 would show. Runtime preview and movement with #530 remain untested. No title files or screenshots attached.
Codex assembled the worktree, ran the tests and drafted this report.
@AKA0GHOST on GitHub · 2026-11-24 15:55 UTC · original
@mercuryVM thanks for the review and the test run.
<w>x<h>-f<fmt>,<n>,busiest). If #638 lands first, I'll rebase this onto its parser rather than keep two.SHOWNholding anArc: right, a released target stays alive and on screen until another one matches. That's intended for a diagnostic (the window never goes blank mid-run), and I'll add a comment saying so.@erLCoder thanks. Yes, several 2560x1440 RGBA8 targets exist per frame, and the selector shows the last one bound. On this title that was the geometry one in the frames I checked, but that's not guaranteed. An index among the matches would pin it; I'd rather converge with #638's
<n>form than add a second scheme.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 00:24 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:README.md,crates/victory-gpu/src/capture.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.