The frame generation's field of view is a fixed 60 degrees, and three other settings that hold the frame rate back #3109

Open
opened 2026-12-02 11:20:22 +00:00 by AquariusD0312 · 2 comments
AquariusD0312 commented 2026-12-02 11:20:22 +00:00 (Migrated from github.com)
Contributor

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: the
game 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 residency throttle does with them.

The measurements below are from the runtime's own log (leonida_gpu=info), the
host::frametime line, which reports the frame times of the last five
seconds. 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.rs builds the frame generation's camera constants with a
hardcoded field of view:

let fov = 60f32.to_radians();

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 in leonida-hle's ffx.rs), and
the log line the probe writes shows it (fov = ... in upscale probe).
What was missing was only the way to carry it to the frame generation: the
Upscale struct (leonida-gpu/src/list.rs) had no field for it, so it was
dropped between the title's description and fg.rs.

The patch below carries it:

  • Upscale takes a fov, and its words (to_words / from_words) take one
    more: the length is encoded in the record's op word, so the reading side
    follows it (list/thin.rs, translate).
  • leonida-hle's ffx.rs fills it from d.camera_fov.
  • fg.rs's tag takes it and passes it on, and constants uses it: a value
    above 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.rs and fsr.rs take 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 ffxDispatch at all, so the G-buffer pass's depth and motion
vectors are what frame generation uses there (fg.rs: "the G-buffer pass's
from 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:

G-buffer path the title's
near 10000.0 camera_near
far 0.15 camera_far
jitter [0.0; 2] the upscale's jitter
mv_pixels [1.0; 2] the upscale's motion scale
fov 60 degrees camera_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_FPS holds the rendered frames, so 28 halves the frame rate

The frame generation limit is the interval Reflex gives the rendered frames
(fg.rs: frameLimitUs: limit). With 2x generation the shown frames are
twice 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_FPS rendered frames (median) ms/frame frames over a second
28 (the default) 14.0 71.4 9
30 15.0 66.7 -
56 26.4 (up to 29.9) 35.9 0
60 26.4 (up to 29.9) 38.2 0
generation off 26.3 - 30.6 32.7 - 38.0 11

At 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=300 shows stale textures: the models flicker

A texture the title paints through another view is looked at again
LEONIDA_HEAP_RECHECK_EVERY frames after its upload (300 by default). The
log says what that costs:

WARN leonida_gpu::draw: a texture picked by index changed after the last
usual look (LEONIDA_HEAP_RECHECK_EVERY): uploaded again
slot=11666 address=0xb4c400000 bytes=2211840 frames_after_upload=876

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=15 the change is found while it lasts, and
the 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 warm makes the host pipelines and puts them where a run finds
them. 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:

1626 made in 317 s (ms each: median 181.6, p90 5477.8, p99 9460.7, most 16729)

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:

2328 made in 7 s (ms each: median 7.1, p90 29.2, p99 452.1, most 784)

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 (AppHangB1 in the Windows
event log, both at a moment when the log's last line was a normal per-frame
statistic and no error was written):

  • 2026-12-02 18:38:44 - with LEONIDA_UPSCALE=dlss, which shows a white
    screen. This is the path play-nvidia.ps1 warns about ("Series X with
    DLSS: experimental, the world is not lit on this path yet"), and here it
    hangs instead of showing black.
  • 2026-12-02 19:04:38 - with the default settings, after six minutes in
    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 the
    process held 31,086 MB private.

The page file. The runtime's memory accounting at that moment:

memory: 31086 MB private (35191 MB of it in memory; the PC has 7174 MB free
and 21181 MB left to commit)

The whole machine while the game runs:

commit limit      79.8 GB
committed bytes   58.8 GB

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:
XMemVirtualAlloc goes to VirtualAlloc2 and XMemAllocDefault to the
process 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.rs watches the commit headroom and backs off when
it is low:

has_upload_reserve:  commit >= 512 MiB   (256 MiB when baking)
has_growth_reserve:  commit >= 1024 MiB  (256 MiB when baking)
pressure begins at 4 GiB left to commit, critical at 1.5 GiB

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, with
20,040 MB of commit still free at its lowest.

Over the run that hung, the runtime's own accounting of what was left:

the PC has 7174 MB free and 21181 MB left to commit     (the last line)
the least seen over the run: 6868 MB of physical memory free,
                               20040 MB left to commit

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:

PagingFiles : D:\pagefile.sys 32768 32768   (32 GB, fixed, not automatic)

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 residency
throttle is not what protects the run - the operating system's own refusal
to commit is.


6. The PC

CPU Intel Core i5-14600KF, 14 cores / 20 threads
Mainboard ASUSTeK TUF GAMING B760M-PLUS WIFI II, BIOS 1805
Memory 2 x 24 GB KingBank DDR5-6800 (47.8 GB usable)
Page file 32 GB fixed on D: (see above)
Graphics card NVIDIA GeForce RTX 5070 Ti, 16,303 MiB, driver 621.40, PCIe 4.0 x16
System Windows 11 Pro for Workstations, build 26300

The runtime was built with diagnostics,dlss,mimalloc.

7. What the frame rate looks like

With LEONIDA_FG_LIMIT_FPS=60 and LEONIDA_HEAP_RECHECK_EVERY=15, the
open 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-flicker branch has two notes that this
report touches, and both are still open or just after the fact. They are not
in main yet (read on 2026-12-02, main at 40ac041).

"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 with
this 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 change
was found 876 frames after the upload here. If the palms are the same kind
of thing, LEONIDA_HEAP_RECHECK_EVERY=15 is worth a tour of the same shape
as 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-02
07:24 UTC), which is what was on main when this was written. main has
moved since (40ac041, 11:08 UTC), so the numbers should be read as what this
build 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, build b99f876).

