[Ready to merge] GPU diagnostics: a black frame's trace keeps the draws that end the frame #954
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#954
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@EduAzevedo on GitHub · 2026-11-24 14:27 UTC · original
PR creation is limited to collaborators, so this is a branch ready to merge: EduAzevedo/VIctory@diag/black-frame-tail (one commit,
2e2f167, on top offfe310e).Why
The black-frame trace (
VICTORY_LOG=info,victory_gpu::draw=debug) kept a frame's first 256 draws. A world frame runs thousands, so the trace stopped in the geometry passes and never reached the lighting, composite and full-screen draws that end the frame, which is what a black picture (#850, #293) is about. In a run onintegration/testersevery black frame in the world was cut at 256 lines, all of them G-buffer mesh draws.What
... N draws not kept here (VICTORY_BLACK_FRAME_DRAWS raises the limit).VICTORY_BLACK_FRAME_DRAWS=<n>sets the limit (default 256, as before; at least 2). Documented in the README's diagnostics table.DROPPEDmark still goes on the draw traced last, when it was kept.Tested
cargo test -p victory-gpu --lib: 53 passed, 0 failed, 1 ignored, including three new tests (frame_trace_tests: a short frame is kept whole; a long frame keeps both ends and counts what was left out; the drop mark lands on the last kept draw and not on one left out). No GPU needed.cargo clippy -p victory-gpu --all-targets -- -D warnings, with and without--features diagnostics: clean.cargo xtask policy: 154 files ok.ffe310e+ #493 + #189 + #206 with this commit,VICTORY_SHADER_LOOP_LIMIT=32. Two black frames in the first world minutes now read... 106 draws not kept hereand... 1,108 draws not kept here, followed by the frame's last 128 draws (shadow and 2560x1440 passes and their drops), which the old trace never showed.No game data in this PR.
@DrDarkDK on GitHub · 2026-11-24 14:41 UTC · original
I checked drop attribution on
2e2f167with a deterministic trace test. When draw A enters the trace, draw B is recorded next, and A then reports a failure, the trace marks B asDROPPED. The drop handler marks the latest entry, so an interleaved recording can point a black-frame investigation at the wrong draw.This behavior also exists on the base revision. AI-assisted. Synthetic Windows test only.
@andrewpozdnakov7-jpg on GitHub · 2026-11-24 15:47 UTC · original
I reproduced the interleaved
DROPPEDattribution on2e2f1678b3ad765b70d38e252b49c3b3137c726e. Draw A entered the trace, then draw B. Reporting A’s failure marked B.The follow-up carries the recording ID through draws, indexed draws and mesh dispatches. The same test now marks A. The retention tests also pass for evicted entries and failures reported after a frame has been drained. Fix and regression
One commit directly on the author head. Windows GPU diagnostics: 58 passed, 1 ignored. The default build check, strict Clippy and asset policy passed. AI-assisted.
@EduAzevedo on GitHub · 2026-11-24 16:23 UTC · original
Thanks @DrDarkDK for finding it and @andrewpozdnakov7-jpg for the fix. I brought
83a8ec3into the branch as is (a fast-forward on2e2f167, your authorship kept), so this issue now carries both commits. Here on Windows:cargo test -p victory-gpu --lib55 passed, 1 ignored (includinginterleaved_failure_marks_the_draw_that_failed), Clippy clean with and without diagnostics, asset policy ok.@Marvisak on GitHub · 2026-11-25 06:51 UTC · original · edited 2026-11-25 18:46 UTC
Automated triage for the maintainers.
This is a diagnostics-only change and is in scope. It is open as PR #1254 from the same branch, which carries both commits from this thread:
2e2f167, and83a8ec3, which fixes the interleavedDROPPEDattribution that also exists onmain. #1254 is based onffe310eand needs a rebase onto currentmainbefore it can be reviewed against it.New: a related frame-boundary fix is open as PR #2666. It drains the draw trace at every PresentX, including one with zero planes, so draws from a skipped present no longer appear in the next black-frame report. The author says it merges cleanly with a rebased #1254.
Generated by Claude Code
@StExpeditus on GitHub · 2026-11-25 09:37 UTC · original
Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, RTX 5060 Ti, driver 621.24, Rust 1.98.1 MSVC), commit
83a8ec3:cargo test -p victory-gpu --locked --no-fail-fast (with--features diagnostics)-> 58 passed, 0 failed, 1 ignored. Synthetic tests only, no game files.@StExpeditus on GitHub · 2026-11-25 09:38 UTC · original
Addendum: this branch is far behind current main (the
victory-gpudelta is 37 files, ~11.2k lines), so the run above is the branch as-is on its old base; it needs a rebase before a clean cherry-pick.@andrewpozdnakov7-jpg on GitHub · 2026-11-25 17:46 UTC · original
A related frame-boundary case is covered in #2666. With a zero-plane PresentX, the same synthetic trace test retains the previous draw on
13f91caand clears it at the frame boundary on the patch. Serial WARP GPU tests passed with 199 passed and one ignored in both debug flag settings. The patch merges cleanly with the offered #1254 rebase. CommitIf you fold the change or test into another commit, please preserve its Git author or add this trailer.
Co-authored-by: andrewpozdnakov7-jpg [email protected]