GPU: display mode changes and devices added or removed go to the log and to the removal report's trail #1004
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1004
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1004"
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?
@PiloteCode on GitHub · 2026-11-25 15:40 UTC · original
PiloteCode:pr/window-changes→main· +36 −15 · 9 files · 6 commits · openBased on
0b0074e0. Four commits:mainthat #992 also starts with.host.rs: about 20 lines.Why
On our test machine, Windows reset the card several times in one day ("Resetting TDR" from the display driver), and each reset ended the run under way with its host device lost. The system's own logs showed what came before: each time, 2.5 to 4.6 s earlier, a remote-desktop host had ended its session and removed its virtual input device. Nothing in our log showed it, so the losses first looked like ours.
What changes
Our window now notes two messages the system sends every top-level window:
WM_DISPLAYCHANGE, with the new size and bits per pixel ("the display's mode changed");WM_DEVICECHANGEwithDBT_DEVNODES_CHANGED("a device was added to or removed from the system").Each goes to the log and to the trail (
host::trail). The report of a lost device prints the trail with how long before the loss each entry came, so the report says whether a display or device change preceded the loss.In every build, with no switch: two log lines per change, which is rare. The window procedure otherwise does as before (
DefWindowProcW).Tested
The branch was checked as it is, on
0b0074e0:cargo test -p victory-gpu --features diagnostics -- --test-threads=1withVICTORY_D3D12_WARP=1: 185 passed, 1 failed, 6 ignored. The failure isdepth_bounds_pipeline_loads_and_filters_draws: WARP does not reject the pixels outside the depth bounds, the same as onmain.cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features: clean.cargo build --release -p victory,cargo build --profile diag -p victory --features diagnosticsandcargo xtask policypass.In our tree, these lines have been in every run since they went in. No unit test: the messages come from the system.
Not tested
c36971b2) into the window-changes branch: upstream's frame capture, card-memory windows and texture copy-back; no conflict d1d247d7d6@PiloteCode on GitHub · 2026-11-25 22:11 UTC · original
Merged
main(c36971b) into the branch: a merge commit on top of the commits already here (d1d247d), then one lint commit. No conflict: this branch's change is inwindow_proc, whichmain's commits since0b0074edo not touch.Added after the merge: one lint commit for
main's newer code, the same as on our other open branches:map_entryinfpsbox.rs,collapsible_ifinpipeline/library.rs,manual_is_multiple_ofinqueue.rs,shadow.rs,draw.rsandwatch.rs. Without itcargo clippy --workspace --all-targets --locked -- -D warningsfails onc36971b, with or without--all-features.Checked, the branch as it is (
66fa13b), every test on the software adapter:cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features: clean.cargo xtask policy,cargo build --release -p victoryandcargo build --profile diag -p victory --features diagnostics: pass.cargo test -p victory-gpu --features diagnostics -- --test-threads=1withVICTORY_D3D12_WARP=1: 200 passed, 1 failed, 6 ignored, as onmain. The failure isdepth_bounds_pipeline_loads_and_filters_draws: WARP does not reject the pixels outside the depth bounds.cargo test -p victory-shader -- --test-threads=1withVICTORY_WARP=1: 212 passed, 4 failed, 3 ignored, the same four as onmainon the software adapter.cargo test -p victory-hle -- --test-threads=1: 100 + 1 passed, as onmain.cargo test -p victory -p victory-loader: passed.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.