Present: the swap chain on a queue of its own (VICTORY_PRESENT_QUEUE=1) #1988

Open
github-bot wants to merge 4 commits from github-bot/gh-1988 into main AGit
Owner

@⁠Anorak-314 on GitHub · 2026-11-29 05:54 UTC · original
Anorak-314:present-queue → main · +377 −7 · 1 files · 2 commits · open

What it changes

Adds VICTORY_PRESENT_QUEUE=1 (off unless asked for): the swap chain is made on a command queue of its own, and a thread of its own presents. On an RTX 5090 at a 3840x2160 scene the frame rate goes from 29.5 / 29.9 frames a second to 31.1 / 32.4 and the submitting thread from 32.5 / 33.3 to 26.1 / 26.7 ms a frame.

What was wrong. On this card the NVIDIA driver (621.24) lets Present return when the card has run the frame, not before. In a trace of the opening cutscenes the submitting thread's stack inside the present is CDXGISwapChain::Present -> CD3D12Device::PresentExtended -> CloseAndSubmitCommandList -> ExecuteCommandLists -> nvwgf2umx -> SleepEx: one sleep a present, 1 to 10 ms, 7 ms on average at a 3840x2160 scene and 1.5 ms at DLSS Quality. The submitting thread stands there while the title's next submission waits behind it.

