GPU diagnostics: name the first observed black frame accurately #2835
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by 109User109 on 2026-11-25T21:48:59Z.
Problem
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.
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T21:51:31Z.
Review: COMMENTED
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.
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T22:28:35Z.
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.Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T00:24:32Z.
Review: COMMENTED
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.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T01:51:51Z.
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]
Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-26T02:16:01Z.
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.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T03:22:31Z.
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
Imported from Marvisak/VIctory. Originally posted by 109User109 on 2026-11-26T13:00:41Z.
Applied @andrewpozdnakov7-jpg's patch as
a2fdd67aon top of this PR, preserving the original Git author.Co-authored-by: andrewpozdnakov7-jpg [email protected]
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T13:16:59Z.
@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.Imported from Marvisak/VIctory. Originally posted by 109User109 on 2026-11-26T14:18:58Z.
Fast-forwarded the PR branch to @andrewpozdnakov7-jpg's merge resolution
1f683492, which keepsa2fdd67as first parent and resolves the conflict with currentmain.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T19:39:51Z.
I checked
1f68349with the DXGI present status handling in #3785. Combined d43d682 keeps both exact PR heads.The black-frame check still reports a first observation separately from a transition. It keeps the last sample when a frame has no sample. The WARP fixture delivered black RGBA8, unprobed FP16, black RGBA8 and nonblack RGBA8 in order and returned Some(true), None, Some(true), Some(false). The status and retry tests passed in the same three runs, along with compositor recovery, strict all-feature GPU Clippy and the asset policy.
The maintainer can use the branch if these changes land together. Please retain the Git authors on cherry-pick or rebase.
AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T20:20:41Z.
I refreshed the integration for #3785's accepted-present change. Combined aeb634d keeps both exact heads.
In the unadjusted merge, the hidden WARP window returned None after all four present attempts. The updated fixture reads the actual probe after rendering and before DXGI Present. It verified black RGBA8, unprobed FP16, black RGBA8 and nonblack RGBA8 as Some(true), None, Some(true), Some(false). Any accepted result is also checked against the probe. Six focused tests passed in each of three WARP runs, plus strict all-feature GPU Clippy and the asset policy.
The maintainer can use this refreshed branch if the changes land together. Please retain the Git authors on cherry-pick or rebase.
AI-assisted with OpenAI Codex.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.