Count a frame only after DXGI accepts the present #17
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!17
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-17"
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?
@UwUCammie on GitHub · 2026-11-25 23:36 UTC · original
UwUCammie:fix/avatarmanz-count-accepted-presents→main· +41 −3 · 1 files · 1 commits · merged 2026-11-26 08:17 UTCThe window’s FPS counter increases when DXGI reports that the window is occluded or that the present failed. That makes recorded frame rates unreliable when diagnosing a stall.
Count the frame and update the diagnostic panel only when the swap chain returns
S_OK. A change to a failing or occluded status produces one warning. The title’s queue still finishes its frame normally, including its timeline and diagnostic callbacks. The upstream discussion explains why keeping that distinction matters. Marvisak/VIctory#1461The regression test feeds the meter a success, an occlusion, two failures and a recovery, and checks that it counts two frames. It passed under Wine 11.22. I also built the optimized diagnostic executable. Test host was an RX 7900 XT with RADV 26.3.1. This is the corresponding change from the fxceless fork, adapted to the panel here.
@Adika713 on GitHub · 2026-11-26 00:19 UTC · original
I rechecked
8699d96on native Windows (RX 6950 XT, Ryzen 5 3600, rustc/cargo 1.98.1), with serial tests (CARGO_BUILD_JOBS=1,--test-threads=1).cargo test --locked -p victory-gpu --lib present_status_tests -- --test-threads=1gives1 passed, 0 failed. The unmodified full lib run has one failure,descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in; that exact test fails 10/10 on unmodifiedmain0a43566as well, so it is pre-existing. With only that test skipped, PR #17 gives326 passed, 0 failed, 34 ignoredversus325 passed, 0 failed, 34 ignoredonmain.I also read the follow-on effect in the existing review and can confirm it in the code at
queue.rs:1024:shown.unwrap_or(false)turns a failed or occluded present into “black”, which will resetLASTand can log a false second black onset. Preserving the last accepted frame's black state while still taking the per-frame draw counters looks like the right adjustment. I made no repository change.AI-assisted: OpenCode, model Big Pickle. No game data.
@gomeaw on GitHub · 2026-11-25 23:41 UTC · original · reviewed
I ran
the_meter_counts_successful_presents_across_a_failurefrom8699d96on native Windows with both the default and diagnostics builds. Both passed. Windows runI noticed one follow-on effect in the black-frame diagnostic. A failed or occluded present now returns
Nonetoqueue::blinks. That path currently usesshown.unwrap_or(false)and setsLASTto the result. An accepted black frame, an occluded present, then another accepted black frame would therefore be logged as a second onset of black. For captures used to diagnose the NVIDIA stalls, preserving the last accepted frame's black state acrossNonewould keep those transitions accurate. The per-title-frame draw drain can still run on every call.@MoonYueya on GitHub · 2026-11-26 05:28 UTC · original
Tested on an RTX 3080 10 GB, driver 32.0.16.1742, Ryzen 7 7700, 31.1 GB RAM, Windows 11 26300, merged into MoonYueya/VIctory-Kira
a3de053on top ofe2a28ectogether with the other open NVIDIA PRs (#47 #48 #24 #23 #78 #42 #66 #18 #10 #4 #58 #17).cargo test --workspace --locked --no-fail-fast -- --test-threads=1: 936 passed, 0 failed, 45 ignored after this PR was merged (never below the count before it; the branch started at 923).What this does not show: the PR was not run in the game on its own, so this is unit tests plus a combined run, not an in-game verification of this PR by itself; nothing here is about picture quality.
AI-assisted.
@avatarmanz on GitHub · 2026-11-26 07:55 UTC · original
Merged into main in the next push (tests pass); thanks.