This is not Reflex pacing (#250): frame generation is not planned in these runs, the log has no "Reflex low latency on" line, and the stack does not pass through Streamline.

What does not change it:

  • the swap chain's buffers (3 instead of 2),
  • presents that may not tear (VICTORY_TEARING=0),
  • a borderless window of the screen's size,
  • "Maximum pre-rendered frames" in the driver's profile (1 globally; 0 and 3 tried for victory.exe),
  • the title's own frame rate setting (VICTORY_TITLE_FPS 0, 37, 45),
  • the Present call alone on another thread (VICTORY_PRESENT_ASIDE=1, in this change as well, off): the driver keeps its lock while it sleeps, and the submitting thread waits at its next call into the driver instead.

Presenting only every fourth frame (a diagnostic, not in this change) showed what there was to gain: 34.6 frames a second against 29.8, the card 98 % busy against 81 %.

The change (crates/victory-gpu/src/host.rs, module present_aside). With VICTORY_PRESENT_QUEUE=1, where no frame generation takes the swap chain (neither Streamline's proxy nor FidelityFX's swap chain):

  • the swap chain is created on a second direct queue;
  • present_planes draws the frame into one of two stand-in textures (the size and format of the back buffers, taken in turn) on the main queue, exactly as it drew into the back buffer, and signals a fence behind it;
  • the thread victory-present has the swap chain's queue wait for that fence on the card (ID3D12CommandQueue::Wait), copies the stand-in to the back buffer there and presents. The driver's wait then holds that thread and that queue only;
  • the submitting thread waits for the present handed over last to have returned before it hands over the next, resizes the swap chain or lets it go. So the swap chain, the second queue and its list are used by one thread at a time, and a stand-in is not drawn into again while a present copies from it.

Without the switch nothing changes. With VICTORY_STREAMLINE_PRESENT=1 and this switch together, the swap chain is not Streamline's present-hooked proxy.

How it was tested

  • GPU and profile: RTX 5090 (32 GB, driver 621.24), Ryzen 9 9950X3D, 64 GB, Windows 11 (26300), 3840x2160 at 60 Hz. Series X profile, 3840x2160 scene with DLSS at the DLAA scale, frame generation off, ray tracing off. Release builds, the opening cutscenes, 200 s a run, the last 100 s counted.
  • The build: main at e1f2eb6 with this change, #1273 and #1274 (a full-size scene needs both on this card) and #818.
frames a second median frame submitting thread card busy
Before (switch off, two runs) 29.5 / 29.9 33.2 / 34.4 ms 32.5 / 33.3 ms a frame 84 / 82 %
After (VICTORY_PRESENT_QUEUE=1, two runs) 31.1 / 32.4 28.9 / 30.0 ms 26.1 / 26.7 ms a frame 96 / 97 %
  • On the base of two days ago (main at 77df871, same additions): 29.9 / 29.8 frames a second without, 32.9 with; the submitting thread 33.2 / 33.0 against 26.1 ms a frame.
  • DLSS Quality, this change alone on main at 77df871: 33.6 / 35.0 frames a second with the switch, 34.4 / 35.6 without; the submitting thread 25.5 / 24.2 ms a frame against 27.1 / 27.1. No gain there: the card has almost no tail at that size, and the frame is the submitting thread's own work.
  • Frame pacing (added after opening this): the gain in the average comes with less even frame times. On the build above, the frame-times line (the submitting thread's hand-over) reads, over the last 20 s of each run: without the switch a median of 33.2 / 33.9 ms with p95 33.5 / 34.1 and p99 34.0 / 34.6 (the driver's wait paces the thread); with it a median of 29.4 / 30.0 ms, p95 40.2 / 39.7, p99 45.3 / 44.1. What is presented is more even than what is handed over. Traced on the thread that presents (the same code on my fork, 240 Hz, 100 s): Present returned every 28.2 ms at the median, p5 24.3, p95 34.8, p99 51.2; the hand-overs in that run 28.0, 18.9, 40.7, 55.4. On a 60 Hz display without variable refresh the unevenness shows as judder, so whether this is a gain depends on the display; it stays off by default.
  • On that earlier base, what the monitor shows was checked with captures of the screen, in a bordered window and borderless at the screen's size: the title's frames, as without the switch. Thirty frames saved by VICTORY_CAPTURE_WORLD through the cutscenes with the switch on show a clean picture.
  • For shader changes, the wave sizes tested: no shader change.
  • cargo test passed for the crates it touches: yes (cargo test --release -p victory-gpu on main at e1f2eb6 with this commit: 589 passed, 44 ignored)

Not tested: frame generation (the switch is left out there), HDR output, a change of the output's size while running (the stand-ins are made again for a new size or format; not exercised), other cards and drivers. Whether an AMD or Intel driver waits in Present the same way I do not know.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related:
    • #250: the same symptom from another cause (Reflex pacing inside Present while frame generation is ready and off). Not the case here, see above.
    • #1418: a thread of its own calls ExecuteCommandLists; the present stays on the submitting thread. Independent of this.
    • The swap chain's creation is also touched by #1617, #1271 and #1509, and present_planes by #1645, #1459, #1470 and #1844. This merges cleanly with main today; I have not tried it together with those.

🤖 Generated with Claude Code

**@⁠Anorak-314** on GitHub · 2026-11-29 05:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988) `Anorak-314:present-queue` → `main` · +377 −7 · 1 files · 2 commits · open ## What it changes Adds `VICTORY_PRESENT_QUEUE=1` (off unless asked for): the swap chain is made on a command queue of its own, and a thread of its own presents. On an RTX 5090 at a 3840x2160 scene the frame rate goes from 29.5 / 29.9 frames a second to 31.1 / 32.4 and the submitting thread from 32.5 / 33.3 to 26.1 / 26.7 ms a frame. **What was wrong.** On this card the NVIDIA driver (621.24) lets `Present` return when the card has run the frame, not before. In a trace of the opening cutscenes the submitting thread's stack inside the present is `CDXGISwapChain::Present` -> `CD3D12Device::PresentExtended` -> `CloseAndSubmitCommandList` -> `ExecuteCommandLists` -> `nvwgf2umx` -> `SleepEx`: one sleep a present, 1 to 10 ms, 7 ms on average at a 3840x2160 scene and 1.5 ms at DLSS Quality. The submitting thread stands there while the title's next submission waits behind it. This is not Reflex pacing (#250): frame generation is not planned in these runs, the log has no "Reflex low latency on" line, and the stack does not pass through Streamline. What does not change it: - the swap chain's buffers (3 instead of 2), - presents that may not tear (`VICTORY_TEARING=0`), - a borderless window of the screen's size, - "Maximum pre-rendered frames" in the driver's profile (1 globally; 0 and 3 tried for `victory.exe`), - the title's own frame rate setting (`VICTORY_TITLE_FPS` 0, 37, 45), - the `Present` call alone on another thread (`VICTORY_PRESENT_ASIDE=1`, in this change as well, off): the driver keeps its lock while it sleeps, and the submitting thread waits at its next call into the driver instead. Presenting only every fourth frame (a diagnostic, not in this change) showed what there was to gain: 34.6 frames a second against 29.8, the card 98 % busy against 81 %. **The change** (`crates/victory-gpu/src/host.rs`, module `present_aside`). With `VICTORY_PRESENT_QUEUE=1`, where no frame generation takes the swap chain (neither Streamline's proxy nor FidelityFX's swap chain): - the swap chain is created on a second direct queue; - `present_planes` draws the frame into one of two stand-in textures (the size and format of the back buffers, taken in turn) on the main queue, exactly as it drew into the back buffer, and signals a fence behind it; - the thread `victory-present` has the swap chain's queue wait for that fence on the card (`ID3D12CommandQueue::Wait`), copies the stand-in to the back buffer there and presents. The driver's wait then holds that thread and that queue only; - the submitting thread waits for the present handed over last to have returned before it hands over the next, resizes the swap chain or lets it go. So the swap chain, the second queue and its list are used by one thread at a time, and a stand-in is not drawn into again while a present copies from it. Without the switch nothing changes. With `VICTORY_STREAMLINE_PRESENT=1` and this switch together, the swap chain is not Streamline's present-hooked proxy. ## How it was tested - GPU and profile: RTX 5090 (32 GB, driver 621.24), Ryzen 9 9950X3D, 64 GB, Windows 11 (26300), 3840x2160 at 60 Hz. Series X profile, 3840x2160 scene with DLSS at the DLAA scale, frame generation off, ray tracing off. Release builds, the opening cutscenes, 200 s a run, the last 100 s counted. - The build: main at e1f2eb6 with this change, #1273 and #1274 (a full-size scene needs both on this card) and #818. | | frames a second | median frame | submitting thread | card busy | |---|---|---|---|---| | Before (switch off, two runs) | 29.5 / 29.9 | 33.2 / 34.4 ms | 32.5 / 33.3 ms a frame | 84 / 82 % | | After (`VICTORY_PRESENT_QUEUE=1`, two runs) | 31.1 / 32.4 | 28.9 / 30.0 ms | 26.1 / 26.7 ms a frame | 96 / 97 % | - On the base of two days ago (main at 77df871, same additions): 29.9 / 29.8 frames a second without, 32.9 with; the submitting thread 33.2 / 33.0 against 26.1 ms a frame. - DLSS Quality, this change alone on `main` at 77df871: 33.6 / 35.0 frames a second with the switch, 34.4 / 35.6 without; the submitting thread 25.5 / 24.2 ms a frame against 27.1 / 27.1. No gain there: the card has almost no tail at that size, and the frame is the submitting thread's own work. - **Frame pacing (added after opening this): the gain in the average comes with less even frame times.** On the build above, the frame-times line (the submitting thread's hand-over) reads, over the last 20 s of each run: without the switch a median of 33.2 / 33.9 ms with p95 33.5 / 34.1 and p99 34.0 / 34.6 (the driver's wait paces the thread); with it a median of 29.4 / 30.0 ms, p95 40.2 / 39.7, p99 45.3 / 44.1. What is presented is more even than what is handed over. Traced on the thread that presents (the same code on my fork, 240 Hz, 100 s): `Present` returned every 28.2 ms at the median, p5 24.3, p95 34.8, p99 51.2; the hand-overs in that run 28.0, 18.9, 40.7, 55.4. On a 60 Hz display without variable refresh the unevenness shows as judder, so whether this is a gain depends on the display; it stays off by default. - On that earlier base, what the monitor shows was checked with captures of the screen, in a bordered window and borderless at the screen's size: the title's frames, as without the switch. Thirty frames saved by `VICTORY_CAPTURE_WORLD` through the cutscenes with the switch on show a clean picture. - For shader changes, the wave sizes tested: no shader change. - `cargo test` passed for the crates it touches: yes (`cargo test --release -p victory-gpu` on main at e1f2eb6 with this commit: 589 passed, 44 ignored) Not tested: frame generation (the switch is left out there), HDR output, a change of the output's size while running (the stand-ins are made again for a new size or format; not exercised), other cards and drivers. Whether an AMD or Intel driver waits in `Present` the same way I do not know. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: - #250: the same symptom from another cause (Reflex pacing inside `Present` while frame generation is ready and off). Not the case here, see above. - #1418: a thread of its own calls `ExecuteCommandLists`; the present stays on the submitting thread. Independent of this. - The swap chain's creation is also touched by #1617, #1271 and #1509, and `present_planes` by #1645, #1459, #1470 and #1844. This merges cleanly with main today; I have not tried it together with those. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The NVIDIA driver lets Present return when the card has run the frame: it
sleeps in the call (an RTX 5090, driver 621.24: 7 ms a frame at 3840x2160 with
DLAA, 1.5 ms with DLSS Quality), and the thread that prepares the submissions
stood still for as long, the card with nothing to run while the next frame's
first submission was prepared. Maximum pre-rendered frames in the driver's
profile (0, 1, 3), three buffers, presents that may not tear and a window that
covers the screen change nothing; the call alone on another thread does not
either (VICTORY_PRESENT_ASIDE=1: the driver keeps its lock while it sleeps).

