Menu warm-up: victory play makes host pipelines beside the title at its menus #3744

Closed
stasadance wants to merge 1 commit from upstream-pr/3744 into main
stasadance commented 2026-11-30 05:51:44 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by stasadance on 2026-11-30T05:51:44Z.


What it changes

victory play now makes host pipelines in the background while the title sits at its menus, so fewer are made in-world.

  • It starts victory warm on a third of the logical cores (at least 2), at idle priority, in a job object with KILL_ON_JOB_CLOSE, so it can never outlive the game.
  • The job ends once frames hold 1000 draws or more for 5 s in a row (the frame meter's draws_per_frame), i.e. once the player is in the world.
  • It goes on from warm-done.txt at the next start.
  • It never touches the host pipeline library (VICTORY_WARM_SHARED taken out). Its slow list goes to slow-pipelines-warm.txt, which into_library reads too, since the game writes slow-pipelines.txt over whole.
  • VICTORY_MENU_WARM (default 1; 0 off; 2 and up: that many processes) is in play's settings and read from victory-settings.txt.

How it was tested

  • GPU and profile: RTX 4090 on Linux (NVIDIA 620.73.04, kron4ek Wine 11.23, vkd3d-proton GE cae8353ed), DLSS + frame generation 2X
  • Before: pipelines known to the cache but not yet made were all made on first use in-world.
  • After: at the menus, the warm made 6,000 of 88,871 known pipelines in 419 s beside the title (10 processes), and the run went on in-world without errors.
  • cargo test passed for the crates it touches: native cargo test cannot build victory-gpu on a Linux host (same on main), so no; cargo xwin clippy for the Windows target adds no warning over current main.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #1001 (warm inherits play's settings), #2168 (warm-up restarts under Proton), #1268.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5559834163 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3744). Originally posted by [stasadance](https://github.com/stasadance) on 2026-11-30T05:51:44Z. --- ## What it changes `victory play` now makes host pipelines in the background while the title sits at its menus, so fewer are made in-world. - It starts `victory warm` on a third of the logical cores (at least 2), at idle priority, in a job object with `KILL_ON_JOB_CLOSE`, so it can never outlive the game. - The job ends once frames hold 1000 draws or more for 5 s in a row (the frame meter's `draws_per_frame`), i.e. once the player is in the world. - It goes on from `warm-done.txt` at the next start. - It never touches the host pipeline library (`VICTORY_WARM_SHARED` taken out). Its slow list goes to `slow-pipelines-warm.txt`, which `into_library` reads too, since the game writes `slow-pipelines.txt` over whole. - `VICTORY_MENU_WARM` (default 1; 0 off; 2 and up: that many processes) is in play's settings and read from `victory-settings.txt`. ## How it was tested - GPU and profile: RTX 4090 on Linux (NVIDIA 620.73.04, kron4ek Wine 11.23, vkd3d-proton GE cae8353ed), DLSS + frame generation 2X - Before: pipelines known to the cache but not yet made were all made on first use in-world. - After: at the menus, the warm made 6,000 of 88,871 known pipelines in 419 s beside the title (10 processes), and the run went on in-world without errors. - `cargo test` passed for the crates it touches: native `cargo test` cannot build `victory-gpu` on a Linux host (same on main), so no; `cargo xwin clippy` for the Windows target adds no warning over current main. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #1001 (warm inherits play's settings), #2168 (warm-up restarts under Proton), #1268.
stasadance commented 2026-11-30 09:17:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by stasadance on 2026-11-30T09:17:02Z.


Added two commits after running this under Wine:

  • Wine's CreateProcess ignores IDLE_PRIORITY_CLASS, so the warm processes ran at normal priority beside the title. Each warm process now sets its own priority class to IDLE (wineserver maps that), and under Wine one loop holds all of their threads at nice 19 and idle I/O. VICTORY_WARM_NICE=0 leaves them alone.
  • Menu frame cap: the frame clock ticks at most VICTORY_MENU_CAP_FPS (120 by default, 0 off) times a second until the player is in the world or while the warm-up runs, so the menus stop taking a core from the warm. It has its own name; at first it shared one with the frame-rate cap setting.
  • warm-made.txt keys pipelines a warm made by their library name, so a translator change that gives the same code doesn't make all ~88,000 again. The window title shows "warming 15.0k/88.9k pipelines" while it runs.

Tested on an RTX 4090 under kron4ek Wine 11.23 (run 20261130-020521): the menus ran at 119.9-120.1 fps (title bar "120 fps 8.3 ms/frame ... warming 3.6k/88.9k pipelines"), and each warm worker was reniced to 19 within 1-2 s of starting (sampled every 3 s; workers live about 10-40 s each, so a few % of their time is still at the inherited nice). Windows clippy adds no warning over main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7273989660 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3744#issuecomment-7273989660). Originally posted by [stasadance](https://github.com/stasadance) on 2026-11-30T09:17:02Z. --- Added two commits after running this under Wine: - Wine's CreateProcess ignores IDLE_PRIORITY_CLASS, so the warm processes ran at normal priority beside the title. Each warm process now sets its own priority class to IDLE (wineserver maps that), and under Wine one loop holds all of their threads at nice 19 and idle I/O. `VICTORY_WARM_NICE=0` leaves them alone. - Menu frame cap: the frame clock ticks at most `VICTORY_MENU_CAP_FPS` (120 by default, 0 off) times a second until the player is in the world or while the warm-up runs, so the menus stop taking a core from the warm. It has its own name; at first it shared one with the frame-rate cap setting. - `warm-made.txt` keys pipelines a warm made by their library name, so a translator change that gives the same code doesn't make all ~88,000 again. The window title shows "warming 15.0k/88.9k pipelines" while it runs. Tested on an RTX 4090 under kron4ek Wine 11.23 (run 20261130-020521): the menus ran at 119.9-120.1 fps (title bar "120 fps 8.3 ms/frame ... warming 3.6k/88.9k pipelines"), and each warm worker was reniced to 19 within 1-2 s of starting (sampled every 3 s; workers live about 10-40 s each, so a few % of their time is still at the inherited nice). Windows clippy adds no warning over main.
stasadance commented 2026-12-01 02:13:17 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by stasadance on 2026-12-01T02:13:17Z.


Merged current main (e1251c3) into this branch (5258c3e). Main independently added done marks by pipeline name (known::made_for, library::name_only, done_names in warm.rs), which duplicated this PR's warm-made.txt skip. I dropped ours and kept main's. What's left is the menu warm-up itself: menu_warm.rs, VICTORY_MENU_WARM, low-priority warm workers beside the title, the menu frame cap and warm progress in the title bar. Main's #4176 preload runs before launch, so it doesn't overlap with this. Windows-target clippy for victory-gpu, victory-hle and victory builds with no new warnings. The in-game run quoted above was on the pre-merge branch.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7298374237 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3744#issuecomment-7298374237). Originally posted by [stasadance](https://github.com/stasadance) on 2026-12-01T02:13:17Z. --- Merged current main (e1251c3) into this branch (5258c3e). Main independently added done marks by pipeline name (`known::made_for`, `library::name_only`, `done_names` in `warm.rs`), which duplicated this PR's `warm-made.txt` skip. I dropped ours and kept main's. What's left is the menu warm-up itself: `menu_warm.rs`, `VICTORY_MENU_WARM`, low-priority warm workers beside the title, the menu frame cap and warm progress in the title bar. Main's #4176 preload runs before launch, so it doesn't overlap with this. Windows-target clippy for victory-gpu, victory-hle and victory builds with no new warnings. The in-game run quoted above was on the pre-merge branch.
stasadance commented 2026-12-01 03:50:36 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by stasadance on 2026-12-01T03:50:36Z.


Closing this. Main's preload (#4176) now builds the pipeline book before launch: 12,428 pipelines in 606 s on our 4090 rig, run v11j. That leaves nothing for the menu warm-up or its title-bar progress to do. Thanks to everyone who looked at it.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7300119075 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3744#issuecomment-7300119075). Originally posted by [stasadance](https://github.com/stasadance) on 2026-12-01T03:50:36Z. --- Closing this. Main's preload (#4176) now builds the pipeline book before launch: 12,428 pipelines in 606 s on our 4090 rig, run v11j. That leaves nothing for the menu warm-up or its title-bar progress to do. Thanks to everyone who looked at it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!3744
No description provided.