GPU diagnostics: name the first observed black frame accurately #2837
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!2837
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2837"
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?
@109User109 on GitHub · 2026-11-25 21:48 UTC · original
109User109:codex/first-black-frame-log→main· +101 −10 · 2 files · 3 commits · openProblem
The black-frame diagnostic starts with
LAST = false. When the first sampled frame is black, it says "a black frame after a frame that was not", although no previous frame was sampled. This showed up while investigating a Windows run on an AMD integrated GPU.Change
Track whether a prior frame was sampled. Label the first observed black frame separately, and keep the existing transition message when a sampled nonblack frame precedes it. An unsampled present does not replace the last known result. The new unit test covers first black, a real transition, repeated black, and unsampled/nonblack frames.
Verification
cargo xtask policy: 186 files ok.git diff --check: clean.cargo test -p victory-gpu --features diagnostics black_frame_tests --lockedon Linux. The existing Linux build fails first inresource.rsbecauseIDLE_FRAMESandIDLE_MSare unavailable under that target, so the new test could not run here. The repository's Windows CI runs the unit test.No game files or captures are included. Assisted by OpenAI Codex.
@oni-swr on GitHub · 2026-11-25 22:28 UTC · original
Independent Windows verification of exact head
d151391c71a9dd7ef8f94b526a11ab8b9f81e908againstmainatf3578e3.cargo test -j 4 --locked -p victory-gpu --features diagnostics --libpassed 203 tests, including the first-black-frame regression, with one benchmark ignored. Main passed 243 tests with one benchmark ignored. DXGI reported the Microsoft software adapter (VendorId=0x1414,Flags=0x2). This head merges cleanly into current main and alongside #2838–#2840.The regression confirms the first observed black frame is distinct from a transition. The code retains the prior sample when a present has no sample. Claude’s earlier negative control on the integration branch failed when the first black frame was reported as a transition again.
Fresh verification and review by Codex (
gpt-6.2-sol). Synthetic inputs only, with both WARP switches set and Windows SDKdxil.dll.@andrewpozdnakov7-jpg on GitHub · 2026-11-26 01:51 UTC · original
I found one production path that still loses the unknown state.
Host::presentusedSome(probe.is_some_and(...)), so a presentation without a sample told your new warning logic that the frame was nonblack.714b6ea is one commit directly on
d151391c71a9dd7ef8f94b526a11ab8b9f81e908. The same Windows/WARP test presents RGBA8 black, FP16, RGBA8 black, and RGBA8 color. It verifies the FP16 swap-chain format and observes[true, false, true, false]before, then[true, None, true, false]. Six paired runs, full GPU diagnostics (204 passed, 1 ignored), strict Clippy, and asset policy passed on the exact branch. I also checked the change with the current multiplane presenter and #2962 on main63bcca4, adapting the fixture call to the new signature. All 249 GPU diagnostics tests passed there, with one ignored.If you take the patch or test, please preserve its Git author. If you fold it into another commit, please add:
Co-authored-by: andrewpozdnakov7-jpg [email protected]
@steven-seagull27 on GitHub · 2026-11-26 02:16 UTC · original
I checked the warning emitted after real
Host::presentresults reach this PR'sblinkslogic on RTX 5080 and WARP. With #2962 and #2827 present, a sequence of RGB10 red 30 → FP16 → RGB10 red 30 triggered a spurious black transition on each adapter. Both RGB10 frames had the same decoded PNG red value (7) and the same sampled level (7).With the return expression from Andrew's
714b6ea, FP16 returnedNone, the level history stayed intact and the duplicate warning disappeared. The opposite control — RGB10 green 31 → FP16 → RGB10 blue 30 — still emitted the real nonblack-to-black transition. Across 30 presents per adapter the patch removed precisely three spurious warnings, one per RGB10 resource format. All 30 swap-chain calls returnedS_OK, including FP16.I forwarded the actual host return into
blinksin a local test fixture and recorded its message choice. Windows build 26300.10075, NVIDIA driver 621.40. Tested with Codex assistance.@Marvisak on GitHub · 2026-11-26 03:22 UTC · original
Automated triage for the maintainers.
Verdict: needs work. The relabelling in
blinks(crates/victory-gpu/src/queue.rs) is fine, andblack_frame_messageis tested.But the PR says "an unsampled present does not replace the last known result", and in production that does not hold:
Host::present(crates/victory-gpu/src/host.rs, ~3483) returnsSome(probe.is_some_and(...)), so a present that took no sample arrives asSome(false)and is still taken as a nonblack frame. Two comments above show this producing spurious transition warnings. Please haveHost::presentreturnNonewhen no probe was taken (as in the commit linked by andrewpozdnakov7-jpg, with credit) so the newOptionstate actually reachesblinks.CI:
checkpassing.Generated by Claude Code
@kotekompotek on GitHub · 2026-11-25 21:51 UTC · original · reviewed
Correct: Option tracking distinguishes 'first observed black' from 'black after non-black', and shown.or(last.0) keeps the last known state across frames with no copy info — so a black frame following unknown state doesn't re-trigger 'after a frame that was not'. The extracted black_frame_message is testable. LGTM.
@fuzeofficlal on GitHub · 2026-11-26 00:24 UTC · original · reviewed
Verified head
d151391ccleanly merged ontoorigin/main(63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + D3D12 WARP +VICTORY_D3D12_DEBUG=1).Code Review
LASTfrombooltoOption<bool>withshown.or(last.0)cleanly preserves the previous sampled state across unsampled frames and accurately separatesNone -> Some(true)("first observed black frame") fromSome(false) -> Some(true)("a black frame after a frame that was not").Local Verification (
--features diagnostics)VICTORY_D3D12_DEBUG=1):black_frame_tests+queue::tests: 6/6 passed on both adapters.victory-gpu --features diagnostics --lib): 247/247 passed (1 ignored).cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--features diagnostics) &cargo xtask policy(191 files ok): clean.Looks clean and ready to merge.
@109User109 on GitHub · 2026-11-26 13:00 UTC · original
Applied @andrewpozdnakov7-jpg's patch as
a2fdd67aon top of this PR, preserving the original Git author.Co-authored-by: andrewpozdnakov7-jpg [email protected]
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 13:16 UTC · original
@109User109 thanks for preserving the author on
a2fdd67. I resolved its conflict with upstream63bcca43in1f68349. The merge keepsa2fdd67as its first parent and adapts the black-probe test to the current multi-planeHost::presentsignature.The real WARP swap-chain test returned
[Some(true), None, Some(true), Some(false)]for black RGBA8, unprobed FP16, black RGBA8 and nonblack RGBA8. The compositor failure/recovery test and the first-observed-black message test also passed. With app-local Agility/WARP, the full GPU diagnostics suite had 249 passes and 1 ignored, and strict GPU Clippy passed with all features.You can fast-forward this branch to the merge commit if you want to take the resolution. If moving the probe test separately, please retain its Git author or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>when folding it into another commit. AI-assisted with Codex.@109User109 on GitHub · 2026-11-26 14:18 UTC · original
Fast-forwarded the PR branch to @andrewpozdnakov7-jpg's merge resolution
1f683492, which keepsa2fdd67as first parent and resolves the conflict with currentmain.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.