The frame generation's field of view is a fixed 60 degrees, and three other settings that hold the frame rate back #3109
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from ubiquitarianism/leonida. Originally posted by AquariusD0312 on 2026-12-02T11:20:22Z.
Filed from a Windows 11 PC that runs the D3D12 runtime at a steady frame rate
(about 28 rendered frames a second at the Series X profile). Five things came
out of running it for a week, and one of them is a patch.
Before anything else: the page file. This PC has a fixed 32 GB page file
on
D:(PagingFiles : D:\pagefile.sys 32768 32768), and it has to: thegame maps about 35 GB of title memory, the runtime's host copies of it add
4.4 GB, and the whole process commits 58.8 GB. Windows would pick a
5 GB page file on a machine with 48 GB of memory, which would put the commit
limit at 52.8 GB - less than the game alone commits. Section 5 has the
numbers and what the runtime's own
residencythrottle does with them.The measurements below are from the runtime's own log (
leonida_gpu=info), thehost::frametimeline, which reports the frame times of the last fiveseconds. Unless said otherwise they are the median of the per-window medians
over a run of several minutes in the open world, at the Series X profile
(2560x1440 output, the title's own dynamic resolution between 1080 and 1440
lines), with the runtime's
LEONIDA_FRAME_GEN=2.1. The field of view is a fixed 60 degrees, and the title tells us its own
leonida-gpu/src/fg.rsbuilds the frame generation's camera constants with ahardcoded field of view:
The depth and the motion vectors that frame generation is given are rebuilt
from that number, so a title whose camera is not at 60 degrees has its made
frames' shadows and edges in the wrong place.
The title does say its own: the FidelityFX upscale description carries it
(
ffxDispatchDescUpscale::cameraFov, read inleonida-hle'sffx.rs), andthe log line the probe writes shows it (
fov = ...inupscale probe).What was missing was only the way to carry it to the frame generation: the
Upscalestruct (leonida-gpu/src/list.rs) had no field for it, so it wasdropped between the title's description and
fg.rs.The patch below carries it:
Upscaletakes afov, and its words (to_words/from_words) take onemore: the length is encoded in the record's op word, so the reading side
follows it (
list/thin.rs,translate).leonida-hle'sffx.rsfills it fromd.camera_fov.fg.rs'stagtakes it and passes it on, andconstantsuses it: a valueabove a half turn is taken as degrees (as the FidelityFX API gives it) and
one below as radians already; 0 means the title did not say and the old
60 degrees is used.
dlss.rsandfsr.rstake it too, so both frame generation paths use it.What this does not fix yet. On Series X the title's own upscaler does not
go through
ffxDispatchat all, so the G-buffer pass's depth and motionvectors are what frame generation uses there (
fg.rs: "the G-buffer pass'sfrom now on"), and the G-buffer pass does not say a field of view. The
patch therefore leaves the 60 degrees in place on that path: the numbers
travel, but the title's own value only arrives when the title goes through
its upscale.
That leaves the other four numbers on the G-buffer path as assumptions too:
nearcamera_nearfarcamera_farjitter[0.0; 2]mv_pixels[1.0; 2]fovcamera_fov(the patch carries it)The title's own projection matrix would give all five, but nothing in the
runtime reads it yet. Whether the G-buffer's depth and motion vectors can be
matched to the title's projection matrix (and its depth range) would decide
whether the made frames land right in every view.
Attached:
mandy-fov-fix.patch(5 files, +51 / -7).2.
LEONIDA_FG_LIMIT_FPSholds the rendered frames, so 28 halves the frame rateThe frame generation limit is the interval Reflex gives the rendered frames
(
fg.rs:frameLimitUs: limit). With 2x generation the shown frames aretwice that, so the limit also caps the rendered frames at half of it.
At the default of 28 the rendered frames are held to 14 a second on this PC,
and the card's work is thrown away:
LEONIDA_FG_LIMIT_FPSAt 60 the rendered frames are at the same rate as with the generation off,
and the frames over a second are gone. The launcher sets 28 on Series X
(
play-nvidia.ps1), which on this card costs half the frame rate.3.
LEONIDA_HEAP_RECHECK_EVERY=300shows stale textures: the models flickerA texture the title paints through another view is looked at again
LEONIDA_HEAP_RECHECK_EVERYframes after its upload (300 by default). Thelog says what that costs:
A batch of them (slots 11658-11666 and the rest, 2.2 MB and 8.3 MB each -
the shadow cascades) was found changed 876 frames after its upload, so for
all those frames the card showed the old picture and then the new one: the
models' shadows flickered.
With
LEONIDA_HEAP_RECHECK_EVERY=15the change is found while it lasts, andthe flicker is gone. The cost is one more look at 48 KiB every 15 frames
instead of every 300, which the log shows as a fraction of a millisecond a
frame.
4. The pipeline warm-up must run with the same settings the run uses
leonida.exe warmmakes the host pipelines and puts them where a run findsthem. It has to be run with the same settings as the run, because a pipeline
made with other settings is a different one.
With the settings of the run missing from the warm-up:
and the game then ran at 0.2 frames a second (5,180 ms a frame), with the
frame's time almost all in making the pipelines the run needed and had not
found.
With the same settings:
The full warm-up (every pipeline the title ever created, not only the ones
earlier runs drew with) took 1,341 s and made 85,667 pipelines.
The launcher already does the warm-up with its own settings, so this only
matters for a warm-up run by hand.
5. Two hangs, and what the page file has to do with it
Two runs ended with the window not responding (
AppHangB1in the Windowsevent log, both at a moment when the log's last line was a normal per-frame
statistic and no error was written):
LEONIDA_UPSCALE=dlss, which shows a whitescreen. This is the path
play-nvidia.ps1warns about ("Series X withDLSS: experimental, the world is not lit on this path yet"), and here it
hangs instead of showing black.
the world at 27-33 frames a second. The log's last lines are the ordinary
per-frame statistics. The runtime's own memory accounting says nothing was
under pressure at that moment (
0 under pressure ... 20040 MB left to commit), the card was not reset (no TDR in the system log), and theprocess held 31,086 MB private.
The page file. The runtime's memory accounting at that moment:
The whole machine while the game runs:
79.8 GB is 47.8 GB of physical memory plus a 32 GB page file on
D:.Windows' own minimum for a machine with this much memory is about 5 GB, which
would put the commit limit at 52.8 GB - less than the game alone commits
(58.8 GB). So the page file had to be raised to 32 GB for this to run at
all, and it is the reason the numbers above are what they are. With it at 5 GB
the game runs out of commit and the runtime's own residency check would
refuse the texture passes.
There is nothing here that lies to the title about how much memory it has:
XMemVirtualAllocgoes toVirtualAlloc2andXMemAllocDefaultto theprocess heap, so every byte the title asks for becomes real committed memory
on the host, and the page file is what backs it. What the page file decides
is whether the runtime's own throttle stays in charge.
leonida-gpu/src/residency.rswatches the commit headroom and backs off whenit is low:
under which it refuses the texture passes and the staging growth. That
throttle can only work while the commit limit is not reached hard: with a
5 GB page file the limit is 52.8 GB and the game wants 58.8 GB, so the
allocations fail before the throttle has anything to say. With the 32 GB
page file the limit is 79.8 GB and the runtime's own accounting says
0 under pressure ... 0 with less than 1.5 GiB left to commit, with20,040 MB of commit still free at its lowest.
Over the run that hung, the runtime's own accounting of what was left:
So there was no memory pressure at the moment it hung, and the commit
accounting does not explain that hang. It does explain why this PC is set up
the way it is, and it is worth stating in the README: the game maps about
35 GB of title memory, the runtime's host copies of it add 4.4 GB (4,862
copies alive, of which 827 are windows outside buffers), and the whole
process commits 58.8 GB. On a PC with 48 GB of memory that only fits with a
page file of 32 GB, not with the 5 GB Windows would pick by itself.
For the record, the settings on this PC:
A page file of 32 GB on a 48 GB PC is worth a line in the README next to the
memory accounting: with the 5 GB Windows picks, the runtime's
residencythrottle is not what protects the run - the operating system's own refusal
to commit is.
6. The PC
D:(see above)The runtime was built with
diagnostics,dlss,mimalloc.7. What the frame rate looks like
With
LEONIDA_FG_LIMIT_FPS=60andLEONIDA_HEAP_RECHECK_EVERY=15, theopen world runs at about 28 rendered frames a second (the frame's median
between 28.5 and 36.8 ms over the run, 36.8 ms as the median of the
per-window medians), the 95th percentile at 45.3 ms, and no frame over a
second. The card is not the limit: the log's own accounting gives the
submitting thread and the card's busy time both well inside the frame.
The title's own dynamic resolution sits at its 1080-line floor in this view,
so the frames are rendered at 1080 lines and shown at 2560x1440.
8. Two things in the notes branch that this touches
The
notes/card-time-and-plant-flickerbranch has two notes that thisreport touches, and both are still open or just after the fact. They are not
in
mainyet (read on 2026-12-02,mainat40ac041)."The game ends with 'a host command list did not close (0x8007000E)' when
the PC's commit charge runs out" (runs d330 and d331, three and six minutes
into the world, with the five-second lines saying "commit left" 0.0 to 0.4 GB
at their lowest; the PC's limit 95 GB there: 31 GB of RAM and the page file).
That is the same place this PC runs out of room, and the same moment: one of
the two hangs here was six minutes into the world as well. What differs is
how much room was left. On this PC the commit limit is 79.8 GB (48 GB of RAM
and a 32 GB page file) and the game commits 58.8 GB, so the runtime's own
accounting still had 20,040 MB of commit free when it hung, and the hang
came with no error in the log at all - the window simply stopped responding
(
AppHangB1). So the commit limit is what bounds a run on a machine withthis much memory, but it was not what ended this one. A machine with 95 GB
of limit (as in the note) has 10 GB more room than this one, and the game
grows towards it over a session.
"Palms gone for one frame: older than the batches kept open past heap
reads, not frame generation's" (runs d313 to d330). The note ends with
"Still open: what makes them so."
That is the same class of thing as section 3: a texture whose content the
card read is older than it should be, for one frame. The mechanism there is
not known, but the interval at which such a texture is looked at again is
LEONIDA_HEAP_RECHECK_EVERY, and at the default of 300 frames the changewas found 876 frames after the upload here. If the palms are the same kind
of thing,
LEONIDA_HEAP_RECHECK_EVERY=15is worth a tour of the same shapeas the one in the note (d313 to d330), with and without
LEONIDA_BATCH_HEAP_READS.9. Which build the measurements are from
The measurements above are from the runtime built from
a917c54(2026-12-0207:24 UTC), which is what was on
mainwhen this was written.mainhasmoved since (
40ac041, 11:08 UTC), so the numbers should be read as what thisbuild does.
10. What 4K with hardware ray tracing does to a long session
A second run, this time with the DLSS upscaler and the hardware ray tracing
on, over sixteen minutes of driving through the city. Everything below is
from one log (
play-1202-194804.log, buildb99f876).The frame rate falls by half over the session. The world phase (the
samples with more than 3,000 draws a frame, 121 of them):
The same PC, the same hour, the same save, with the title's own upscaler at
1440 lines and no hardware ray tracing, does not move at all over its five
minutes: 26.3 fps in the first third, 27.7 fps in the last third (+5%).
What the log says is running out is the memory, and it says so in its own
words:
Thirty-two gigabytes of texture live only in system memory, so the card reads
them over the bus. The title's own upscaler at 1440 lines reaches only
38 textures / 5,640 MBin the same place. Then:So the residency throttle never refused a texture and no allocation failed:
there was still 11,179 MB of commit left at the end. What ran out was the
physical memory the bus traffic had to come out of, and the throttle has no
way to help with that.
And the ray tracing's own structures are a CPU cost that keeps growing:
Fifty-seven seconds of BLAS preparation, and a live set that sits at the
budget, so it evicts and rebuilds in a loop.
The frame time says the same thing from the other side. Before the slide:
After it:
The CPU part barely moves. The GPU part goes from under a millisecond to 57-77
ms, because the card is pulling 32 GB over the bus.
Nothing broke. The session ended with
window closed: suspending the titleand
EXIT=0; there is no device removal and no timeout in the log (the twohits for "TDR" and "crash" are the runtime's own diagnostics being switched
on). The frame generator kept working the whole way: Streamline's
Frame rate over 100.00ms, reseting frame timerruns from 11:52 onwardswithout a gap (52 in that minute, 161 at the worst).
Two things worth trying, in the order I would try them:
LEONIDA_CARD_BUFFERS_MBis 1536 here and the card side is only 2,548 MBwhile 32,204 MB stays in system memory. Giving the card more room (8192?)
would let more of the textures live on the card and off the bus. The log
says the card was "filled to the windows' line (80 hundredths of its
budget)", so the budget is what is holding it back.
blas_prep_msgrowing to 57 seconds suggests theper-frame BLAS refit is doing more work than the scene needs.
LEONIDA_HW_RT_REFIT=0forces full rebuilds instead of refits, which is the other direction, but
the refit path is the one with the cost, and it may be worth measuring with
the refits off to see which side the 57 seconds is on.
What this means for a user, plainly: the DLSS upscaling to 4K and the
hardware ray tracing both work, and the picture at 4K with real bounced light
is a different thing from the title's own upscaler. But the combination
puts the textures in system memory, and on a 48 GB PC that runs out after
about ten minutes. For a session, the title's own upscaler at 1440 lines is
the one that holds its frame rate.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T21:38:28Z.
Open PR #3111 covers section 1 only (the fixed 60 degree field of view in fg.rs, now carried from the title's FidelityFX upscale description to the DLSS and FSR frame generation paths). It does not cover the G-buffer path on Series X, nor sections 2 to 5 and 7 to 10 of this report. AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T16:17:07Z.
Triage Notes
What we've established so far:
What we still need from you (@AquariusD0312):