Repository navigation
d3d12 play-nvidia: frame generation with ray tracing, except Series X under 20 GB (D3D12-FG-WITH-RT) - #3230
d3d12 play-nvidia: frame generation with ray tracing, except Series X under 20 GB (D3D12-FG-WITH-RT)#3230OreoFR wants to merge 6 commits into
Conversation
… under 12 GB (D3D12-FG-WITH-RT)
Frame generation (DLSS's, FSR 3's and the automatic 2x on RTX 40/50) was left off whenever ray tracing was on
("0.1 frames a second", a measure of the software walk from before this renderer). It now runs with ray tracing,
software or hardware, except on the Series X profile with under 12 GB of video memory, where it is left off with
a message; unknown video memory does not block. When kept, LEONIDA_FG_WITH_RT=1 is set so the runtime's own guard
(fg.rs) starts it; -More LEONIDA_FG_WITH_RT='1' forces it everywhere, '0' keeps it off.
Measured on an RTX 4070 Laptop 8 GB, main 45dc41f, 2026-12-02, 240 s walks, one run each:
- Series S, -HardwareRT -FrameGen 2: 21 rendered / 43 shown fps once warm, frames generated, no device lost.
- Series S, -RayTracing -FrameGen 2: 10-11 rendered / 21 shown.
- Series X, -HardwareRT -Dlss quality -FrameGen 2: 5 fps, no generated frame, Streamline eWarnOutOfVRAM.
- A player's 16 GB card, Series X, same switches: no out-of-memory warning, frames generated part of the time.
DryRun checked (settings against origin/main): runs without ray tracing are identical; Series S with RT and
-FrameGen 2 gains LEONIDA_FRAME_GEN=2 and LEONIDA_FG_WITH_RT=1; Series X with RT on this 8 GB card leaves it off
with the message; video memory forced to 16, 12 and 0 GB keeps it, 11 GB leaves it off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (read of the diff on head Logic: looks right.
Points to look at
AI-assisted (Claude Code), model: Claude Opus 5.5. |
…ectLeonida#3230) The comment now gives the RTX 3090 24 GB run (frames generated on both profiles, at most 14.4 GB used on Series X), says 12 GB sits between the 8 GB card that ran out and the 16 GB one that did not, with 10-12 GB cards untested, and quotes this head's own 300 s run without -More. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. On
Not covered yet: a player on an RTX 5080 (Series X, FG 2x, frame limit auto) reports the game running too fast with frame generation and hardware RT together, all the time; not with frame generation alone. Not reproduced here yet. Until that is understood, this PR should not merge, since it would turn the automatic 2x on with hardware RT for RTX 40/50 owners on Series X with 12 GB or more. AI-assisted (oreofr-agent, Claude). |
… is on Reverts e9b947b (greyed only on Series X under 12 GB). A player (RTX 5080, Series X) reports the game running too fast with frame generation and hardware RT together, never with frame generation alone, so ProjectLeonida#3230 (which lifts the script's lock) is back to draft and the launcher follows main's script: with hardware RT, frame generation is off, its controls greyed with the note 'Off with ray tracing for now.' Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VERIFY-3230 — Windows nativo: el script parsea y la suite de lanzadores pasa; la regla nueva no tiene test
Ran No test covers the rule this PR adds. The tests in the branch ( The measured table in the body is the kind I want to see: it includes the case that fails (Series X, 8 GB, What I would still ask: a 10 TB… sorry, a 10–12 GB card is exactly the band the guess covers and the body says is untested; if a user in that band hits the same Stacked, againThe branch carries #3204's What I could not test
Written with an AI assistant. |
|
Thanks for the run.
This PR is a draft for now: a player on an RTX 5080 reports the game running too fast with frame generation and hardware RT together. That is being investigated first. AI-assisted (oreofr-agent, Claude). |
merzleckeier
left a comment
There was a problem hiding this comment.
Reviewed 97eefdee. The new Series X guard at play-nvidia.ps1:697 uses the largest adapter’s VRAM (:385–392). The runtime uses LEONIDA_ADAPTER to select the adapter that will actually run (host.rs:1602–1634). In a sandboxed PowerShell dry run with Series X, -HardwareRT -FrameGen 2 and -Adapter "RTX 4070 Laptop", an 8 GiB registry fixture left frame generation off. Adding a separate 16 GiB registry entry made the exact same launch emit LEONIDA_FRAME_GEN=2 and LEONIDA_FG_WITH_RT=1, while LEONIDA_ADAPTER still named the 8 GiB card. An explicit LEONIDA_FG_WITH_RT=0 still worked.
The new guard should use the selected adapter’s budget, or use a conservative default if the selected adapter’s memory cannot be determined. This was a dry run with synthetic inputs, so it verifies the launcher policy only.
|
RUN (in game, batch of five pull requests), each head merged with
For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches today. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. #3247 has since moved to Limits: one run; arrival in the world was driven by keys and not checked on pictures; AI-assisted (Claude Code). |
…(review of ProjectLeonida#3230) Series S keeps frame generation with hardware RT and sets LEONIDA_FG_WITH_RT=1; Series X under 12 GB leaves it off unless -More LEONIDA_FG_WITH_RT=1; 12 GB or more, or an unknown size, keeps it; LEONIDA_FG_WITH_RT=0 leaves it off. The card's memory is a stubbed registry value. Fails on main's script and without the 12 GB rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 20 GB of video memory, not 12 A player's RTX 5080 (16 GB), Series X, hardware RT, DLSS quality, frame generation 2x with LEONIDA_FG_WITH_RT=1, 7 minutes: frames generated, then about 5 minutes in the process passed the card's budget (13.0 of 12.95 GB, up to 14.2), Streamline reported eWarnOutOfVRAM and frames over 100 ms went from 8-15 to 46-53 a minute. A 3090 reached 18.6 GB on the same profile. 20 GB is just above: 16 GB cards keep it on Series S, and on Series X with LEONIDA_FG_WITH_RT=1. The dry-run test gains a 24 GB case; 16 GB on Series X is now off (fails at 12 GB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ftware or hardware) The automatic 2x of RTX 40/50 cards (with -Resolution or -Lowest, the Series X default) came along with -HardwareRT once ray tracing stopped removing frame generation. Turning ray tracing on must not turn frame generation on: with ray tracing it runs only when asked for (-FrameGen, the F1 menu, LEONIDA_FRAME_GEN). The dry-run test gains three automatic cases (hardware RT, software RT, none); it fails without the condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Item: D3D12-FG-WITH-RT (claimed in the coordination issue, #2570).
d3d12/scripts/play-nvidia.ps1left frame generation off whenever ray tracing was on: DLSS FG, FSR 3 FG and the automatic 2x on RTX 40/50, with-RayTracingor-HardwareRT. The reason given was "0.1 frames a second together", a number from the software path that nobody had measured since. This PR allows frame generation with ray tracing, except on the Series X profile on cards with under 20 GB of video memory. There it stays off, with a message saying why.What changes
$vram, read as before from the driver's registry key), frame generation is left off. The message says it runs out of video memory there, and that-More @{LEONIDA_FG_WITH_RT='1'}turns it on anyway. Unknown VRAM (0) does not block.LEONIDA_FG_WITH_RT=1, so the runtime's own guard (fg.rs) lets it start. No Rust change. An explicitLEONIDA_FG_WITH_RT='0'in-Morekeeps it off.README.mdandd3d12/docs/fork-ray-tracing.mdnow state the rule.Measured
RTX 4070 Laptop 8 GB, driver 621.40, Core Ultra 7 155H. One run each, walking in the world.
LEONIDA_FG_WITH_RT=1on main 45dc41f, 240 s)eWarnOutOfVRAM: the case this PR keeps offA player's 16 GB card (Series X, hardware RT, DLSS quality, FG 2x forced, 2-minute log): no out-of-VRAM, frames generated part of the time.
Tested
-DryRunthroughscripts\play-d3d12.ps1on this PC:-FrameGen 2: FG kept andLEONIDA_FG_WITH_RT=1set.-FrameGen 2on 8 GB: FG removed and the message printed. With-More @{LEONIDA_FG_WITH_RT='1'}: kept. With'0'on Series S: off.main.tests/test_win_launchers.py,test_play_nvidia_menu_choice.py,test_docs_issue_template.pyandtest_docs_links.pypass;check_no_game_data.pypasses on the three files.The ≥300 s in-game run on this head merged with
mainis the first row of the table.New
tests/test_win_launchers.py::test_nvidia_frame_generation_with_ray_tracingruns the rule as dry runs with the card's memory stubbed in the registry:LEONIDA_FG_WITH_RT=1.-More LEONIDA_FG_WITH_RT=1: kept.LEONIDA_FG_WITH_RT=0: off.main's script and with the old 12 GB threshold (its 16 GB Series X case).Larger cards: a 3090 (24 GB) passed hardware RT + DLSS frame generation on Series X and S (posted on launcher: full overhaul of the Python launcher (mockup look, sharp text, no white window, 5 languages, diagnostics, Python install) #3182). A player's 16 GB card generated frames on Series X.
MoonEyes' batch C (4060, Series S, FG 2x, 330 s, no RT) passed with this head.
Why 20 GB on Series X (was 12)
LEONIDA_FG_WITH_RT=1, 7 minutes:eWarnOutOfVRAM, and frames over 100 ms go from 8-15 to 46-53 a minute.LEONIDA_FG_WITH_RT=1.Ready, and why it was a draft
It was drafted after a player saw the game run too fast with frame generation and hardware RT. That came from the title's fixed 1/30 s step on builds before #3204. #3204 (merged) makes the game and camera clocks follow the measured frame time, so frame rate no longer changes game speed.
The same player's stutter on Series X was memory: 32 GB of RAM with a 26 GB page file, below what the Series X profile commits (~59 GB,
d3d12/docs/windows-memory.md). It is not frame generation, and this PR does not block it. #3182's launcher warns about it instead.mainis merged in. Not done: AMD.The launcher side is in #3182: it greys frame generation with hardware RT unless the Advanced field has
LEONIDA_FG_WITH_RT=1.AI-assisted (oreofr-agent, Claude).
🤖 Generated with Claude Code