Host lists: the present can run on a thread of its own (VICTORY_PRESENT_THREAD, off by default) + RTX 4060 Ti 8 GB findings #2346

Closed
jr-duarte wants to merge 2 commits from upstream-pr/2346 into main
jr-duarte commented 2026-11-29 12:16:57 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jr-duarte on 2026-11-29T12:16:57Z.


What it changes

1. VICTORY_PRESENT_THREAD=1 (new, off by default). With presents sent ahead (late_free_present), the swap chain's Present and frame generation's work around it (Streamline markers, tags, present_begins/called/returned/ends, FSR 3's presented hook) run on a victory-present thread instead of the submitting thread.

Why: in a CPU profile of the opening cutscene (Ryzen 5 7600X, RTX 4060 Ti 8 GB, DLSS frame generation 2X) a present with frame generation was 13 % of the submitting thread (3,642 of 27,607 samples), 5.5 % of it asleep in the driver, which paces the generated frame. With the thread, the submitting thread prepares the next submission meanwhile.

What stays in order:

  • The next submission's lists go to the queue, and the upscalings they recorded are told to frame generation (streamline::submitted, with FSR's camera when fsr::ml_active; hudless_submitted), only after that present returned (present_wait + tell_upscales right before the sending). Told earlier, the present in the air could tag the next frame's upscale.
  • The next present waits for the one in the air before it reads the back buffer index, and drop_presenter waits too, so back buffers go round as before.
  • A present refused with tearing is remembered in TEARING_REFUSED and the rest present at the next refresh, as before.
  • The F1 menu, the F3 panel and the frame meter stay on the submitting thread; the meter is told the previous present's result (the one in the air has not returned yet).
  • Off with VICTORY_SUBMIT_SPLIT, whose sender orders its own sends (logged once).
  • Without the switch, the code path is the same as before: present_wait returns at once and the upscalings are told where they were.

