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
github-bot wants to merge 2 commits from github-bot/gh-2346 into main AGit
Owner

@⁠jr-duarte on GitHub · 2026-11-29 12:16 UTC · original
jr-duarte:perf/present-thread-rtx4060ti → main · +270 −40 · 2 files · 2 commits · closed without merging

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.

**@⁠jr-duarte** on GitHub · 2026-11-29 12:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2346) `jr-duarte:perf/present-thread-rtx4060ti` → `main` · +270 −40 · 2 files · 2 commits · closed without merging <!-- 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.
VICTORY_PRESENT_THREAD=1 (off by default; not with VICTORY_SUBMIT_SPLIT): with
presents sent ahead, the swap chain's Present and frame generation's work
around it (markers, tags, FSR 3's presented hook) run on a "victory-present"
thread. The next submission's lists go to the queue, and the upscalings they
recorded are told to frame generation, only after that present returned; the
next present waits for it too, so back buffers go round as before. The frame
meter is told the previous present's result.

Measured on an RTX 4060 Ti 8 GB with a Ryzen 5 7600X (Series S, DLSS Quality,
frame generation 2X, the opening cutscene, median real fps):
- v2026.11.28.03: 22.0 -> 23.6 fps.
- v2026.11.29.01 (this base), one build, two runs each: 20.8 and 21.4 off,
  21.2 and 21.9 on; within the noise here, so it stays off.

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
The present on a thread of its own on two bases, the card kept awake,
v2026.11.29.01 against the build before it on that card (frame rate, late
textures, the first starts while shaders were converted), and the switches
that did not move the frame there.

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 12:21:36 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-11-29 12:57 UTC · original

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: #1988 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.

**@⁠Aniseto** on GitHub · 2026-11-29 12:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2346#issuecomment-7256184818) 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://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/1988 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.
github-bot closed this pull request 2026-12-01 00:05:25 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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