GPU: report failed DXGI presents before updating frame stats #3785
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3785"
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 andrewpozdnakov7-jpg on 2026-11-28T19:24:27Z.
The host presenter currently drops the HRESULT from DXGI Present and updates the frame meter even when the call fails. Check the HRESULT before reporting a host frame. On failure, the log records the frame and status code once per run of identical failures. A successful call clears that error so a later recurrence gets logged. DXGI Present documentation
A status-sequence regression covers the first failure, a repeated failure, a different failure, recovery and a recurrence. The two existing checks for creation and resize retry and for successful fallback/composited presentation passed, including actual Windows WARP readback. Strict GPU Clippy in both feature configurations and the asset policy passed.
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T19:31:42Z.
Windows CI passed on
234bf68, including both Clippy configurations and the workspace tests. The follow-up separates per-frame housekeeping from the successful-present meter. The status-sequence test, creation/resize retry and actual WARP presentation readback all passed locally on the updated source.The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by jordanamr on 2026-11-28T20:04:07Z.
On
234bf68,check_present_resulttreats every nonnegative HRESULT as a presented frame. DXGI can returnDXGI_STATUS_OCCLUDEDwhen the window is occluded, so a full second of occluded presents still advances the successful-present meter. The new test withS_FALSEalso passes this path.Could the meter count only
S_OK, keep the title's per-frame work running on every completed call, and report zero accepted presents during a fully occluded reporting period? A status sequence of success, occlusion, error, success would also check that the frame-time interval spans the gap. #2935 handles the title-frame and accepted-present counts separately.Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T20:11:37Z.
@jordanamr I updated this in c2ec0ed. The meter counts only S_OK. Every completed attempt still runs the title-frame housekeeping and advances the reporting window. A fully occluded window reports zero accepted presents. Present-to-present time keeps the last accepted timestamp across the reporting boundary.
The regression runs success, occlusion, failure and success at one-second intervals. It reports zero accepts in the occluded window and a 3,000 ms interval at recovery. It also checks that S_FALSE is skipped. The WARP fixture now checks the actual back-buffer pixels before an occluded Present can affect the return value. All four focused tests, both strict GPU Clippy configurations and the asset policy passed.
The next step is your review of the updated head.
AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T20:17:48Z.
I ran the full GPU diagnostics suite on the updated #3785 head
c2ec0ed. WARP 1.0.22 with Agility 1.620.2 gave 248 passed and one ignored with the D3D12 debug layer off and on. The synthetic sequence reports zero accepted presents for the occluded window and a 3,000 ms gap on recovery. The compositor readback also passed.The current heads of #2935 and #3785 conflict in
host.rs. I resolved that overlap in4f6f48f, a merge of exact heads98c48a4andc2ec0ed. It keeps the present-to-present timing and both frame-accounting tests. The title-frame test sends occluded, failed and accepted statuses through the same meter call as production and checks that each advances the title frame clock. On the merge, both WARP runs passed 249 tests with one ignored. Strict Clippy passed with default features and diagnostics, and the asset policy check passed.Integration branch. Please retain the Git authors on cherry-pick or rebase. If folding my changes into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-29T00:08:54Z.
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
c2ec0ed6804e5017fd6311e1e3cb2cd72b42ff7d, base63bcca43c6a00a758510398fa43096ce7e4f7df0(4 commits; last-commit parent4a2d0b7a9b12ffc7465c49dd7f32e467a1ecd02d).cargo test --locked -p victory-gpu --lib --features diagnostics -- host::tests::present_errors_clear_after_success --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 248 filtered, exit 0.cargo test --locked -p victory-gpu --lib --features diagnostics -- host::tests::occluded_windows_count_zero_presents_and_keep_the_gap --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 248 filtered, exit 0.git grep -Fon the parent for both test names returned no match (tests are new);git diff --check 63bcca43 HEADclean (1 file, +135/-32).CARGO_TARGET_DIR(target-3785-watch) withCARGO_BUILD_JOBS=2, never shared. Two pre-existingfetch_updatedeprecation warnings in the lib test build.AI-assisted (Hy4 flash).
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.