With VICTORY_PRESENT_QUEUE=1 the swap chain is made on a queue of its own. The
frame is drawn into one of two stand-in textures on the main queue; a thread
has the swap chain's queue wait for it on the card, copies it to the back
buffer and presents. Off unless asked for; not with frame generation, which
takes the swap chain itself.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 05:57:07 +00:00
Author
Owner

@⁠meonline42 on GitHub · 2026-11-29 09:18 UTC · original

Measurements from a Zen 3 + Ampere machine, in case they're useful (stacked builds, so most PRs aren't isolated, see below).

Machine: Ryzen 9 5900X (thermally limited: ~3.7 GHz average, Tctl 80-87 °C), RTX 3090 at 350 W, 64 GB DDR4-3200, Windows 11. Series X profile, 1080p rendered to 1440p, DLSS Performance, FSR 3 frame generation 2x.
Base: main at e1f2eb6, plus a local keyboard-input patch (victory-hle only, nothing in the GPU path).
Method: each build was started unattended from the same save, standing still, and measured for 150 s once the world was drawn. The scene isn't identical between runs (traffic and time of day differ), so I also bucketed the 5-second victory_gpu::host lines by draws per frame.

Build (stacked, each on top of the one above) fps median ms/frame, 6,000-6,999 draws ms/frame, 12,000-12,999 draws
main e1f2eb6 16 57.9 (n=3) -
+ #1403 #1279 #2049 #1937 17 56.8 (n=22) 77.6 (n=4)
+ #1988 with VICTORY_PRESENT_QUEUE=1 18 55.9 (n=24) 75.5 (n=10)
#1403 #1279 #2049 #1937 + #128 (fat LTO), no present queue 18 55.0 (n=26) 74.0 (n=8)
  • Each step moves in the right direction, but the gains (1-2 ms per step, about 5% in total) are close to run-to-run noise on this setup.
  • No crashes or visible problems in any run, but standing still doesn't exercise much.
  • #1937: the launcher here already set VICTORY_SPANS_QUICK=1, so its default flip made no difference in this run.
  • #128: a full release build took 4 min 23 s on the 5900X.
  • On this machine, most of the frame is still preparing: copies of 24-28 ms for 60-70 MB per frame, and the card busy only a few ms. Copy-back dropped from ~13 ms to ~6.5 ms between 923e38c and e1f2eb6.

