fix(gpu): present to the title's window, not a pseudoconsole's 0x0 window (white window) #49
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/trustno1-coder--VIctory-NVIDIA!49
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-49"
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?
@JRamos1993 on GitHub · 2026-11-27 14:26 UTC · original
JRamos1993:fix/title-window-pseudoconsole→main· +80 −7 · 2 files · 1 commits · openProblem
title_window()invictory-gpu/src/host.rstakes the first visible top-level window of the process for the swap chain. When victory is started under a pseudoconsole (from Windows Terminal, or by a parent process that has one, such as a script or tool started from it), the process also owns a visiblePseudoConsoleWindowof 0x0 pixels. That is the windowGetConsoleWindowreturns under ConPTY. Whenever it is above the title's window in z-order when the swap chain is made, the swap chain is made for it. The title then runs and presents, but its own window is never presented to and stays white. The frame-rate caption goes to the invisible window too.On an RTX 5090 it happened in 1 of 7 starts of
d12eb1b, with theplaydefaults (DLSS Quality, frame generation ready). It looked like a frame generation problem, but it is not one: forcing the same z-order turns the window white with--dlss offas well (below).Fix
victory.wndproc, set bylifecycle::hook). Without one, it is the first visible window with a non-empty client area. A pseudoconsole's window alone gives none, so our own window is made, as before when the title had made no window.pick_title_window) with four unit tests.TITLE_PROCinlifecycle.rs, since the property is now looked up by name fromvictory-gputoo.Verification
RTX 5090 (driver 621.24), Windows 11 build 26200, Series X profile at 2560x1440.
Forced repro: for the first 10 s after the start, a helper script raises the process's
PseudoConsoleWindowto the top of the z-order every 20 ms (SetWindowPos(HWND_TOP, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE)). The game window was captured withPrintWindowevery 5 s.d12eb1bplay --dlss offplay --dlss offplay(DLSS Quality, frame generation ready)Without the helper, this branch also ran normally (frames and caption) with the default
playsettings.CI commands, this branch against
d12eb1b:d12eb1balready: the workspace run stops at anoperator precedencelint invictory-formats(lib test) in both configurations. Run on the two crates this touches (cargo clippy -p victory-gpu -p victory-hle --all-targets --locked -- -D warnings),d12eb1band this branch both give 39 errors. None of them is in the changed lines.cargo test --workspace --locked: the four new tests pass.victory-gpulib: 418 passed, 2 failed, 35 ignored. The two failures,indirect::tests::host_list_budget_starts_empty_at_each_submissionandindirect::tests::warp_batch_charges_every_execution, fail the same way ond12eb1b.AI use
This change was made with Claude Code (Claude Opus 5.5): the diagnosis, the patch, the tests and the runs above. It was reviewed and run on my PC (RTX 5090) before being sent.
@cloph-dsp on GitHub · 2026-11-28 02:35 UTC · original
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
6cd5231aedd2e2636a1cd2b849c8ce3000369a36, merge based12eb1b23da4cad2f551a3dd49e82a87e564122a.cargo test --locked -p victory-gpu --lib -- host::title_window_tests::the_titles_window_wins_over_a_pseudo_console_above_it --exact --test-threads=1 --quietcargo test --locked -p victory-gpu --lib -- host::title_window_tests::the_titles_window_counts_even_while_its_client_area_is_empty --exact --test-threads=1 --quietcargo test --locked -p victory-gpu --lib -- host::title_window_tests::a_pseudo_console_alone_is_no_window_to_present_to --exact --test-threads=1 --quietgit grep -Ffor these test names on the base returned no hits (tests are new on this PR);git diff --check d12eb1b HEADclean (2 files, +80/-7).CARGO_TARGET_DIR(never shared) withCARGO_BUILD_JOBS=2. Note: the recon-suggested bare filter form (cargo test ... <test> -- --exact) matched 0 tests; the correct form is--lib -- <test> --exact.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.