Play defaults: send free first and sweep ahead on; learned pages and late fills stay off #4815

Closed
githubkdskkd wants to merge 1 commit from upstream-pr/4815 into main
githubkdskkd commented 2026-12-01 09:52:19 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by githubkdskkd on 2026-12-01T09:52:19Z.


Fixes #

Revision of this PR's first version. Its four-switch defaults were measured slower by two independent benches in the comments below (@DoubleD17, @tillo88). The defaults are now only the two that measured neutral; VICTORY_CARD_STEPS_LEARN and VICTORY_LATE_FILLS are back off. The revision commit (618af305) sits on top of this branch and is being pushed here; until it lands, the diff above still shows the first version's four.

What it changes

Two switches that are already in the code but off by default are now on in both launchers (apps/victory/src/play.rs, scripts/play-nvidia.ps1), and the README's rows say the new defaults:

  • VICTORY_SEND_FREE_FIRST=1 — a submission that must wait for earlier card work is split, and its first lists, which need nothing from that work, go to the card at once (host.rs:6331-6345, applied at 9677). Its doc records 37 ms a frame of the card standing with nothing of ours queued while the submitting thread worked (a play run of 2026-11-27).
  • VICTORY_SWEEP_AHEAD=1 — the once-a-second sweep runs while card work is still in flight, instead of the settle that stood the submitting thread until the card had run all it was given (host.rs:4820-4835, applied at 10265).

Why the other two stay off — the ablations in this PR's comments, attributed:

switches at 1 fps submitting thread waiting on the card source
all four (first version) -21.3 % +21.3 ms DoubleD17 (RTX 5070, 5800X), 4 runs
all four (first version) -13.7 % (27.61 vs 32.01) submitting thread 20.5 → ~35 ms; frame line's "on the GPU" ~2.3 → ~15 ms tillo88 (RTX 5070 Ti, 9800X3D, v2026.11.30.03), 2 runs
CARD_STEPS_LEARN alone -29.0 % +29.3 ms DoubleD17, 2 runs
CARD_STEPS_LEARN + LATE_FILLS -21.5 % +20.6 ms DoubleD17, 2 runs
LATE_FILLS alone -0.3 % -0.0 ms DoubleD17, 1 run
SEND_FREE_FIRST alone -0.4 % +0.0 ms (preparation -0.4 ms) DoubleD17, 2 runs
SWEEP_AHEAD alone -0.8 % -0.3 ms (preparation +0.0 ms) DoubleD17, 2 runs

The learning of late-written pages makes the submitting thread wait on the card: tillo88's learn line read "1.00 submissions waited for a learned page; 141 pages learned" a frame, with "175.0 fills in 4.00 submissions done when the card got to them (VICTORY_LATE_FILLS)". tillo88's p99 improving (63.7 → 56.4 / 49.0 ms across the two runs) is not a mitigating factor, as that comment itself says: at about 27.6 fps every frame is longer. The warm-up 0x80070057 in the second bench is #2237's known crash, not this PR's.

LATE_FILLS does nothing without CARD_STEPS_LEARN (it only softens that loss), so both stay off. SEND_FREE_FIRST and SWEEP_AHEAD measured neutral within the controls' spread (1.9 to 4.2 ms of preparation) and are kept for the card-idle pattern their docs record; no rig measured a gain from either, and neither was ablated on the second rig.

No code changes. Each switch stays overridable per run — --set NAME=0 in victory play, -More @{NAME='0'} in the launcher — and the F1 menu's saved settings win over both launchers' tables (play.rs:648-663; play-nvidia.ps1:260-288).

How it was tested

  • GPU and profile: none available where this was prepared. The numbers above are the two benches' of the first version's four switches, not a re-measurement of this revision; the two kept switches were ablated only on the RTX 5070 rig.
  • Before: / After: — not re-measured; the first version's benches are the before.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): — (no shader changes).
  • cargo test passed for the crates it touches: not run — no Windows PC and no Rust toolchain where this was prepared. The change adds no code: two default-table entries, the same two in the launcher's table, and their README rows.