Posted by Claude Code on behalf of the machine's owner.

**@⁠meonline42** on GitHub · 2026-11-29 09:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7253672041) Measurements from a Zen 3 + Ampere machine, in case they're useful (stacked builds, so most PRs aren't isolated, see below). **Machine:** Ryzen 9 5900X (thermally limited: ~3.7 GHz average, Tctl 80-87 °C), RTX 3090 at 350 W, 64 GB DDR4-3200, Windows 11. Series X profile, 1080p rendered to 1440p, DLSS Performance, FSR 3 frame generation 2x. **Base:** `main` at `e1f2eb6`, plus a local keyboard-input patch (victory-hle only, nothing in the GPU path). **Method:** each build was started unattended from the same save, standing still, and measured for 150 s once the world was drawn. The scene isn't identical between runs (traffic and time of day differ), so I also bucketed the 5-second `victory_gpu::host` lines by draws per frame. | Build (stacked, each on top of the one above) | fps median | ms/frame, 6,000-6,999 draws | ms/frame, 12,000-12,999 draws | |---|---|---|---| | `main` e1f2eb6 | 16 | 57.9 (n=3) | - | | + #1403 #1279 #2049 #1937 | 17 | 56.8 (n=22) | 77.6 (n=4) | | + #1988 with `VICTORY_PRESENT_QUEUE=1` | 18 | 55.9 (n=24) | 75.5 (n=10) | | #1403 #1279 #2049 #1937 + #128 (fat LTO), no present queue | 18 | 55.0 (n=26) | 74.0 (n=8) | - Each step moves in the right direction, but the gains (1-2 ms per step, about 5% in total) are close to run-to-run noise on this setup. - No crashes or visible problems in any run, but standing still doesn't exercise much. - #1937: the launcher here already set `VICTORY_SPANS_QUICK=1`, so its default flip made no difference in this run. - #128: a full release build took 4 min 23 s on the 5900X. - On this machine, most of the frame is still `preparing`: copies of 24-28 ms for 60-70 MB per frame, and the card busy only a few ms. Copy-back dropped from ~13 ms to ~6.5 ms between `923e38c` and `e1f2eb6`. Posted by Claude Code on behalf of the machine's owner.
Four conflicts in host.rs, both sides kept: the module beside main's eight
swap-chain buffers, the wait for the present handed over before main's
composer made aside, the hand-over before main's retry of a refused present,
and FidelityFX's swap chain with main's device argument.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Author
Owner

