d3d12 play-nvidia: frame generation with ray tracing, except Series X under 20 GB (D3D12-FG-WITH-RT) #3230
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!3230
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/fg-with-rt"
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?
Pull request successfully merged and closed
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 45dc41f95, 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 #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
Review (read of the diff on head
eafa1af14, no run from me yet).Logic: looks right.
$vram(line 387) and$console(line 404, then the F1 menu'sLEONIDA_MENU_CONSOLEat line 633) are both set before the new block at line 691, so the Series X / under-12 GB test sees the menu's console choice.fg.rs(line 50) still needsLEONIDA_FG_WITH_RT=1; theelsebranch sets it, so frame generation really starts when the script allows it.LEONIDA_FG_WITH_RT=0and=1from-Moreboth behave as the comment says.-HardwareRT(before, its own check only looked atLEONIDA_BVH_BUILDER). Good.-RayTracing; it still needs-Resolution/-Lowest, as before.Points to look at
fg.rsline 52 still warns "together they run at 0.1 frames a second". With the script now settingLEONIDA_FG_WITH_RT=1, that warning only shows when someone runs the runtime without the script, but the reason it gives is out of date (it was the software walk before this renderer). Worth a one-line follow-up, not a blocker here.main45dc41f95with-More @{LEONIDA_FG_WITH_RT='1'}, not on this head through the script's own default. Since this is underd3d12/, it needs an in-game run on this head before merge: Series S with-HardwareRT -FrameGen 2and no-More, 300 s in the world, 0 device lost, plus a check that the log says frames are generated.AI-assisted (Claude Code), model: Claude Opus 5.5.
Thanks for the review. On
97eefdee4:fg.rswarning: left for a follow-up, as you suggest (no Rust change in this PR).eafa1af14merged withmain8a9235d02, RTX 4070 Laptop 8 GB, Series S,-HardwareRT -FrameGen 2, no-More, 300 s walking in the world.LEONIDA_FG_WITH_RT=1by itself.per=2) in every world sample.eWarnOutOfVRAM, no device lost. Logplay-1202-221142, not posted.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).
VERIFY-3230 — Windows nativo: el script parsea y la suite de lanzadores pasa; la regla nueva no tiene test
(this PR)b41763227= currentmainmain—merge-treeclean,git merge --no-ffcleanRan
No test covers the rule this PR adds. The tests in the branch (
test_native_status_reaches_both_launchers…,test_spawn_failure_returns_nonzero, …) come from the stacked #3210/#3220 work; none of them exercises "frame generation is kept with ray tracing except on the Series X profile under 12 GB". So for this PR's own change this isred not constructible— and it is testable with the harness those other PRs use (a synthetic-RayTracing/-FrameGeninvocation and an assertion onLEONIDA_FG_WITH_RTand the printed note).The measured table in the body is the kind I want to see: it includes the case that fails (Series X, 8 GB,
eWarnOutOfVRAM, no frame generated) next to the ones that work, and it says the 12 GB threshold is a guess between an 8 GB card that ran out and a 16 GB one that did not. That honesty is why I am not calling the change unsupported — the evidence is a run, not a hunch, with the gap named.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
eWarnOutOfVRAM, the exception does not catch them and the symptom is the one this PR is trying to avoid (FG silently doing nothing). ALEONIDA_FG_WITH_RTnote in the message, or checking the runtime's own out-of-VRAM warning, would make the failure visible rather than silent.Stacked, again
The branch carries #3204's
frame.rs, #3210's launcher exit codes and the HTTP/test changes of #3210/#3224/#3227/#3228 —mainhas none of it. Seventh stacked branch tonight.What I could not test
Written with an AI assistant.
Thanks for the run.
mainat8a9235d02(newer thanb41763227) plus two commits that touch onlyd3d12/scripts/play-nvidia.ps1,README.mdandd3d12/docs/fork-ray-tracing.md(git diff --stat origin/main...HEAD). #3204, #3210 and the HTTP/test changes you saw were already onmainat that base; they are not in this diff.tests/test_win_launchers.pybefore this leaves draft. It will cover Series S with RT and-FrameGen 2(LEONIDA_FG_WITH_RT=1set), Series X under 12 GB (frame generation off and the note printed), andLEONIDA_FG_WITH_RT='1'/'0'.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).
RUN (in game, batch of five pull requests), each head merged with
git merge --no-ffonto mainef35d683e, in one build: #31764c31594b5, #2657c16b0424e, #2807e2572082c, #323097eefdee4, #32473e5887f65. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.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
3dc6c58b3, which only mergesmain(81efe4566) into the head above:git diff 3e5887f65 3dc6c58b3leavesd3d12/scripts/play-nvidia.ps1andtests/test_win_launchers.pyunchanged. If another of these pull requests changes its head, this run no longer covers it.Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used becausemainnow precompiles every known pipeline by default (88,631 for a new executable, over an hour on this card). The default start was therefore not exercised, and the F1 SAVE AND RESTART path of #3247 was not exercised in game. An earlier attempt of this batch is not counted: the run script gave up waiting while that full precompile ran.AI-assisted (Claude Code).
Merging (OreoFR's OK). Head 36f5ddbd7342d13c067170e7c73e858b713b9c04, main d5b30be1c: merge-tree clean, all six checks green on this head, main's last CI / D3D12 runtime / No Game Data green. The dry-run test covers the rule (Series S/X × 8/16/24 GB, the unlock at 1 and 0, no automatic frame generation with ray tracing) and fails on main's script and with the old 12 GB threshold. In game: MoonEyes' batch C PASS on 97eefdee4 (4060, 330 s, no RT); a player's RTX 5080 with hardware RT + frame generation on current main confirmed normal game speed. Since 97eefdee4 only the RT + frame generation decisions changed (20 GB threshold, no automatic 2x with RT); starts without ray tracing are the same. Enqueued in the merge queue. (oreofr-agent, AI-assisted)