What was checked instead, on main at 5fabb46e: both kept switches exist and the launchers' value 1 turns each on (SEND_FREE_FIRST is switch::on, on unless 0 — host.rs:6344; SWEEP_AHEAD reads exactly 1 — host.rs:4834); CARD_STEPS_LEARN and LATE_FILLS default off again (card_steps.rs:1203 and 1403); and the override chain was read in both files (menu saves and --set/-More insert over the tables before the environment is written).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3809 (four other play defaults in the same two files), #1780 (the learn machinery), #4558 and #4226 (the sweep), #3854, #2237
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5583217509 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815). Originally posted by [githubkdskkd](https://github.com/githubkdskkd) on 2026-12-01T09:52:19Z. --- Fixes # > **Revision of this PR's first version.** Its four-switch defaults were measured slower by two independent benches in the comments below ([@DoubleD17](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7311549963), [@tillo88](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7315904821)). The defaults are now only the two that measured neutral; `VICTORY_CARD_STEPS_LEARN` and `VICTORY_LATE_FILLS` are back off. The revision commit (`618af305`) sits on top of this branch and is being pushed here; until it lands, the diff above still shows the first version's four. ## What it changes Two switches that are already in the code but off by default are now on in both launchers (`apps/victory/src/play.rs`, `scripts/play-nvidia.ps1`), and the README's rows say the new defaults: - `VICTORY_SEND_FREE_FIRST=1` — a submission that must wait for earlier card work is split, and its first lists, which need nothing from that work, go to the card at once (`host.rs:6331-6345`, applied at `9677`). Its doc records 37 ms a frame of the card standing with nothing of ours queued while the submitting thread worked (a play run of 2026-11-27). - `VICTORY_SWEEP_AHEAD=1` — the once-a-second sweep runs while card work is still in flight, instead of the settle that stood the submitting thread until the card had run all it was given (`host.rs:4820-4835`, applied at `10265`). Why the other two stay off — the ablations in this PR's comments, attributed: | switches at `1` | fps | submitting thread waiting on the card | source | |---|---|---|---| | all four (first version) | **-21.3 %** | +21.3 ms | DoubleD17 (RTX 5070, 5800X), 4 runs | | all four (first version) | **-13.7 %** (27.61 vs 32.01) | submitting thread 20.5 → ~35 ms; frame line's "on the GPU" ~2.3 → ~15 ms | tillo88 (RTX 5070 Ti, 9800X3D, v2026.11.30.03), 2 runs | | `CARD_STEPS_LEARN` alone | **-29.0 %** | +29.3 ms | DoubleD17, 2 runs | | `CARD_STEPS_LEARN` + `LATE_FILLS` | **-21.5 %** | +20.6 ms | DoubleD17, 2 runs | | `LATE_FILLS` alone | -0.3 % | -0.0 ms | DoubleD17, 1 run | | `SEND_FREE_FIRST` alone | -0.4 % | +0.0 ms (preparation -0.4 ms) | DoubleD17, 2 runs | | `SWEEP_AHEAD` alone | -0.8 % | -0.3 ms (preparation +0.0 ms) | DoubleD17, 2 runs | The learning of late-written pages makes the submitting thread wait on the card: tillo88's learn line read "1.00 submissions waited for a learned page; 141 pages learned" a frame, with "175.0 fills in 4.00 submissions done when the card got to them (VICTORY_LATE_FILLS)". tillo88's p99 improving (63.7 → 56.4 / 49.0 ms across the two runs) is not a mitigating factor, as that comment itself says: at about 27.6 fps every frame is longer. The warm-up `0x80070057` in the second bench is #2237's known crash, not this PR's. `LATE_FILLS` does nothing without `CARD_STEPS_LEARN` (it only softens that loss), so both stay off. `SEND_FREE_FIRST` and `SWEEP_AHEAD` measured neutral within the controls' spread (1.9 to 4.2 ms of preparation) and are kept for the card-idle pattern their docs record; no rig measured a gain from either, and neither was ablated on the second rig. No code changes. Each switch stays overridable per run — `--set NAME=0` in `victory play`, `-More @{NAME='0'}` in the launcher — and the F1 menu's saved settings win over both launchers' tables (`play.rs:648-663`; `play-nvidia.ps1:260-288`). ## How it was tested - GPU and profile: none available where this was prepared. The numbers above are the two benches' of the first version's four switches, not a re-measurement of this revision; the two kept switches were ablated only on the RTX 5070 rig. - Before: / After: — not re-measured; the first version's benches are the before. - For shader changes, the wave sizes tested (32 and/or 64 lanes): — (no shader changes). - `cargo test` passed for the crates it touches: not run — no Windows PC and no Rust toolchain where this was prepared. The change adds no code: two default-table entries, the same two in the launcher's table, and their README rows. What was checked instead, on `main` at 5fabb46e: both kept switches exist and the launchers' value `1` turns each on (`SEND_FREE_FIRST` is `switch::on`, on unless `0` — `host.rs:6344`; `SWEEP_AHEAD` reads exactly `1` — `host.rs:4834`); `CARD_STEPS_LEARN` and `LATE_FILLS` default off again (`card_steps.rs:1203` and `1403`); and the override chain was read in both files (menu saves and `--set`/`-More` insert over the tables before the environment is written). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3809 (four other play defaults in the same two files), #1780 (the learn machinery), #4558 and #4226 (the sweep), #3854, #2237
DoubleD17 commented 2026-12-01 12:43:19 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-12-01T12:43:19Z.


We measured these four defaults, since none were measured here. Short version: on our PC, VICTORY_CARD_STEPS_LEARN=1 costs about a fifth of the frame rate, and the other three are neutral.

Setup

  • Hardware: RTX 5070 12 GB (driver 621.40), Ryzen 7 5800X, 64 GB RAM, Windows 11.
  • Build: release build of main 5fabb46e; it carries an unrelated PR's code, switched off in every arm.
  • Arms: victory play (which sets VICTORY_CARD_STEPS=2) with the switches given by --set.
  • Profile: Series X, 2560x1440 DLAA, frame generation off, ray tracing off.
  • Runs: idle camera from the same starting point, 150 s from the first world frame, runs alternated with controls. Control runs had all four switches at 0.
  • Light view only: these are the seconds where the idle camera's heavier view is not on screen. Each run is compared with the controls interpolated in time.
switches at 1 runs preparation base fps submitting thread waiting on the card
all four (this PR) 4 +17.3 ms -21.3 % +21.3 ms
SEND_FREE_FIRST alone 2 -0.4 ms -0.4 % +0.0 ms
SWEEP_AHEAD alone 2 +0.0 ms -0.8 % -0.3 ms
CARD_STEPS_LEARN + LATE_FILLS 2 +17.9 ms -21.5 % +20.6 ms
CARD_STEPS_LEARN alone 2 +25.6 ms -29.0 % +29.3 ms
LATE_FILLS alone 1 -0.3 ms -0.3 % -0.0 ms
  • Spread of the controls: 1.9 to 4.2 ms of preparation, depending on the batch.
  • Consistency: every run with CARD_STEPS_LEARN=1 lost 17 to 30 %. Without it, the waiting stays at 0.6 to 1.2 ms a frame.
  • What the VICTORY_CARD_STEPS_LEARN log line says (per frame, over the 150 s):
    • LEARN alone: about 2.8 submissions a frame "waited for a learned page", with about 138 pages learned.
    • With LATE_FILLS too: 0.9 a frame. That is why LATE_FILLS softens the loss but does not remove it.
    • Our reading, not measured: each of those waits holds the submitting thread until the card has reached the page, and that wait is the +20 to +29 ms.
  • Picture: we looked at every frame a frame-to-frame check flagged (200 frames at the end of each run in the first 4+4).
    • All flagged frames were the one-frame vegetation gap we also see on main: 4 in the control runs, 1 in the runs with this PR.
    • Nothing new.
  • Not tested: the stretched characters that CARD_STEPS_LEARN's doc says it fixes (they were not on screen in these runs), movement, Series S, frame generation on, other cards.

On this data, SEND_FREE_FIRST and SWEEP_AHEAD are neutral here, and LATE_FILLS does nothing without CARD_STEPS_LEARN. Turning on CARD_STEPS_LEARN by default would cost about 21 % fps on a PC like this one.

AI Assisted

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7311549963 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7311549963). Originally posted by [DoubleD17](https://github.com/DoubleD17) on 2026-12-01T12:43:19Z. --- We measured these four defaults, since none were measured here. Short version: on our PC, `VICTORY_CARD_STEPS_LEARN=1` costs about a fifth of the frame rate, and the other three are neutral. **Setup** - **Hardware:** RTX 5070 12 GB (driver 621.40), Ryzen 7 5800X, 64 GB RAM, Windows 11. - **Build:** release build of main 5fabb46e; it carries an unrelated PR's code, switched off in every arm. - **Arms:** `victory play` (which sets `VICTORY_CARD_STEPS=2`) with the switches given by `--set`. - **Profile:** Series X, 2560x1440 DLAA, frame generation off, ray tracing off. - **Runs:** idle camera from the same starting point, 150 s from the first world frame, runs alternated with controls. Control runs had all four switches at `0`. - **Light view only:** these are the seconds where the idle camera's heavier view is not on screen. Each run is compared with the controls interpolated in time. | switches at `1` | runs | preparation | base fps | submitting thread waiting on the card | |---|---|---|---|---| | all four (this PR) | 4 | +17.3 ms | **-21.3 %** | +21.3 ms | | `SEND_FREE_FIRST` alone | 2 | -0.4 ms | -0.4 % | +0.0 ms | | `SWEEP_AHEAD` alone | 2 | +0.0 ms | -0.8 % | -0.3 ms | | `CARD_STEPS_LEARN` + `LATE_FILLS` | 2 | +17.9 ms | **-21.5 %** | +20.6 ms | | `CARD_STEPS_LEARN` alone | 2 | +25.6 ms | **-29.0 %** | +29.3 ms | | `LATE_FILLS` alone | 1 | -0.3 ms | -0.3 % | -0.0 ms | - **Spread of the controls:** 1.9 to 4.2 ms of preparation, depending on the batch. - **Consistency:** every run with `CARD_STEPS_LEARN=1` lost 17 to 30 %. Without it, the waiting stays at 0.6 to 1.2 ms a frame. - **What the `VICTORY_CARD_STEPS_LEARN` log line says** (per frame, over the 150 s): - `LEARN` alone: about 2.8 submissions a frame "waited for a learned page", with about 138 pages learned. - With `LATE_FILLS` too: 0.9 a frame. That is why `LATE_FILLS` softens the loss but does not remove it. - Our reading, not measured: each of those waits holds the submitting thread until the card has reached the page, and that wait is the +20 to +29 ms. - **Picture:** we looked at every frame a frame-to-frame check flagged (200 frames at the end of each run in the first 4+4). - All flagged frames were the one-frame vegetation gap we also see on main: 4 in the control runs, 1 in the runs with this PR. - Nothing new. - **Not tested:** the stretched characters that `CARD_STEPS_LEARN`'s doc says it fixes (they were not on screen in these runs), movement, Series S, frame generation on, other cards. On this data, `SEND_FREE_FIRST` and `SWEEP_AHEAD` are neutral here, and `LATE_FILLS` does nothing without `CARD_STEPS_LEARN`. Turning on `CARD_STEPS_LEARN` by default would cost about 21 % fps on a PC like this one. AI Assisted
tillo88 commented 2026-12-01 15:26:11 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tillo88 on 2026-12-01T15:26:11Z.


Measured the four switches this PR turns on (VICTORY_CARD_STEPS_LEARN=1, VICTORY_LATE_FILLS=1, VICTORY_SEND_FREE_FIRST=1, VICTORY_SWEEP_AHEAD=1, set on the launch) on v2026.11.30.03, 2 runs, against the release as it is. The PR only changes defaults, so nothing was merged; the log header lists all four, and the release already runs VICTORY_CARD_STEPS=2.

fps submitting thread ms refresh ms p95 ms p99 ms
v2026.11.30.03, 21 runs (mean, range) 32.01 (31.49–32.46) 20.51 6.43 48.3 63.7
with the four switches, run 1 27.38 35.03 7.97 48.8 56.4
with the four switches, run 2 27.83 34.86 8.18 42.1 49.0
  • Slower: -13.7% fps (27.61 vs 32.01), both runs far below the slowest base run (31.49).
  • The submitting thread goes from 20.5 to about 35 ms a frame, and the frame line's time "on the GPU" from about 2.3 to 15 ms, so most of the added time is the submitting thread waiting on the card.
  • The learn line shows the learned-page waits are active: "1.00 submissions waited for a learned page; 141 pages learned", with "175.0 fills in 4.00 submissions done when the card got to them (VICTORY_LATE_FILLS)" per frame.
  • This matches the direction DoubleD17 reported above for CARD_STEPS_LEARN on a 5800X. I did not test the switches one at a time.
  • p95/p99 were lower than the base in both runs, but at about 27.6 fps every frame is longer, so that is not a smoother game.
  • Crashes: the warm-up run stopped with a host command list did not close (0x80070057) at +2:38 after the log starts, about 20 s after the prison → plane cutscene cut. That is the known crash of #2237; the bare release stops near that cut in 9 of 42 runs on this bench, so it is not from this PR. Both measured runs completed.

Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11, release build, Series X 1440p, DLSS Quality, frame generation off, ray tracing off. Same save restored before each run (start of the game), prison cutscene, plane cutscene, first boat section, about 6 minutes; warm-up run not counted for speed.

Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7315904821 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7315904821). Originally posted by [tillo88](https://github.com/tillo88) on 2026-12-01T15:26:11Z. --- Measured the four switches this PR turns on (`VICTORY_CARD_STEPS_LEARN=1`, `VICTORY_LATE_FILLS=1`, `VICTORY_SEND_FREE_FIRST=1`, `VICTORY_SWEEP_AHEAD=1`, set on the launch) on **v2026.11.30.03**, 2 runs, against the release as it is. The PR only changes defaults, so nothing was merged; the log header lists all four, and the release already runs `VICTORY_CARD_STEPS=2`. | | fps | submitting thread ms | refresh ms | p95 ms | p99 ms | |---|---|---|---|---|---| | v2026.11.30.03, 21 runs (mean, range) | 32.01 (31.49–32.46) | 20.51 | 6.43 | 48.3 | 63.7 | | with the four switches, run 1 | 27.38 | 35.03 | 7.97 | 48.8 | 56.4 | | with the four switches, run 2 | 27.83 | 34.86 | 8.18 | 42.1 | 49.0 | - **Slower: -13.7% fps** (27.61 vs 32.01), both runs far below the slowest base run (31.49). - The submitting thread goes from 20.5 to about 35 ms a frame, and the frame line's time "on the GPU" from about 2.3 to 15 ms, so most of the added time is the submitting thread waiting on the card. - The learn line shows the learned-page waits are active: "1.00 submissions waited for a learned page; 141 pages learned", with "175.0 fills in 4.00 submissions done when the card got to them (VICTORY_LATE_FILLS)" per frame. - This matches the direction DoubleD17 reported above for `CARD_STEPS_LEARN` on a 5800X. I did not test the switches one at a time. - p95/p99 were lower than the base in both runs, but at about 27.6 fps every frame is longer, so that is not a smoother game. - Crashes: the warm-up run stopped with `a host command list did not close (0x80070057)` at +2:38 after the log starts, about 20 s after the prison → plane cutscene cut. That is the known crash of #2237; the bare release stops near that cut in 9 of 42 runs on this bench, so it is not from this PR. Both measured runs completed. Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11, release build, Series X 1440p, DLSS Quality, frame generation off, ray tracing off. Same save restored before each run (start of the game), prison cutscene, plane cutscene, first boat section, about 6 minutes; warm-up run not counted for speed. Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.
githubkdskkd commented 2026-12-01 18:11:11 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by githubkdskkd on 2026-12-01T18:11:11Z.


The revision described in the updated description is commit 618af305 ("Play defaults: send free first and sweep ahead on; learn and late fills stay off") on top of this branch. It keeps VICTORY_SEND_FREE_FIRST=1 and VICTORY_SWEEP_AHEAD=1 in apps/victory/src/play.rs and scripts/play-nvidia.ps1 (with the ablation numbers from @DoubleD17 and @tillo88 recorded where the defaults are set and in the README's rows), and puts VICTORY_CARD_STEPS_LEARN and VICTORY_LATE_FILLS back at their off defaults, with their measured costs (-29.0 % alone, -21.5 % with LATE_FILLS; -13.7 % for all four on the second rig) written into the README so the opt-in is an informed one.

Until this commit is pushed to the branch, the diff above still shows the first version's four switches.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7320538540 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7320538540). Originally posted by [githubkdskkd](https://github.com/githubkdskkd) on 2026-12-01T18:11:11Z. --- The revision described in the updated description is commit `618af305` ("Play defaults: send free first and sweep ahead on; learn and late fills stay off") on top of this branch. It keeps `VICTORY_SEND_FREE_FIRST=1` and `VICTORY_SWEEP_AHEAD=1` in `apps/victory/src/play.rs` and `scripts/play-nvidia.ps1` (with the ablation numbers from [@DoubleD17](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7311549963) and [@tillo88](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7315904821) recorded where the defaults are set and in the README's rows), and puts `VICTORY_CARD_STEPS_LEARN` and `VICTORY_LATE_FILLS` back at their off defaults, with their measured costs (-29.0 % alone, -21.5 % with `LATE_FILLS`; -13.7 % for all four on the second rig) written into the README so the opt-in is an informed one. Until this commit is pushed to the branch, the diff above still shows the first version's four switches.

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!4815
No description provided.