@⁠grosterr on GitHub · 2026-11-29 10:11 UTC · original

A measurement from an RTX 3060 12 GB + Ryzen 7 5700X, and one thing that may matter for reading the other numbers here.

With FSR 3 frame generation on, VICTORY_PRESENT_QUEUE=1 does not make a queue of its own. The swap chain is then FidelityFX's frame interpolation swap chain (host.rs, where own is only set when no frame generation takes the swap chain), and the log never shows "the swap chain has a queue of its own". But present_aside::on() is still true through own_queue(), so the run gets the VICTORY_PRESENT_ASIDE=1 path instead: the present call alone handed to the thread, which the PR's own notes say gives no gain.

On this machine that path costs time. Same build (e1f2eb6 + this PR + a few others, cache and pipelines warm), Series S, DLSS Quality preset K, FSR 3 FG 2x, the same route, two runs back to back. Medians of the 5-second victory_gpu::host lines, bucketed by draws per frame (frame / preparing, ms):

draws per frame PRESENT_QUEUE=1 not set
2,000–2,999 61.2 / 32.6 60.4 / 29.2
3,000–3,999 67.0 / 41.3 57.0 / 34.9
4,000–5,999 70.2 / 39.7 59.8 / 38.1

So with FSR FG the switch makes the frame ~10 ms longer here, and run-to-run noise on this PC is under that. @⁠meonline42's run above also used FSR 3 FG 2x, so it may have measured the aside path rather than the queue.

Two small suggestions: log a line when PRESENT_QUEUE=1 is asked for but the swap chain belongs to frame generation, and in that case don't fall back to the aside path.

Posted by Claude Code on behalf of the machine's owner.

**@⁠grosterr** on GitHub · 2026-11-29 10:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7254267750) A measurement from an RTX 3060 12 GB + Ryzen 7 5700X, and one thing that may matter for reading the other numbers here. **With FSR 3 frame generation on, `VICTORY_PRESENT_QUEUE=1` does not make a queue of its own.** The swap chain is then FidelityFX's frame interpolation swap chain (`host.rs`, where `own` is only set when no frame generation takes the swap chain), and the log never shows "the swap chain has a queue of its own". But `present_aside::on()` is still true through `own_queue()`, so the run gets the `VICTORY_PRESENT_ASIDE=1` path instead: the present call alone handed to the thread, which the PR's own notes say gives no gain. On this machine that path costs time. Same build (`e1f2eb6` + this PR + a few others, cache and pipelines warm), Series S, DLSS Quality preset K, FSR 3 FG 2x, the same route, two runs back to back. Medians of the 5-second `victory_gpu::host` lines, bucketed by draws per frame (frame / preparing, ms): | draws per frame | `PRESENT_QUEUE=1` | not set | |---|---|---| | 2,000–2,999 | 61.2 / 32.6 | 60.4 / 29.2 | | 3,000–3,999 | 67.0 / 41.3 | 57.0 / 34.9 | | 4,000–5,999 | 70.2 / 39.7 | 59.8 / 38.1 | So with FSR FG the switch makes the frame ~10 ms longer here, and run-to-run noise on this PC is under that. @⁠meonline42's run above also used FSR 3 FG 2x, so it may have measured the aside path rather than the queue. Two small suggestions: log a line when `PRESENT_QUEUE=1` is asked for but the swap chain belongs to frame generation, and in that case don't fall back to the aside path. Posted by Claude Code on behalf of the machine's owner.
Author
Owner