2. docs/findings.md: what was measured on an RTX 4060 Ti 8 GB (Ryzen 5 7600X, 32 GB), including v2026.11.29.01 against the build before it on that card, VICTORY_CARD_AWAKE (consistent with #771 leaving it off), and switches that did not move the frame there.

How it was tested

  • GPU and profile: RTX 4060 Ti 8 GB, Ryzen 5 7600X, 32 GB, Windows 11; Series S, 1080p scene shown at 1440p, DLSS Quality, DLSS frame generation 2X, no ray tracing. The opening cutscene entered by a script at the same moment each run; median of ~40 ten-second frame-rate lines of real (not generated) frames. Two runs of one build differed by up to 2.4 fps here, so under ~5 % is noise.
  • Before / after on this base (829188e, one build, switch off / on, runs alternated):
Real fps Late textures ("changed after its upload")
Off 20.8, 21.4 200, 61
On 21.2, 21.9 39, 200

About +2 %, inside the noise on this base, which is why it stays off. On v2026.11.28.03 the same change measured 22.0 -> 23.6 fps (+7 %) and the submitting thread 24.1 -> 22.8 ms a frame. Logs confirm the thread was on (presents and frame generation run on a thread of their own). No crash in any run.

  • cargo test -p victory-gpu --lib: 914 passed, 1 failed (host::card_steps::tests::places_written_after_sending_are_learned), which passed 3 times out of 3 when run alone; it does not touch the present path. cargo clippy -p victory-gpu --all-targets --no-deps reports no warning in the changed code; main itself does not pass -D warnings today (35 warnings in victory-gpu, 3 errors in victory-shader).
  • Not run: cargo xtask policy (no git on that machine's PATH); the change is two text files, no binary or long hex/base64.

Also seen on this card with v2026.11.29.01 as released (details in the findings section): the first two starts after updating ran at 0.1 and 3.5 fps while shaders were converted; afterwards 21.5 and 22.7 fps with 117 and 200 late textures, against 23.5–24.9 fps and 10–23 late textures for the previous build with this change. Pictures of the cutscene showed green and red streaks on a pair of glasses and purple specks along the edge of a boat that the previous build did not show.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #1988 (the swap chain on a queue of its own, VICTORY_PRESENT_QUEUE), a different approach to the same cost; #771 (VICTORY_CARD_AWAKE off).

This change was made with AI assistance (Claude Code in OpenBot) and measured on the hardware above.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5550617606 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2346). Originally posted by [jr-duarte](https://github.com/jr-duarte) on 2026-11-29T12:16:57Z. --- <!-- pr-performance, pr-docs --> ## What it changes **1. `VICTORY_PRESENT_THREAD=1` (new, off by default).** With presents sent ahead (`late_free_present`), the swap chain's `Present` and frame generation's work around it (Streamline markers, tags, `present_begins/called/returned/ends`, FSR 3's `presented` hook) run on a `victory-present` thread instead of the submitting thread. Why: in a CPU profile of the opening cutscene (Ryzen 5 7600X, RTX 4060 Ti 8 GB, DLSS frame generation 2X) a present with frame generation was 13 % of the submitting thread (3,642 of 27,607 samples), 5.5 % of it asleep in the driver, which paces the generated frame. With the thread, the submitting thread prepares the next submission meanwhile. What stays in order: - The next submission's lists go to the queue, and the upscalings they recorded are told to frame generation (`streamline::submitted`, with FSR's camera when `fsr::ml_active`; `hudless_submitted`), only after that present returned (`present_wait` + `tell_upscales` right before the sending). Told earlier, the present in the air could tag the next frame's upscale. - The next present waits for the one in the air before it reads the back buffer index, and `drop_presenter` waits too, so back buffers go round as before. - A present refused with tearing is remembered in `TEARING_REFUSED` and the rest present at the next refresh, as before. - The F1 menu, the F3 panel and the frame meter stay on the submitting thread; the meter is told the previous present's result (the one in the air has not returned yet). - Off with `VICTORY_SUBMIT_SPLIT`, whose sender orders its own sends (logged once). - Without the switch, the code path is the same as before: `present_wait` returns at once and the upscalings are told where they were. **2. `docs/findings.md`: what was measured on an RTX 4060 Ti 8 GB** (Ryzen 5 7600X, 32 GB), including v2026.11.29.01 against the build before it on that card, `VICTORY_CARD_AWAKE` (consistent with #771 leaving it off), and switches that did not move the frame there. ## How it was tested - GPU and profile: RTX 4060 Ti 8 GB, Ryzen 5 7600X, 32 GB, Windows 11; Series S, 1080p scene shown at 1440p, DLSS Quality, DLSS frame generation 2X, no ray tracing. The opening cutscene entered by a script at the same moment each run; median of ~40 ten-second frame-rate lines of real (not generated) frames. Two runs of one build differed by up to 2.4 fps here, so under ~5 % is noise. - Before / after on this base (`829188e`, one build, switch off / on, runs alternated): | | Real fps | Late textures ("changed after its upload") | |---|---|---| | Off | 20.8, 21.4 | 200, 61 | | On | 21.2, 21.9 | 39, 200 | About +2 %, **inside the noise on this base**, which is why it stays off. On v2026.11.28.03 the same change measured 22.0 -> 23.6 fps (+7 %) and the submitting thread 24.1 -> 22.8 ms a frame. Logs confirm the thread was on (`presents and frame generation run on a thread of their own`). No crash in any run. - `cargo test -p victory-gpu --lib`: 914 passed, 1 failed (`host::card_steps::tests::places_written_after_sending_are_learned`), which passed 3 times out of 3 when run alone; it does not touch the present path. `cargo clippy -p victory-gpu --all-targets --no-deps` reports no warning in the changed code; `main` itself does not pass `-D warnings` today (35 warnings in `victory-gpu`, 3 errors in `victory-shader`). - Not run: `cargo xtask policy` (no `git` on that machine's PATH); the change is two text files, no binary or long hex/base64. **Also seen on this card with v2026.11.29.01 as released** (details in the findings section): the first two starts after updating ran at 0.1 and 3.5 fps while shaders were converted; afterwards 21.5 and 22.7 fps with 117 and 200 late textures, against 23.5–24.9 fps and 10–23 late textures for the previous build with this change. Pictures of the cutscene showed green and red streaks on a pair of glasses and purple specks along the edge of a boat that the previous build did not show. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #1988 (the swap chain on a queue of its own, `VICTORY_PRESENT_QUEUE`), a different approach to the same cost; #771 (`VICTORY_CARD_AWAKE` off). This change was made with AI assistance (Claude Code in OpenBot) and measured on the hardware above.
Aniseto commented 2026-11-29 12:57:31 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Aniseto on 2026-11-29T12:57:31Z.


Ran the full victory-gpu library suite at 471653ce on an NVIDIA Blackwell desktop part.

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40)
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: Rust 1.98.1 (48a229cea 2026-09-01, pinned by rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5
  • Build: debug

Results

  • VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib -- --test-threads=1: 914 passed, 1 failed, 57 ignored (exit 101).
  • The failure is host::packed_present_tests::packed_float_single_planes_are_presented: frame 0 (R8G8B8A8_UNORM) was not presented, at host.rs:15622.

What this adds
The same single failure was measured on PR #1988 at the same driver, where it reproduced 3 of 3 times when run alone: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7255924953 I am reporting the measured outputs, not attributing the cause to either change. The author's run of this PR reports a different single failure (places_written_after_sending_are_learned); this run did not reproduce that one. No title run was made.

Not tested
A retail title, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256184818 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2346#issuecomment-7256184818). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-29T12:57:31Z. --- Ran the full victory-gpu library suite at `471653ce` on an NVIDIA Blackwell desktop part. **System** - GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40) - CPU: Intel Core i5-12400F, 64 GB RAM - OS: Windows 11 Pro build 26200 x64 - Toolchain: Rust 1.98.1 (48a229cea 2026-09-01, pinned by `rust-toolchain.toml`), MSVC 14.44.35207, DXC 1.9.2609.5 - Build: debug **Results** - `VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib -- --test-threads=1`: 914 passed, 1 failed, 57 ignored (exit 101). - The failure is `host::packed_present_tests::packed_float_single_planes_are_presented`: `frame 0 (R8G8B8A8_UNORM) was not presented`, at `host.rs:15622`. **What this adds** The same single failure was measured on PR #1988 at the same driver, where it reproduced 3 of 3 times when run alone: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7255924953 I am reporting the measured outputs, not attributing the cause to either change. The author's run of this PR reports a different single failure (`places_written_after_sending_are_learned`); this run did not reproduce that one. No title run was made. **Not tested** A retail title, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - ran the commands above on this machine and wrote this report; no game data was used.

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