Streamline: NVIDIA Reflex low latency without frame generation (VICTORY_REFLEX=on|boost) #3072
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3072
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3072"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Adriwin06 on GitHub · 2026-11-29 19:52 UTC · original
Adriwin06:reflex→main· +2175 −45 · 7 files · 3 commits · closed without mergingWhat it changes
Reflex low latency was set only while frame generation is on (#250).
VICTORY_REFLEX=on (or boost, low latency with boost) turns it on with
or without frame generation and paces the title's frames with Reflex's
markers:
across the input reading, the origin wait, the submissions and the
present), Reflex's sleep with a watchdog, and 10 s telemetry lines;
streamline/abi.rs: the Streamline 2.14 ReflexReport, ReflexReport2
and ReflexState layouts.
first direct-queue submission of a frame, tagged by ExecuteCommandListsX's
token), title_presents, and input_sampling (GetCurrentReading), where
the sleep and SimulationStart happen when the title reads input
every frame.
Unset, nothing changes: no marker is sent and frame generation sets
Reflex as before.
Ported from Kemerd/VIctory-NVIDIA-RT@6463141 and
Kemerd/VIctory-NVIDIA-RT@14f973b (Kemerd),
GPL-3.0-or-later. Upstream asked for Reflex as a pull request of its
own in #18.
How it was tested
cargo testpassed for the crates it touches:cargo test -p victory-gpu --lib -- streamline:: queue:: frame:: host::menu::); the one failure is the menu tests' race on VICTORY_MENU_FILE, which fails on main too (fixed in #3061)cargo clippy --workspace --all-targets --locked: no finding that main does not already have (main has 34 of its own, which is why the Clippy step of CI is red on main itself).cargo xtask policy: no new finding (main fails it on crates/victory-loader/src/heap_sites/frame_users.rs).cargo clippyalso with--all-featuresadds no finding, andcargo test --workspace --lockedfails only tests main also fails on this machine: the five shader tests that fail on main here too (WARP's SM 6.2 and the validator) (barycentric_tests::first_half_values_render_on_hardware_and_warp, hw_tests::split_lds_wave32_read_after_read_barrier_coalescing_and_parity, intersect_tests::flat_global_stores_and_atomics_fence_uavs_at_group_barriers_across_waves, rect::tests::rectangles_are_drawn_whole, rect::tests::the_rectangle_stage_is_a_geometry_shader) and xtask's repository_passes_policy (frame_users.rs). 2208 passed, including five that fail on main (three BCPack oracle tests, the menu save race, the shader key test).Checked for overlap
#250 (merged) turns Reflex on only with frame generation; #1938 (open) keeps the card awake less while Reflex paces. Neither adds Reflex without frame generation. #18 (closed) asked for Reflex as a pull request of its own.
🤖 Generated with Claude Code
@ -0,0 +626,4 @@// again, and the host's present of it names that frame's index// ([`Frames::presenting`]).Some(at) => {self.repeat = Some((present, self.live[at].index));@Copilot on GitHub · 2026-11-29 19:58 UTC · original
This single slot overwrites an unconsumed repeat: with simulation 2 open, three queued presents of the same origin produce host indexes [1, 2, 1] instead of [1, 1, 1]. The middle present consumes the next simulation, and the last moves frame-generation constants and markers backwards. Keep a pending present-to-index mapping for every repeat, consume only the matching entry in
presenting, and test multiple queued repeats.@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-29 19:58 UTC · original · reviewed
🟡 Changes recommended
Repeated presents can consume the wrong simulation and move frame indexes backwards because pending and completed token mappings are lost, while failed Reflex configuration can still enable sleeps and markers.
3 open issues
What changed in this PR
Adds opt-in NVIDIA Reflex low latency with or without frame generation, extending the existing Streamline integration while preserving unset behavior.
Changes:
VICTORY_REFLEX=on|boostand an F1 menu setting.crates/victory-hle/src/modules/gameinput.rscrates/victory-gpu/src/streamline/reflex.rscrates/victory-gpu/src/streamline/abi.rscrates/victory-gpu/src/streamline.rscrates/victory-gpu/src/queue.rscrates/victory-gpu/src/host/menu.rscrates/victory-gpu/src/frame.rsReview effort: Balanced
@ -0,0 +695,4 @@pub fn presented(&mut self, index: u32) -> Markers {let Some(at) = self.live.iter().position(|f| f.index == index) else { return Markers(0) };let owed = self.live[at].reach(Stage::PresentEnd);self.live.remove(at);@Copilot on GitHub · 2026-11-29 19:58 UTC · original
Removing the frame also loses its origin-token-to-index mapping, so a repeated title present after the first host present completes is no longer recognised. It then consumes the next open simulation or creates a new frame instead of reusing the completed frame's index without markers. Retain bounded completed-token history separately from live marker state, and test a repeat arriving after host completion.
@ -1283,0 +1385,4 @@let code = unsafe { set_options(&options) };tracing::info!(code, result = abi::result_name(code), mode = mode.name(), "Streamline: Reflex options set (VICTORY_REFLEX)");}reflex_ready = true;@Copilot on GitHub · 2026-11-29 19:58 UTC · original
reflex_readybecomes true even whenslReflexSetOptionsfails, enabling title-thread sleeps and markers and logging Reflex as on despite the rejected mode. The earlier frame-generation setup also setsreflex_setafter a failed call, causing this path to skip configuration. Carry the options call's success through both initialization paths and publish readiness only after success; otherwise warn and leave standalone Reflex disabled.@Aniseto on GitHub · 2026-11-29 20:23 UTC · original
Ran the Reflex and related groups at
3e5f6c72on an NVIDIA Blackwell desktop part.System
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5Results
VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib --locked streamline:: -- --test-threads=1: 73 passed, 0 failed, 0 ignored.... queue::: 24 passed, 0 failed, 0 ignored.... frame::: 2 passed, 0 failed, 0 ignored.... host::menu::: 14 passed, 0 failed, 0 ignored. The menu save race the author reports on an RTX 4070 SUPER did not reproduce here.What this adds
All four groups pass on an RTX 5070 Ti. This is the first datapoint from this card in the thread and adds driver 32.0.16.2140. These are CPU-side tests; no title latency was measured with
VICTORY_REFLEX=on|boost, so no latency claim is made.Not tested
A retail title, input-to-photon latency, a paired smoke run, the full 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.
@Adriwin06 on GitHub · 2026-11-30 00:54 UTC · original
Fixed in
c5cd5410: further presents now wait inKEPTplaces (one per repeat), each consumed only by its own host present. Regression test:queued_further_presents_of_one_frame_each_show_that_frame(three queued repeats with simulation 2 open give [1, 1, 1] and leave simulation 2 for the next frame).@Adriwin06 on GitHub · 2026-11-30 00:54 UTC · original
Fixed in
c5cd5410as well: the lastKEPTpresented frames' origin tokens and indexes are kept apart from the live marker state, so a repeat arriving after the host present still reuses that index with no markers. Regression test:a_further_present_after_the_hosts_present_shows_that_frame_again(it also checks the history is bounded).@Adriwin06 on GitHub · 2026-11-30 00:54 UTC · original
Fixed in
e2561b1e: the frame-generation setup now carries theslReflexSetOptionsresult code, and theVICTORY_REFLEXpath calls the function only if nothing was asked yet. It publishesREFLEX_READYonly when the code is OK; otherwise it warns and standalone Reflex stays off.Pull request closed