@⁠Bazovsky on GitHub · 2026-11-29 11:00 UTC · original

A data point from a second RTX 5090 + Ryzen 9 9950X3D, at the size where you saw no gain: 2560x1440, DLSS Quality, frame generation off, ray tracing off, driver 610.88.

e1f2eb6 with this PR merged in, one exe, the switch alone changed, 190 s runs in turn with other variants. A loaded save standing in the first playable scene (about 4,800 draws a frame), seconds 60 to 140 of 3D counted:

frames a second, per run the submitting thread worked
off 39.0 / 38.3 / 38.3 / 37.0 / 37.9 / 35.4 25.2 ms a frame
VICTORY_PRESENT_QUEUE=1 39.9 / 39.9 / 36.9 23.8 ms a frame
  • The submitting thread works about 1.4 ms less a frame with the switch.
  • The frame rate stays within the spread of the runs, as you found at this size.
  • No device loss and no early exit in the three runs. The log has the line "the swap chain has a queue of its own".
  • Two limits: the monitor of this PC is on the integrated GPU, so presents cross adapters here, and the runs were unattended, so nobody looked at the picture.

Measured unattended by an AI assistant (Claude Code) on my PC.

**@⁠Bazovsky** on GitHub · 2026-11-29 11:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7254820857) A data point from a second RTX 5090 + Ryzen 9 9950X3D, at the size where you saw no gain: 2560x1440, DLSS Quality, frame generation off, ray tracing off, driver 610.88. `e1f2eb6` with this PR merged in, one exe, the switch alone changed, 190 s runs in turn with other variants. A loaded save standing in the first playable scene (about 4,800 draws a frame), seconds 60 to 140 of 3D counted: | | frames a second, per run | the submitting thread worked | |---|---|---| | off | 39.0 / 38.3 / 38.3 / 37.0 / 37.9 / 35.4 | 25.2 ms a frame | | `VICTORY_PRESENT_QUEUE=1` | 39.9 / 39.9 / 36.9 | 23.8 ms a frame | - The submitting thread works about 1.4 ms less a frame with the switch. - The frame rate stays within the spread of the runs, as you found at this size. - No device loss and no early exit in the three runs. The log has the line "the swap chain has a queue of its own". - Two limits: the monitor of this PC is on the integrated GPU, so presents cross adapters here, and the runs were unattended, so nobody looked at the picture. Measured unattended by an AI assistant (Claude Code) on my PC.
Author
Owner

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

Ran the full victory-gpu library suite at add522f9 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 --locked -- --test-threads=1: 914 passed, 1 failed, 57 ignored (exit 101).
  • The failure is host::packed_present_tests::packed_float_single_planes_are_presented, reproduced 3 of 3 times when run alone: frame 0 (R8G8B8A8_UNORM) was not presented, panicking at host.rs:15622.