output          3840x2160   (presenting to a window width=3840 height=2160)
render          2560x1440   (upscale dispatch colour_size=(2560,1440) output_size=(3840,2160))
upscaler        DLSS         (LEONIDA_UPSCALE=dlss, RENDER_SCALE=0.6667)
hardware RT     DXR 1.1, tier=12, ray queries lifted 14 of 14, fell back 0 (software)
structures      BLAS live ~9800 (built 70721, refit 470001, rehydrated 24468),
                TLAS live 5 (builds 56439), TLAS asked 999416 found / 1414 misses
frame gen       2x, forced on with LEONIDA_FG_WITH_RT=1 (presented=2 per=2)

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):

first third median 19.2 fps  ->  last third median 9.7 fps   (-49%)
11:49  29.0 fps    11:52  18.3 fps    11:57   4.7 fps (213 ms a frame)    12:04   8.1 fps

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:

7123 in the PC's memory alone (32204 MB: the card reads those over the bus);
a card side was not given 0 times (0 MB) because the card was filled to the
windows' line (80 hundredths of its budget)

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 MB in the same place. Then:

the PC has 7174 MB free ... the least seen: 2270 MB of physical memory free
118 under pressure (118 of them with more than 4 GiB left to commit: by physical memory alone)
texture passes asked for 1631961, refused 0 ... allocations failed for want of memory 0

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:

blas_prep_ms=57646  tlas_prep_ms=11824  rehydrates=24468
frames with a backlog 38; chunks 43397; past the budget (postbuild/copy) 46211
hardware RT BLAS memory: budget 1471 MB, live 1403 MB; evicted 16779 (2366 MB)

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:

24.7 preparing (copies 5.9 ms 24.6 MB, textures 0.4 ms); 0.4 on the GPU; 7.6 copying back

After it:

24.5 preparing (copies 6.6 ms 35.8 MB, textures 1.9 ms); 57.3 on the GPU; 10.5 copying back

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 title
and EXIT=0; there is no device removal and no timeout in the log (the two
hits 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 timer runs from 11:52 onwards
without a gap (52 in that minute, 161 at the worst).

Two things worth trying, in the order I would try them:

  1. LEONIDA_CARD_BUFFERS_MB is 1536 here and the card side is only 2,548 MB
    while 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.
  2. The ray tracing's blas_prep_ms growing to 57 seconds suggests the
    per-frame BLAS refit is doing more work than the scene needs. LEONIDA_HW_RT_REFIT=0
    forces 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.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:6743512293 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/3109). Originally posted by [AquariusD0312](https://github.com/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: the game 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 `residency` throttle does with them. The measurements below are from the runtime's own log (`leonida_gpu=info`), the `host::frametime` line, which reports the frame times of the last five seconds. 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.rs` builds the frame generation's camera constants with a hardcoded field of view: ```rust let fov = 60f32.to_radians(); ``` 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 in `leonida-hle`'s `ffx.rs`), and the log line the probe writes shows it (`fov = ...` in `upscale probe`). What was missing was only the way to carry it to the frame generation: the `Upscale` struct (`leonida-gpu/src/list.rs`) had no field for it, so it was dropped between the title's description and `fg.rs`. The patch below carries it: * `Upscale` takes a `fov`, and its words (`to_words` / `from_words`) take one more: the length is encoded in the record's op word, so the reading side follows it (`list/thin.rs`, `translate`). * `leonida-hle`'s `ffx.rs` fills it from `d.camera_fov`. * `fg.rs`'s `tag` takes it and passes it on, and `constants` uses it: a value above 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.rs` and `fsr.rs` take 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 `ffxDispatch` at all, so the G-buffer pass's depth and motion vectors are what frame generation uses there (`fg.rs`: "the G-buffer pass's from 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: | | G-buffer path | the title's | |---|---|---| | `near` | 10000.0 | `camera_near` | | `far` | 0.15 | `camera_far` | | `jitter` | `[0.0; 2]` | the upscale's jitter | | `mv_pixels` | `[1.0; 2]` | the upscale's motion scale | | `fov` | 60 degrees | `camera_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_FPS` holds the *rendered* frames, so 28 halves the frame rate The frame generation limit is the interval Reflex gives the rendered frames (`fg.rs`: `frameLimitUs: limit`). With 2x generation the shown frames are twice 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_FPS` | rendered frames (median) | ms/frame | frames over a second | |---|---|---|---| | 28 (the default) | 14.0 | 71.4 | 9 | | 30 | 15.0 | 66.7 | - | | 56 | 26.4 (up to 29.9) | 35.9 | 0 | | 60 | 26.4 (up to 29.9) | 38.2 | 0 | | generation off | 26.3 - 30.6 | 32.7 - 38.0 | 11 | At 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=300` shows stale textures: the models flicker A texture the title paints through another view is looked at again `LEONIDA_HEAP_RECHECK_EVERY` frames after its upload (300 by default). The log says what that costs: ``` WARN leonida_gpu::draw: a texture picked by index changed after the last usual look (LEONIDA_HEAP_RECHECK_EVERY): uploaded again slot=11666 address=0xb4c400000 bytes=2211840 frames_after_upload=876 ``` 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=15` the change is found while it lasts, and the 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 warm` makes the host pipelines and puts them where a run finds them. 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: ``` 1626 made in 317 s (ms each: median 181.6, p90 5477.8, p99 9460.7, most 16729) ``` 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: ``` 2328 made in 7 s (ms each: median 7.1, p90 29.2, p99 452.1, most 784) ``` 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 (`AppHangB1` in the Windows event log, both at a moment when the log's last line was a normal per-frame statistic and no error was written): * 2026-12-02 18:38:44 - with `LEONIDA_UPSCALE=dlss`, which shows a white screen. This is the path `play-nvidia.ps1` warns about ("Series X with DLSS: experimental, the world is not lit on this path yet"), and here it hangs instead of showing black. * 2026-12-02 19:04:38 - with the default settings, after six minutes in 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 the process held 31,086 MB private. **The page file.** The runtime's memory accounting at that moment: ``` memory: 31086 MB private (35191 MB of it in memory; the PC has 7174 MB free and 21181 MB left to commit) ``` The whole machine while the game runs: ``` commit limit 79.8 GB committed bytes 58.8 GB ``` 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: `XMemVirtualAlloc` goes to `VirtualAlloc2` and `XMemAllocDefault` to the process 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.rs` watches the commit headroom and backs off when it is low: ``` has_upload_reserve: commit >= 512 MiB (256 MiB when baking) has_growth_reserve: commit >= 1024 MiB (256 MiB when baking) pressure begins at 4 GiB left to commit, critical at 1.5 GiB ``` 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`, with 20,040 MB of commit still free at its lowest. Over the run that hung, the runtime's own accounting of what was left: ``` the PC has 7174 MB free and 21181 MB left to commit (the last line) the least seen over the run: 6868 MB of physical memory free, 20040 MB left to commit ``` 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: ``` PagingFiles : D:\pagefile.sys 32768 32768 (32 GB, fixed, not automatic) ``` 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 `residency` throttle is not what protects the run - the operating system's own refusal to commit is. --- ## 6. The PC | | | |---|---| | CPU | Intel Core i5-14600KF, 14 cores / 20 threads | | Mainboard | ASUSTeK TUF GAMING B760M-PLUS WIFI II, BIOS 1805 | | Memory | 2 x 24 GB KingBank DDR5-6800 (47.8 GB usable) | | Page file | 32 GB fixed on `D:` (see above) | | Graphics card | NVIDIA GeForce RTX 5070 Ti, 16,303 MiB, driver 621.40, PCIe 4.0 x16 | | System | Windows 11 Pro for Workstations, build 26300 | The runtime was built with `diagnostics,dlss,mimalloc`. ## 7. What the frame rate looks like With `LEONIDA_FG_LIMIT_FPS=60` and `LEONIDA_HEAP_RECHECK_EVERY=15`, the open 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-flicker` branch has two notes that this report touches, and both are still open or just after the fact. They are not in `main` yet (read on 2026-12-02, `main` at 40ac041). **"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 with this 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 change was found 876 frames after the upload here. If the palms are the same kind of thing, `LEONIDA_HEAP_RECHECK_EVERY=15` is worth a tour of the same shape as 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-02 07:24 UTC), which is what was on `main` when this was written. `main` has moved since (40ac041, 11:08 UTC), so the numbers should be read as what this build 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`, build `b99f876`). ``` output 3840x2160 (presenting to a window width=3840 height=2160) render 2560x1440 (upscale dispatch colour_size=(2560,1440) output_size=(3840,2160)) upscaler DLSS (LEONIDA_UPSCALE=dlss, RENDER_SCALE=0.6667) hardware RT DXR 1.1, tier=12, ray queries lifted 14 of 14, fell back 0 (software) structures BLAS live ~9800 (built 70721, refit 470001, rehydrated 24468), TLAS live 5 (builds 56439), TLAS asked 999416 found / 1414 misses frame gen 2x, forced on with LEONIDA_FG_WITH_RT=1 (presented=2 per=2) ``` **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): ``` first third median 19.2 fps -> last third median 9.7 fps (-49%) 11:49 29.0 fps 11:52 18.3 fps 11:57 4.7 fps (213 ms a frame) 12:04 8.1 fps ``` 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: ``` 7123 in the PC's memory alone (32204 MB: the card reads those over the bus); a card side was not given 0 times (0 MB) because the card was filled to the windows' line (80 hundredths of its budget) ``` 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 MB` in the same place. Then: ``` the PC has 7174 MB free ... the least seen: 2270 MB of physical memory free 118 under pressure (118 of them with more than 4 GiB left to commit: by physical memory alone) texture passes asked for 1631961, refused 0 ... allocations failed for want of memory 0 ``` 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:** ``` blas_prep_ms=57646 tlas_prep_ms=11824 rehydrates=24468 frames with a backlog 38; chunks 43397; past the budget (postbuild/copy) 46211 hardware RT BLAS memory: budget 1471 MB, live 1403 MB; evicted 16779 (2366 MB) ``` 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: ``` 24.7 preparing (copies 5.9 ms 24.6 MB, textures 0.4 ms); 0.4 on the GPU; 7.6 copying back ``` After it: ``` 24.5 preparing (copies 6.6 ms 35.8 MB, textures 1.9 ms); 57.3 on the GPU; 10.5 copying back ``` 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 title` and `EXIT=0`; there is no device removal and no timeout in the log (the two hits 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 timer` runs from 11:52 onwards without a gap (52 in that minute, 161 at the worst). **Two things worth trying, in the order I would try them:** 1. `LEONIDA_CARD_BUFFERS_MB` is 1536 here and the card side is only 2,548 MB while 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. 2. The ray tracing's `blas_prep_ms` growing to 57 seconds suggests the per-frame BLAS refit is doing more work than the scene needs. `LEONIDA_HW_RT_REFIT=0` forces 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.
MoonEyes commented 2026-12-02 21:38:28 +00:00 (Migrated from github.com)
Author
Contributor

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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7359568495 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/3109#issuecomment-7359568495). Originally posted by [MoonEyes](https://github.com/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).
MoonEyes commented 2026-12-03 16:17:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T16:17:07Z.


This was generated by AI during triage.

Triage Notes

What we've established so far:

  • The report combines at least ten findings: frame-generation camera constants, a frame cap, texture rechecks, warm-up behavior, memory/page-file use, and other settings.
  • The FOV change is tracked separately in PR #3111, which explicitly does not cover the Series X G-buffer path or the other sections.
  • The remaining items have different symptoms and acceptance criteria, so one category/state cannot make the full issue actionable as a single unit.

What we still need from you (@AquariusD0312):

  • Please split the remaining independent findings into focused issues, or identify the single remaining behavior you want tracked here and its measurable expected result. Keep the existing FOV work in #3111.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7384579848 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/3109#issuecomment-7384579848). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T16:17:07Z. --- > *This was generated by AI during triage.* ## Triage Notes **What we've established so far:** - The report combines at least ten findings: frame-generation camera constants, a frame cap, texture rechecks, warm-up behavior, memory/page-file use, and other settings. - The FOV change is tracked separately in PR #3111, which explicitly does not cover the Series X G-buffer path or the other sections. - The remaining items have different symptoms and acceptance criteria, so one category/state cannot make the full issue actionable as a single unit. **What we still need from you (@AquariusD0312):** - Please split the remaining independent findings into focused issues, or identify the single remaining behavior you want tracked here and its measurable expected result. Keep the existing FOV work in #3111.
Sign in to join this conversation.
No labels
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.

Reference
ProjectLeonida/mandy#3109
No description provided.