The frame generation's field of view is a fixed 60 degrees, and three other settings that hold the frame rate back #3109
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Reference
No Branch/Tag specified
main
github-pr/3295
beta
docs/changelog-3483-3500
github-pr/3294
github-pr/2975
github-pr/2815
feat/gate-driver-start
feat/skip-pipelines-release
perf/lazy-compare
perf/mwaitx-wait
test/prio-ceiling-main
fix/ab-cpu-stdout
fix/gate-old-crashes
diag/ab-cpu
test/main-0312
github-pr/3291
diag/indirect-clamp-census
feat/barrier-enhanced
perf/texture-frame-ceiling
perf/dstorage-threads
fix/console-queue-dma-tables
fix/port-descriptors-record-parts
fix/frame-waits-fence
fix/console-sampler-words
fix/graphics-userdata-spill
fix/xg-reserved-layout-rotation
fix/barrier-console-flags
fix/switches-wait-test-child
test/list-value-waits
test/lot-gxdk-0412
fix/bvh-compacted-size
docs/i18n-quickstarts
feat/native-pipeline-slots
fix/clippy-leonida-gpu
fix/list-value-producers
fix/descriptor-page-straddle
fix/xmem-low-window
fix/ffx-jitter-never-zero
fix/run-stdout-closed
github-pr/2892
github-pr/2896
feat/warm-save-every
github-pr/2980
github-pr/2994
github-pr/3005
github-pr/3010
github-pr/3136
github-pr/3303
github-pr/3220
github-pr/3143
github-pr/3330
github-pr/3226
github-pr/3187
carry/3395
github-pr/2946
github-pr/2947
github-pr/2945
github-pr/2983
github-pr/3001
github-pr/3372
github-pr/3128
github-pr/3296
github-pr/2588
github-pr/3119
github-pr/3378
fix/crash-diagnostics
feat/dlss-mip-bias
fix/retired-out-of-order
fix/dxr-postbuild-barrier
fix/amd-relay-default
fix/removed-report-wait
feat/heap-twin
feat/vram-margin
github-pr/2472
github-pr/3123
github-pr/3088
assets/annonce-v1
github-pr/2794
github-pr/3300
github-pr/3304
github-pr/3308
github-pr/3367
github-pr/3369
fix/launcher-dlss-diagnostics
github-pr/3269
github-pr/2957
github-pr/3205
fix/crash-zero-guard
github-pr/3185
github-pr/3099
github-pr/3104
github-pr/3348
github-pr/3379
github-pr/3377
perf/darner-title-priority-ceiling
github-pr/3376
gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github-pr/3373
github-pr/3368
github-pr/3198
gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github-pr/3346
github-pr/3375
github-pr/2958
github-pr/3151
github-pr/3307
github-pr/3278
github-pr/3374
fix/runtime-test-conservative-fixtures
github-pr/3366
ci/shard-semantic-linux
github-pr/3354
docs/fg-limit-fps-switch
github-pr/3365
fix/read-file-hard-link
github-pr/3364
fix/book-slot-heap-never-read
github-pr/3361
github-pr/3263
github-pr/3360
github-pr/3353
github-pr/3331
fix/alias-later-queued-submissions
github-pr/3352
github-pr/3228
github-pr/3349
claude/gallant-sagan-aamatr
github-pr/3200
github-pr/3132
github-pr/3323
github-pr/3332
github-pr/3340
github-pr/3311
github-pr/3334
github-pr/3297
github-pr/3256
github-pr/2567
github-pr/2851
d3d12/agility-sdk-621
github-pr/3164
github-pr/3114
github-pr/3050
github-pr/3113
github-pr/3326
github-pr/3144
github-pr/2642
github-pr/3072
github-pr/2789
github-pr/2643
github-pr/3009
github-pr/3035
github-pr/3031
github-pr/2686
github-pr/2834
github-pr/3321
github-pr/3325
github-pr/3290
github-pr/3324
github-pr/3130
claude/fervent-curie-m19lnr
github-pr/3309
github-pr/3305
github-pr/3306
github-pr/3302
github-pr/3301
github-pr/3345
github-pr/3211
github-pr/3027
github-pr/3286
github-pr/3235
github-pr/3265
github-pr/3275
codex/skip-no-hit-ray-passes
github-pr/2823
github-pr/2911
github-pr/3262
github-pr/3125
github-pr/3206
github-pr/3250
github-pr/3238
github-pr/3188
github-pr/2952
github-pr/3217
github-pr/3168
t3/preserve-fsr-sdk-restart-path
t3/propagate-host-failure-hresult
github-pr/3209
t3/launcher-custom-parameters
github-pr/3207
github-pr/3183
github-pr/3160
github-pr/3201
ci/less-to-run
github-pr/2930
github-pr/2797
github-pr/2999
perf/native-compute-shader-forms
github-pr/3191
github-pr/3011
github-pr/3019
github-pr/2996
gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
claude/blissful-franklin-ukp7ag
github-pr/3141
github-pr/3156
github-pr/3150
github-pr/3153
github-pr/3163
github-pr/3142
github-pr/3139
github-pr/2841
github-pr/3069
github-pr/3098
github-pr/3107
github-pr/3071
github-pr/2774
github-pr/2889
github-pr/3075
github-pr/2661
github-pr/3064
github-pr/3054
github-pr/3049
github-pr/2855
github-pr/2943
github-pr/3016
github-pr/2887
github-pr/3006
github-pr/3003
github-pr/2993
notes/card-time-and-plant-flicker
github-pr/2989
feat/vulkan-rs
github-pr/2985
github-pr/2951
github-pr/2982
github-pr/752
github-pr/792
github-pr/2877
github-pr/2654
github-pr/2893
github-pr/2948
github-pr/2944
github-pr/2919
github-pr/2915
archive/ci/less-to-run/20261202T1121Z
github-pr/2800
github-pr/2822
github-pr/2833
github-pr/2840
github-pr/2831
github-pr/2832
github-pr/2801
github-pr/2890
github-pr/2891
github-pr/2664
github-pr/2807
rt-call-trace
github-pr/2755
perf/ahead-split
github-pr/2587
github-pr/2698
github-pr/2609
github-pr/3219
docs/readme-runtime-proposal
github-pr/2017
github-pr/1741
github-pr/1667
codex/coord-claim-check-20261124-7e48
v1.1.0
v1.0.1
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy#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?
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,mainat 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 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 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, 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.
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).
Triage Notes
What we've established so far:
What we still need from you (@AquariusD0312):