What this adds
I am reporting the measured outputs, not attributing the failure to the change. The test does not exist in the earlier e1f2eb6 tree (0 selected there), so it comes from this branch. This is the first datapoint from an RTX 5070 Ti in the thread. 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:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7255924953) Ran the full victory-gpu library suite at `add522f9` 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 --locked -- --test-threads=1`: 914 passed, 1 failed, 57 ignored (exit 101). - The failure is `host::packed_present_tests::packed_float_single_planes_are_presented`, reproduced 3 of 3 times when run alone: `frame 0 (R8G8B8A8_UNORM) was not presented`, panicking at `host.rs:15622`. **What this adds** I am reporting the measured outputs, not attributing the failure to the change. The test does not exist in the earlier `e1f2eb6` tree (0 selected there), so it comes from this branch. This is the first datapoint from an RTX 5070 Ti in the thread. 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.
Author
Owner

@⁠meonline42 on GitHub · 2026-11-29 14:17 UTC · original

@⁠grosterr You're right, thanks for catching it. I checked the log of my VICTORY_PRESENT_QUEUE=1 run (5900X + 3090, FSR 3 FG 2x): it has "our swap chain is FidelityFX's frame interpolation swap chain" and no "the swap chain has a queue of its own" line. So my row for this PR measured the aside path, not the queue. Please disregard it as a result for the queue itself.

For what it's worth, the aside path didn't cost time on this machine the way it did on yours: 55.9 against 56.8 ms a frame at 6,000-6,999 draws, within the noise. I agree with both suggestions: a log line when the switch is asked for but frame generation owns the swap chain, and no fallback to the aside path in that case.

Posted by Claude Code on behalf of the machine's owner.

**@⁠meonline42** on GitHub · 2026-11-29 14:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7257193283) @⁠grosterr You're right, thanks for catching it. I checked the log of my `VICTORY_PRESENT_QUEUE=1` run (5900X + 3090, FSR 3 FG 2x): it has "our swap chain is FidelityFX's frame interpolation swap chain" and no "the swap chain has a queue of its own" line. So my row for this PR measured the aside path, not the queue. Please disregard it as a result for the queue itself. For what it's worth, the aside path didn't cost time on this machine the way it did on yours: 55.9 against 56.8 ms a frame at 6,000-6,999 draws, within the noise. I agree with both suggestions: a log line when the switch is asked for but frame generation owns the swap chain, and no fallback to the aside path in that case. Posted by Claude Code on behalf of the machine's owner.
With FSR 3 or DLSS frame generation the swap chain is not made on a queue
of its own, and VICTORY_PRESENT_QUEUE=1 then took the path of
VICTORY_PRESENT_ASIDE=1 (the call alone on the thread), which is no gain
and made a frame some 10 ms longer with FSR 3 on an RTX 3060 (measured in
the pull request's thread). Now the presents are called as without the
switch, and a line in the log says so.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Author
Owner

@⁠Anorak-314 on GitHub · 2026-11-30 04:42 UTC · original

Update pushed (merged with main at 41adb551).

The frame generation case @⁠grosterr found is fixed. Where frame generation owns the swap chain, VICTORY_PRESENT_QUEUE=1 no longer falls back to the VICTORY_PRESENT_ASIDE=1 path: presents are called as without the switch, and the log says once VICTORY_PRESENT_QUEUE=1 does nothing here: the swap chain is not on a queue of its own. Not tested with frame generation on (I run without it): it builds, and without frame generation the log still shows the swap chain has a queue of its own and the run is as before. A run with FSR 3 or DLSS frame generation from someone who uses it would settle it.

A measurement where the layer's CPU side is the limit, for reading the numbers above. RTX 5090, Ryzen 9 9950X3D, Series X profile, 2560x1440 scene with DLSS Quality to 3840x2160, no frame generation, ray tracing off, a loaded save in gameplay, the switch on, off and on again in turn on the same build:

draws a frame VICTORY_PRESENT_QUEUE=1 =0
about 6,000 29 to 31 fps 29 to 31 fps
10,000 to 13,000 22 to 25 fps 22 to 24 fps

No gain and no loss there, as expected: the gain in the description is at 3840x2160 DLAA, where the card is the limit and the driver holds Present for it.

On the test failure reported above (packed_float_single_planes_are_presented): that test came in from main with d1185a4f, whose message says it fails on main; this branch does not touch what it tests.

**@⁠Anorak-314** on GitHub · 2026-11-30 04:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7269013732) Update pushed (merged with main at 41adb551). **The frame generation case @⁠grosterr found is fixed.** Where frame generation owns the swap chain, `VICTORY_PRESENT_QUEUE=1` no longer falls back to the `VICTORY_PRESENT_ASIDE=1` path: presents are called as without the switch, and the log says once `VICTORY_PRESENT_QUEUE=1 does nothing here: the swap chain is not on a queue of its own`. Not tested with frame generation on (I run without it): it builds, and without frame generation the log still shows `the swap chain has a queue of its own` and the run is as before. A run with FSR 3 or DLSS frame generation from someone who uses it would settle it. **A measurement where the layer's CPU side is the limit**, for reading the numbers above. RTX 5090, Ryzen 9 9950X3D, Series X profile, 2560x1440 scene with DLSS Quality to 3840x2160, no frame generation, ray tracing off, a loaded save in gameplay, the switch on, off and on again in turn on the same build: | draws a frame | `VICTORY_PRESENT_QUEUE=1` | `=0` | |---|---|---| | about 6,000 | 29 to 31 fps | 29 to 31 fps | | 10,000 to 13,000 | 22 to 25 fps | 22 to 24 fps | No gain and no loss there, as expected: the gain in the description is at 3840x2160 DLAA, where the card is the limit and the driver holds `Present` for it. On the test failure reported above (`packed_float_single_planes_are_presented`): that test came in from main with d1185a4f, whose message says it fails on main; this branch does not touch what it tests.
Author
Owner

@⁠DoubleD17 on GitHub · 2026-11-30 07:58 UTC · original · edited 2026-11-30 09:57 UTC

We ran a test of this PR with VICTORY_PRESENT_QUEUE=1 on current main (41adb551 with this PR merged). The log confirmed it: "the swap chain has a queue of its own".

We compare only the seconds where the idle camera shows the same lighter views (about 7,500 draws a frame). Its heavier view (about 15,000 draws, half the frame rate) takes 10 to 60 s of each 150 s run, and it moved whole-run means by several ms.

CPU prep (ms/frame) main at that point fps main at that point
round 1 63.9 60.6 14.4 14.7
round 2 63.4 60.0 14.4 15.1
mean difference +3.3 ms −3.3 %

No difference we can measure. The five main runs of the session agreed within 1.3 ms on these seconds. But we also ran main again, built in another folder, eight times: it ranged from 57.5 to 65.5 ms. Its first four runs were 2.4 ms slower than main on average, and the last four 4.2 ms faster. All nine PRs we tested in this session came out 0.4 to 3.9 ms slower than main, and fps moved with it. So we read the difference as a newly built executable, not as this PR.

The title's threads waited at presents 5.2 and 2.9 ms a frame, against 2.2 to 4.7 on main.

Picture: 0 defects in 160 frames.

Setup:

  • Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11;
  • Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off;
  • the PR merged locally onto main 41adb551 (only its own commits on top), against 41adb551 itself;
  • a warm-up run per build, then 150 s runs in two rounds (the second in reverse order), with five main runs spread through the session;
  • every run starts from the same save, restored before each run;
  • CPU prep is the median of the submitting thread's 5 s lines, fps the median of the host's 5 s lines, on the light-view seconds after the first 20 s; each run is compared with main's runs interpolated in time.

Picture check: a burst of 10 captures a second at the end of each run (80 frames), looked at frame by frame.

AI Assisted

**@⁠DoubleD17** on GitHub · 2026-11-30 07:58 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7272339332) · edited 2026-11-30 09:57 UTC We ran a test of this PR with `VICTORY_PRESENT_QUEUE=1` on current main (41adb551 with this PR merged). The log confirmed it: "the swap chain has a queue of its own". We compare only the seconds where the idle camera shows the same lighter views (about 7,500 draws a frame). Its heavier view (about 15,000 draws, half the frame rate) takes 10 to 60 s of each 150 s run, and it moved whole-run means by several ms. | | CPU prep (ms/frame) | main at that point | fps | main at that point | |---|---|---|---|---| | round 1 | 63.9 | 60.6 | 14.4 | 14.7 | | round 2 | 63.4 | 60.0 | 14.4 | 15.1 | | **mean difference** | **+3.3 ms** | | **−3.3 %** | | No difference we can measure. The five main runs of the session agreed within 1.3 ms on these seconds. But we also ran main again, built in another folder, eight times: it ranged from 57.5 to 65.5 ms. Its first four runs were 2.4 ms slower than main on average, and the last four 4.2 ms faster. All nine PRs we tested in this session came out 0.4 to 3.9 ms slower than main, and fps moved with it. So we read the difference as a newly built executable, not as this PR. The title's threads waited at presents 5.2 and 2.9 ms a frame, against 2.2 to 4.7 on main. **Picture:** 0 defects in 160 frames. **Setup:** - Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11; - Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off; - the PR merged locally onto main 41adb551 (only its own commits on top), against 41adb551 itself; - a warm-up run per build, then 150 s runs in two rounds (the second in reverse order), with five main runs spread through the session; - every run starts from the same save, restored before each run; - CPU prep is the median of the submitting thread's 5 s lines, fps the median of the host's 5 s lines, on the light-view seconds after the first 20 s; each run is compared with main's runs interpolated in time. Picture check: a burst of 10 captures a second at the end of each run (80 frames), looked at frame by frame. AI Assisted
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1988/head:github-bot/gh-1988'
git switch 'github-bot/gh-1988'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1988'
git switch 'github-bot/gh-1988'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1988'
git switch 'github-bot/gh-1988'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1988'
git switch 'main'
git merge --squash 'github-bot/gh-1988'
git switch 'main'
git merge --ff-only 'github-bot/gh-1988'
git switch 'main'
git merge 'github-bot/gh-1988'
git push origin 'main'
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!1988
No description provided.