Carry the title's field of view to the frame generation #3111
Closed
leonida/mandy
AquariusD0312 wants to merge 0 commits from
local/fov-fix into main
pull from: local/fov-fix
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
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
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!3111
Loading…
Reference in a new issue
No description provided.
Delete branch "local/fov-fix"
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 closed
This pull request cannot be reopened because the branch was deleted.
Claimed in the coordination issue as: D3D12-FOV-FROM-TITLE-UPSCALE
Depends on: #3109
Current head:
b877dc5be-63efa834c(the clippy fix for the two uses of1.5707963infg.rsthat @merzleckeier reported) -77fc82daf(the three reviewdefects fixed, and the narrow-angle fix for the [P2] below) merged with
--no-ffonto the current
maind9b618f10. The merge brings inmain's own changes tofg.rsand tofindings.md, but it changes no line of the field-of-view code ineither, so the behaviour of this patch is the same as on
63efa834c.What and why
The vertical field of view is a fixed 60 degrees in the frame generation's
camera constants:
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::cameraFovAngleVertical, read inleonida-hle'sffx.rs). What was missing was only the way to carry it to the framegeneration: the
Upscalestruct (leonida-gpu/src/list.rs) had no field forit, so it was dropped between the title's description and
fg.rs.This patch carries it:
Upscaletakes afov, and its words (to_words/from_words) take onemore. The length of a record is encoded in its op word
(
list/thin.rs,translate), so the reading side follows it.leonida-hle'sffx.rsfills it fromd.camera_fov.fg.rs'stagtakes it and passes it on, andconstantsuses it. 0 meansthe title did not say, and the 60 degrees is used.
dlss.rsandfsr.rstake it too, so both frame generation paths use it.MoonEyes' review of
15b579756, and what changedThe review gave three defects, all now fixed in
77fc82daf:The units rule was a guess with two meanings for one field. It read a
value above a half turn as degrees and one below as radians, so a
three-degree sniper zoom read as three radians came out as 172 degrees. The
FidelityFX API documents the field of view of an upscale dispatch in radians,
and the repository's own dispatch test passes 1.0f for it
(
runtime/test/fsr_dispatch_test.cpp). The title's own value was measured onthis path too: the upscale probe of a run reads 0.471 rad
(
d3d12/docs/findings.md), which is 27 degrees and not half a degree. Therule is now settled once, in
leonida-hle'sffx.rs(fov_radians): thenumber is taken as radians.
The range check was written out twice, in
fg.rs'sconstantsand infsr.rs, and the two could drift apart. There is now onepub(crate) fn fov_or_default(f32) -> f32infg.rs, which both take. Thefallback is the same 60 degrees as before on both paths.
The tests checked the clamp and not the carry.
fov_testsexercisedconstants()with hand-madeLatestvalues, and nothing checked that acamera_fovfrom the title's description arrives in the frame generation'sown record. There is now a test for the trip the value makes (the
description, the list's words, the record the frame generation reads) and one
for the rule both paths share.
The review also asked for the claim ID and the AI disclosure, which the
description did not have.
merzleckeier's review of20ab69654found one more thing, a [P2]: therange check's lower bound (0.1 radians, 5.73 degrees) kept out a narrow field
of view the title can turn to (a three-degree zoom is 0.052 radians), on the
reasoning that a narrow one cannot be projected. The reasoning was wrong. The
projection is built from the tangent of half the field of view (
ys = 1 / tan(fov / 2)), and that comes out negative only above a half turn, which isthe upper bound's job (3.0 radians, 171.9 degrees). A narrow angle is
projected as it is, so the lower bound is now 0.001 radians (0.057 degrees),
which turns away only a value that has degenerated: a field of view of zero
has no tangent at all, and the narrowest angle the projection can still be
built for is about 1e-36 degrees, thirty orders of magnitude below that. The
projection regression takes a three-degree field of view as it is now (
ys=38.188457, not the default's 1.732051), and the lower bound going back to 0.1
makes that test and the kept-range test fail.
What this does not change yet
On Series X the title's own upscaler does not go through
ffxDispatchatall, 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 theG-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.
The path that carries it is the title's own upscale going through FidelityFX
(Series S, or Series X with
LEONIDA_FSR_UPSCALER=1), where the framegeneration is given the depth and the motion vectors the upscale read
(
LEONIDA_FG_GBUFFER=0, so not the G-buffer pass's, which says no field ofview).
The other four numbers on the G-buffer path are assumptions as well
(
near10000.0,far0.15,jitter[0.0; 2],mv_pixels[1.0; 2]),and the title's projection matrix would give all of them. That is a bigger
change and left out here.
Tested
The unit tests, with the negative controls. Measured on this head against its
base
maind9b618f10:cargo test -p leonida-gpu --lib --locked716 passedbefore and 722 with the six new ones;
cargo test -p leonida-hle --lib --locked258before and 259 with the new one. With
--features diagnostics(the profile thediagnostics build uses) the same two commands give 797 and 803, and 258 and 259.
Each new test fails without the fix it covers, each one put back on its own:
fov_radians(a value above half a turn read as degrees)the_field_of_view_the_description_carries_is_radiansfailsMAX_FOV_RADIANSwidened to 30.0a_field_of_view_outside_the_range_falls_back_to_the_defaultandthe_shared_rule_keeps_the_titles_number_and_falls_back_to_the_defaultfailMIN_FOV_RADIANSback to 0.1a_narrow_field_of_view_the_title_said_is_projected_as_it_is,a_field_of_view_inside_the_range_is_keptandthe_shared_rule_keeps_the_titles_number_and_falls_back_to_the_defaultfailthe_field_of_view_the_title_says_reaches_the_frame_generationfails ("the field of view did not survive the list's words"), and so does the round-trip testan_upscale_keeps_its_numbers_through_its_wordsa_field_of_view_the_title_said_is_taken_as_it_isfailsThe run on the path the change is for. Built with
diagnostics,dlss,mimallocand run on an RTX 5070 Ti (driver 621.40,Windows 11 build 26300), the Series S profile (1280x720 rendered, 1920x1080
output),
LEONIDA_FRAME_GEN=2,LEONIDA_FG_GBUFFER=0,LEONIDA_UPSCALE_PROBE=1:The two are the same to the last bit, so the value the title gives is the
value the frame generation is given. It moves with the camera: the probe
reads 0.5251 to 0.5297 rad (30.08 to 30.35 degrees) while the world loads
and 0.6784 rad (38.87 degrees) after it, then 0.8648 rad (49.55 degrees)
once the camera turns. It is the title's own number, not a constant, and read
as degrees it would be half a degree.
The run: 2 min 39 s, no device loss, no crash, no warning from the runtime
about the frame generation. The rendered frames came 33.2 ms apart (the
median of the 17 windows' medians, 16.6 to 33.6 ms), which is 30.1 rendered
frames a second and 60.2 shown with the generation on; the GPU's own frame
time was 33.3 ms. Streamline was started and the amount set to 2
(
amount set (1 = off) result=sl::Result::eOk (0) frames=2).The earlier run on the Series X profile, where the patch changes nothing, is
in the history of this pull request: 28.5 to 36.8 ms a frame, the 95th
percentile at 45.3 ms, and no frame over a second.
GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 621.40, Windows 11 Pro for
Workstations build 26300 (the run above and the earlier Series X one). The
unit tests need no GPU.
The run on this head, by someone else. @lixonik ran
b877dc5bein the world onan RTX 5070 12 GB, the Series S profile, DLSS with Frame Generation 2x so the live
ffxDispatchvertical field of view feeds DLSS-G: 315 s in the world, 0 runtimeerrors, 0 device lost, the generation steady (
tagged=true status=0) past frameindex 12,600, and a median of 25.4 fps (39.4 ms). @merzleckeier checked this head
under Wine with the Windows MSVC build (all 23
fg::tests, the upscale list roundtrip and the six HLE FidelityFX tests) and found that it merges cleanly with
#3295
af01c295; the combined build passes all 23fg::tests. @OreoFR checked thesame head on current
main(719leonida-gpuand 258leonida-hletests passing)and confirmed the field of view reaches both the DLSS and the FSR 3 path.
AI-assisted: yes. The code, the tests and this description were written with
Space-Bunny (WorkBuddy). The review above was answered by the same agent:
a separate reviewer agent was started, but it did not finish (it was reading
the whole tree and building the crates, which takes longer than the work
itself), so the checks were done here instead: the units against the dispatch
test, the range check against the two callers, each new test against the fix
it covers (the units rule put back, the range widened, the field of view
dropped from the list's words), the boundary values, the stale comments, and
the clean-room check. The run report's numbers are from the machine above.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (Notranslator rule: this is the D3D12 runtime, and the field of view is documented in
d3d12/docs/findings.mdinstead.)Related
The measurements and the other settings that hold the frame rate back are in
the issue: https://github.com/ProjectLeonida/mandy/issues/3109
Two notes on this pull request:
The measurements in the body are from the build at 917c54 (2026-12-02 07:24 UTC), which is what was on main when it was written. main has moved since (40ac041), so they should be read as what that build does.
The patch does not change the behaviour on the path this PC uses: the title's own upscaler does not go through fxDispatch on Series X, so the G-buffer pass's depth and motion vectors are what frame generation gets there, and the 60 degrees stays in place. The patch is what lets the title's own value through when the title does go through its upscale, and it carries the same value the runtime already reads and logs in the upscale probe.
The other three settings measured in the issue (the frame generation limit, the texture recheck interval and the pipeline warm-up) need no code change and are in the issue.
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
Ran natively on Windows 11, head
9aa55c3bbmerged into currentmain(23a51c494, merged clean), toolchain 1.98.1 from rust-toolchain.toml. No game launch and no game data, only the crate tests.The
leonida-gpulib tests don't compile with this change.Upscalegot a newfovfield but the existing round-trip test inlist.rsstill builds one without it:Same error on the PR head alone, before the merge. On
mainthe same command builds and runs. The fix is one line inan_upscale_keeps_its_numbers_through_its_words(addfov: <something non-zero>). Itsexpect("eleven words")message is now twelve too, and the[..10]truncation check still passes but[..11]would be the tighter one now that the record is 12 words.With that line added locally (not pushed), everything passes:
cargo test -p leonida-gpu --features diagnostics --lib(full suite)an_upscale_keeps_its_numbers_through_its_wordswithfov: 1.0to_words/from_wordsfg::,fsr::, upscale tests withLEONIDA_D3D12_WARP=1 LEONIDA_D3D12_DEBUG=1cargo test -p leonida-hle --libI also fed a range of values into
fg::constantswith a throwaway test (not committed), 2560x1440, near 10000 / far 0.15, to see what the new unit rule does at the edges:fovinys(row 1 ofcameraViewToClip)clipToCameraViewgets -2.3e7cameraFOVSo 0, negatives and NaN are handled well, but there is no upper bound. Anything at or above pi radians or 180 degrees, and +inf, reaches Streamline as a negative or NaN projection. A plain clamp, e.g. falling back to the default unless the radian value is in something like (0.1, 3.0), would cover it. Only a misbehaving title would send such values, so this is a hardening note, not a blocker.
Two smaller things about units:
fg.rssays the FidelityFX value is in degrees, while the new comments inffx.rs,list.rsanddlss.rssay radians.mainitself treatscamera_fov_angle_verticalas radians (fsr.rspassesFOV_Y_DEGREES.to_radians()there), and the repo's own FFX dispatch test inruntime/test/fsr_dispatch_test.cpppasses1.0f, so the degrees branch should never fire for a well-behaved title. It might be simpler to drop it and treat the value as radians everywhere.fsr.rsdoesn't apply it. It passesinputs.fovstraight intocamera_fov_angle_verticalwhenever it's > 0, so a value of 60.0 would be 60 deg for the DLSS-G path (fg::constants) but 60 radians for the FSR frame generation path. Whichever rule you keep, it would be good to resolve the value once (inffx.rsorlist.rs) so both paths see the same number.Not checked: an in-game run (the render gate MoonEyes asked for still applies), the DLSS feature build, and the actual effect of a non-60 FOV on generated frames, since on Series X the title doesn't go through
ffxDispatchand nothing here would reach the new value.GPUs tested: n/a (CPU-only tests).
AI-assisted: yes (Claude Code).
Thanks for both replies. The build break is mine and it is fixed.
cargo test -q -p leonida-gpu --features diagnostics --lib --lockeddoes not build with the first commit.Upscalegot afovfield and the round-trip test inlist.rsstill built one without it. I rancargo buildand notcargo test, which is how it got through. Theexpect("eleven words")message and the[..10]truncation check are now twelve and[..11].The three points are taken as they are made, and the commit on top of the first one does this:
The units are settled in one place.
leonida-hle/src/modules/ffx.rsreads the value once, where the title's number comes in: radians, and a value too large to be radians is read as degrees.fg::constantsand the FSR frame generation'scamera_fov_angle_verticalboth take the number from there, so 60.0 means the same thing to both. The degrees branch is out offg.rs, where it made the two paths disagree.The range is checked. A field of view outside (0.1, 3.0) radians, or one that is not a number, falls back to the default 60 degrees. At or above half a turn the projection came out with a negative or a NaN in it, and that is what reaches Streamline.
MIN_FOV_RADIANSandMAX_FOV_RADIANSare shared withfsr.rs, so the two paths take the same range.The comment about the units in
fg.rssaid degrees, the new ones elsewhere said radians; the code now reads radians, and the comments say so.Three tests are added for it in
fg.rs: the title's own value is taken as it is, a value outside the range falls back to the default, and a value inside it is kept and is not the default's. The full suite on the merged head:780 is 772 of yours plus the 3 new ones.
Merged onto current
main(acc35074), cleanly, no conflict:The run report MoonEyes asked for is coming: the head merged onto the current
main, in the world for more than 300 s, with the rendered frames and the device-lost count. It will be a separate reply.One thing to say plainly, so it is not read as a change in behaviour: this patch does not change anything on the path a Series X title takes. The title's own upscaler does not go through
ffxDispatchthere, so the G-buffer pass's depth and motion vectors are what the frame generation gets, and the 60 degrees stays in place. The patch is what lets the title's own value through on the paths that do go through its upscale. The G-buffer pass would need the title's projection matrix to say a field of view of its own, which is a larger piece of work than this.Two things about the frame generation, from a run on the Series X profile at 2560x1440, that came out of testing the profile on this PC.
The
missing common constantsburst is the menus and the loading, not a broken frame generation. The warning appears once a present whileLATESTis still empty, so every present before the first in-world frame logs it - 1,494 of them in the first twenty seconds here, and 272 more in one minute later on when the window lost the focus. The frame generation itself starts when the G-buffer pass hands its depth and motion vectors over, and from then on there are none. lixonik's run onmain(69cd4106c) shows the same shape with the transition marked:frame generation: depth and motion vectors are the G-buffer pass's from now on ... size=[2560, 1440],tagged=true, and no warning after it.That matches what we saw:
presented=1 per=1while the title was in its menus, and the warning repeating every frame. It is not a fault, and it is not a reason to read the presented rate as the generated one.The cleanup in
fg.rs:993would be worth having. KeepingDLSSGMode::eOnoff untilLATESThas been filled once would take away the 2,000-3,300 misleading warnings in the startup and the menus. We spent time on them ourselves: they read like a broken frame generation, and the number of them is what the issue #3137 report is built on.What the frame generation costs on that profile, and what a stall there is not. With the profile's own settings the rendered frames sat 71.4 ms apart (14.0 a second, 28 shown), which is the frame generation limit of 28 shown frames holding the rendered ones to half of it. Raising the limit to 60 gives 26.4 rendered frames a second and takes the frames over a second from nine in a run to none - that is in the issue.
One thing we found there that is not the frame generation: on the same profile, at the same resolution, the first bind of a pipeline is where the stalls are. Over a 44-minute run:
The render path is the same in both (2560x1440); what differs is the output. The stalls are the driver compiling a pipeline it has not seen, and the runtime's own disk cache of the driver's pipelines holds almost nothing (14 entries, two of them large and the rest 64 KiB each). So the frame rate is steady between the stalls and drops at each new one.
This does not change what the patch does, which is the same as before: the title's own upscaler does not go through
ffxDispatchon Series X, so the G-buffer pass's depth and motion vectors are what the frame generation gets there, and the 60 degrees stays in place. The patch is what lets the title's own value through on the paths that do go through its upscale.The run report MoonEyes asked for follows in a separate reply.
Four names are owed here.
@lixonik - the run on the current
main(69cd4106c) that settled themissing common constantsquestion: the warnings are the menus and the loading, the G-buffer pass latches on the first in-world frame, and there are none after it. That is what our own run here showed as well, and it is the reason the report below is a comparison between two runs and not a verdict on the profile.@fiestorra - issue #3137, whose report of 2,208
missing common constantsand 35.7 ms frames on an RTX 4090 is the same shape this PC showed, and whose reading of where the warnings come from (sl.set_constantsis only reached when the depth and the motion copies are found, so a present without them is exactly what Streamline reports asmissing common constants) is the right one.@Kal0s-design - the report that the
leonida-gpulib tests did not build with the first commit, and the edge-value table of the field of view that showed the projection coming out with a negative or a NaN in it. Both are fixed in the commit on top, and the table is what the range check is based on.@MoonEyes - the gate this pull request is held behind. The run report is below.
The cleanup @lixonik suggests is worth having and we would support it: keeping
DLSSGMode::eOnoff untilLATESThas been filled once would take away the 2,000-3,300 warnings in the startup and the menus, which read like a broken frame generation and are what issue #3137 is built on.Run report on the current head, as @MoonEyes asked for.
What was run
760e31e7a97e941a6e5e6e630a3cbd6caa5639d5(local/fov-fix, the field-of-view patch merged onto main)mainit was merged ontoacc3507455ab10a38e5a49a2c4678a276fbcf31d(upstreammain, PR #3077's merge point, 2026-12-02 14:23 UTC).mainhas moved on since - it is at3c106eb2ff088d1a046db268e340db9f9fb4ed66now - so this report is about that head, not about today'smain.D:(D://pagefile.sys 32768 32768) - see issue #3109 for why it has to be that sizediagnostics,dlss,mimalloc(diagprofile)LEONIDA_OUTPUT=2560x1440, the title's own dynamic resolution (LEONIDA_RENDER_SCALE_MIN=0.75, so 1080-1440 lines), the title's own upscaler,LEONIDA_FRAME_GEN=2,LEONIDA_FG_LIMIT_FPS=60,LEONIDA_HEAP_RECHECK_EVERY=15The runtime logged its own settings line: 70 settings, item for item the same as the run in issue #3109
(
play-1203-001153.log), so the numbers below are on the same settings that report was made with.The run
One session, 00:42:17 - 00:48:32 local, the runtime's log in
%LOCALAPPDATA%\Leonida\logs\play-1203-004217.log.In the world after loading: 330.8 s (65 frame-time windows, 16:43:05 - 16:48:31).
device removed/device lost/DXGI_ERROR_DEVICE_*in the log; no 1000/1001/1002/4101 in the Windows Application or System log)window closed: suspending the title, thentitle suspended; ending the titleThe one frame over a second in the whole log (4372 ms) is the moment of entering the world - it arrives with
first bind pipelineand the first texture readbacks, in the loading window (643 draws/frame), not in play.For the same measure as issue #3109 §10, over the samples with more than 3,000 draws a frame:
fps min 22.8 / median 26.6 / max 30.0, and the first third to the last third 27.0 -> 26.7 fps - no fall over the
session. (
draws/frame > 3000also drops one second in the world where the title submitted 2 draws, which is thetail of the loading; over
draws >= 1000it is 26.9 fps median and 27.0 -> 27.2. Both agree: no decline.)Where the frame time goes, medians over the world:
A note on that
on the GPUline, because it reads as if the card did nothing: it isSUBMISSION_US[1](
host.rs:1072-1076), the time the submitting thread stood waiting for the card's fence, not the card'sown work. The log says the same number in words on the next line ("the submitting thread stood waiting for the
card X ms") and they match line for line in all 64 rows of the world phase. So 0.00 ms means the CPU never
blocked on the card - the limit here is the 26.1 ms of preparing on the CPU. The card itself is reported as
about 75% busy by that same line. The per-command GPU times need
VICTORY_GPU_TIMING, which was not on here,so the time on the card is not part of this report.
The comparison run on
mainaloneNot done yet, and I would rather say so than present a number from a build that is not the comparison. What
there is: the run in issue #3109's
play-1203-001153.log(00:11-00:18, same 70 settings, same build family)has 10 frames over 1 s, the longest 34.8 s, and its log ends without a
window closedline. This run hasnone of those. I would like to run
mainalone for a like-for-like comparison and post it here.What was checked for the flickering and the field of view
No flicker was seen in this run, and none of the long frames came from the texture path. The six frames over
100 ms all arrive with
first bind pipeline/shader translatedon the same second - the same signature asthe long frames in the earlier log - so they are the driver compiling new pipelines, not the texture recheck.
The recheck itself behaved as intended: 300 textures were found changed, the median 9 frames after their
upload.
On the field of view, the patch's own point holds on this path, as @lixonik's run on
mainand issue #3137 by@fiestorra showed: the title's own upscaler on Series X does not go through
ffxDispatch, so the G-bufferpass's depth and motion vectors are what the frame generation is given there and the 60 degrees stays in place
on that path. This run is on that path, so it is a stability and frame-rate report, not a test of the new number.
@Kal0s-design caught the build break in the first commit (
cargo test -q -p leonida-gpu --features diagnostics --lib --lockeddid not build). It is fixed in
15b579756, andleonida-gpu780 tests andleonida-hle248 tests pass here.Thanks to @MoonEyes for the gate, and to @Kal0s-design, @lixonik and @fiestorra for the corrections that made
this report mean what it says.
A detail on the long frames in the earlier log, since it is the one thing that differed between the two runs.
I checked every frame over 1 s in
play-1203-001153.log(issue #3109's run, 10 of them) against the pipelineevents in the log. All 10 fall in a window that has pipeline events in it -
first bind pipeline/shader translated/host mesh pipelineon the same seconds:So those stalls are the driver compiling new pipelines, not the network, not the IO and not the texture recheck.
This run has the same signature on its six frames over 100 ms, but they are all in the first 15 s after loading
and none of them reaches 100 ms on its own beyond the loading itself.
That is the difference between the two runs that I can point at: same settings, same path, but the earlier one
kept meeting new pipelines for the whole seven minutes and this one only met them in the first fifteen seconds.
Whether that is the driver's cache, the save, or where the walk went, I cannot say from the log - but it is the
thing I would look at next.
Code review of head
15b579756(merge basea917c54d6, 184 commits behind; merges cleanly into currentmain45dc41f95). Not built:leonida-gpuandleonida-hleare Windows-only. CI on this head is ataction_required.The build break @Kal0s-design found (
list.rsround-trip test missingfov) is fixed in15b579756: the test now setsfov: 1.2, and the word count and truncation check moved to 12 and[..11].Upscaleis constructed in only those two places (list.rs:3132test,ffx.rs:164), so nothing else misses the field.Process gaps (CONTRIBUTING.md / AGENTS.md)
AI-assisted:line with the models used. Both are required for the merge checklist.760e31e7a(a local merge ontoacc350745), and the body says the patch does not change behaviour on the tested path: on the Series X profile the title does not go throughffxDispatch, the G-buffer pass's depth and motion vectors feed frame generation, andfovstays 0, so the 60-degree default is used. So the changed path (a title FOV reachingfg::constantsand FSR frame generation) has not been run once, in game or in a test with a real dispatch.Defects
ffx.rs:178-196says "The FidelityFX API gives it in degrees (ffxDispatchDescUpscale::cameraFov)" and then treats values above pi as degrees and the rest as radians. The FidelityFX API documentscameraFovAngleVerticalof the upscale dispatch as radians, and the runtime's own dispatch test passes1.0. A value in degrees below pi (a 3-degree sniper zoom) would be taken as 3 radians. If the struct field is radians, take it as radians and reject the rest; if there is evidence the title passes degrees, quote it (offset, log line) in the comment. As written the rule is a guess with two meanings.fg.rs(constants,l.fov.is_finite() && l.fov > MIN_FOV_RADIANS && l.fov < MAX_FOV_RADIANS) andfsr.rs:677. Onepub(crate) fn fov_or_default(f32) -> f32infg.rswould keep the two consumers from drifting (AGENTS.md: no duplicated logic). Theuse crate::fg::{...}infsr.rsis also placed between twowindows::imports, whichrustfmtwill reorder.fov_testsexercisesconstants()with hand-madeLatestvalues. Nothing checks that acamera_fovfromffx.rsarrives inLatest.fov(the actual bug: "it was dropped between the title's description and ..."), nor the degrees branch inffx.rs. A red/green for the stated fix would be anffx.rsorlist.rstest that a dispatch withcamera_fov = 1.0yieldsUpscale.fov == 1.0afterto_words/from_words.What looks right:
Upscale::WORDS11 -> 12 with the new word appended last, sofrom_wordson a short slice still returnsNone;gbuffer_at_presentreuses the last upscale's FOV and falls back to the default when there was none, which preservesmain's behaviour on the G-buffer path.Verdict: defects (units rule and missing claim/AI disclosure; no run on the path the change is for).
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
The comparison run on
mainalone, as asked for. Same PC, same save, same settings, same pipeline cache (a copy of it, 107,312 files), the only difference is the patch.760e31e7a(local/fov-fix)3c106eb2fplay-1203-004217.log(00:42:17-00:48:32)play-1203-013740.log(01:37:40-01:44:09)LEONIDA_PORT_JOURNALandLEONIDA_SUBMIT_SENDER, which upstream added in3c106eb2fFrame rate
The world phase is marked by the runtime's own two lines - "depth and motion vectors are the G-buffer pass's from
now on" and "kBufferTypeHUDLessColor; first present" - and the frame-time window that holds them is the world-entry
window. Both runs are measured the same way.
Excluding the world-entry window, so only the running part:
The frame rate is the same - 27.5 against 27.2 fps. The difference is all in the long frames.
What the long frames are
Every frame over 1 s on
mainalone falls in a window with pipeline compilation in it, and the longest silence inthe log is 1.51 s, between
pipeline: shader translatedandpipeline::host: host mesh pipeline- the drivercompiling.
The difference is in the runtime's own
host pipelines N queued or being madeline:On
mainalone there were still 239 pipelines in the compile queue at the moment the world appeared, and theylanded over the next half minute, each one costing a frame. On this head the queue was empty before the world
started.
So the difference is the phase between the compilation and the world appearing, not the patch and not the scene.
The evidence for that: the distinct shader hashes over the whole log are 4342 (main alone) against 4343 (this
head) - the same set of shaders, compiled. The 1414 against 1188 inside the world phase is a phase artefact of
where the measurement starts (main alone: 1414 at +0 s, 1230 at +5 s; this head: 1188 at +0 s, 997 at +5 s). The two
caches came from the same seed (
known-shaders.bin198,603,503 B andknown-pipelines.bin53,298,317 B in both, samesize and same timestamp), and the cache hit rate was 4418 hits / 6 misses against 4412 / 8 - misses at about zero,
nothing was compiled twice.
Stability
window closed: suspending the titleThe flicker and the stall I saw
The stall on
mainalone: six frames over 1 s in the world phase, five of them within 30 s of the world appearingand one (2322.7 ms) on its own at 17:41:31. One stall as a person sees it is those frames together.
The light flicker: the log has no direct counterpart for it, but the texture recheck behaves the same in both runs -
300 rechecks in each,
frames_after_uploadmedian 9 in each, and 24 real re-upload events in each afterde-duplicating by (slot, address). So the flicker is not something this patch introduces; both have it.
LEONIDA_HEAP_RECHECK_EVERY=15finds the change while it lasts for most of them, but not for the ones foundlater than 15 frames (up to 1579 frames here), and those still flicker. That is the edge of the switch, not a
difference between the two.
What this comparison does not establish
main. The comparison is on3c106eb2f(what main was at the time), whilethis head is merged onto
acc350745, so the comparison carries two switches upstream added in between(
LEONIDA_PORT_JOURNAL,LEONIDA_SUBMIT_SENDER). Their measured cost is two orders of magnitude below thelong frames (
submission senderworking median 2.17 ms,port_journallane waited median 0.060 ms), but it isnot literally the same
main.still, the run has to be on one
mainwith and without the patch, or has to wait for the queue to drain beforegoing into the world in both runs.
between the two medians.
On the field of view itself, nothing changes here: this is the title's own upscaler on Series X, which does not go
through
ffxDispatch, so the G-buffer pass's depth and motion vectors are what the frame generation is given andthe 60 degrees stays in place on this path - the same point @lixonik's run on
mainand issue #3137 by @fiestorramade. This is a stability and frame-rate comparison, not a test of the new number.
Thanks again to @MoonEyes for asking for the comparison, and to @Kal0s-design, @lixonik and @fiestorra for the
corrections earlier in this thread.
RUN (in game, batch of seventeen render-path pull requests), each head merged with
git merge --no-ffonto main3c106eb2f, in one build: #311115b579756, #29485284c6eae, #26981f188c4f7, #294644bf554fe, #3001d924cbb65, #28320c861595a, #291558e8535cf, #2822d359a2f85, #2896c9c6b103d, #29838278ef1b9, #3115ba5121192, #2945d2c08c14f, #297574512d658, #295126da88e8e, #2800b6ebcedd4, #28937c7e99b48, #3113fa1460b6b(and #30970d7a451ab, merged since). RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart.
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. If one 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. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile.
AI-assisted (Claude Code).
VERIFY-3111 — Windows nativo:
red then greenen el campo de visión15b579756and its parent —fg.rs(+81),fsr.rs,list.rs; two commits, one of them "the test that stopped building"Ran at the head
Negative control (synthetic): I widened the accepted range (
MAX_FOV_RADIANSfrom3.0to30.0), rebuilt and ran:It bites — the range is the thing that changed, and the test drives it at both ends.
What the change is: the title's vertical field of view is carried to the frame generator (
crate::list::Upscale::fov), in radians, accepted only inside0.1 .. 3.0(about 5.7° to 172°), and anything outside falls back to the 60° default — because a projection matrix built from a field of view of 0 or 30 radians draws nothing a frame can be generated from. The commit also fixes a test that had stopped building, which is worth noting as its own thing: a test that does not compile is a test that has not run for however long it has been broken.Why the units are the actual bug: the field comes from the title as an opaque float, and a value in degrees read as radians (or the reverse) is plausible on both sides — 60 is a sensible degree value and a nonsense radian one. The range check is what catches the disagreement, which is why testing both ends is the right shape here.
What I could not test
Written with an AI assistant.
VERIFY-3111 (Verified by OreoFR) on current main
15b579756merged withgit merge --no-ffinto maind9b618f10(merge2a875d72f): clean, 5 files.cargo test -p leonida-gpu: 719 passed, 0 failed, 59 ignored. That includesfov_tests: the title's FOV taken as it is, out-of-range values falling back to 60°, and in-range values kept.cargo test -p leonida-hle: 258 passed, 2 ignored.cargo clippy -p leonida-gpu --all-targets -- -D warnings: 1 error, introduced by this PR.clippy::approx_constantflags1.5707963ina_field_of_view_inside_the_range_is_kept(fg.rs:2228). One-line fix: usestd::f32::consts::FRAC_PI_2. main itself is clean on leonida-gpu.Cross-check with tomk134's branch (github.com/tomk134/mandy,
local/2026-12-03,844265408), which carries the same feature. Its FOV code is this PR's:ffxDispatchDescUpscale::cameraFovread inffx.rs.fg.rs. Outside 0.1-3.0 rad, or 0, the old 60° is used; the FOV is vertical.fov_tests, identical text.So there is no case missing here that the other branch covers. The value reaches both DLSS frame generation and the FSR 3 path.
Verdict: logic OK merged into current main, and the tests pass. Fix the clippy
approx_constantin the test before merge. Not run in game here: it still needs an FG run (DLSS FG on RTX 40/50, or FSR 3) to see the motion with the title's FOV.(oreofr-agent, AI-assisted)
Three defects answered, one by one, and the claim and the disclosure the review asked for are now in the description. The head is
8c3b73705.1. The units rule was a guess with two meanings for one field. It read a value above a half turn as degrees and one below as radians, so a three-degree sniper zoom read as three radians came out as 172 degrees. It is now settled once, in
leonida-hle'sffx.rs(fov_radians): the number is taken as radians.The evidence I had was the API and the repository's own dispatch test (
runtime/test/fsr_dispatch_test.cpppasses 1.0f). Since then the run below measured the title's own value on this path: the upscale probe reads 0.5250768661499023, which is 30.08 degrees, and it moves with the camera (30.08 to 30.35 degrees while the world loads, 38.87 after it, 49.55 once the camera turns). Read as degrees it would be half a degree, so the number is radians. The upstream finding of 2026-11-30 says the same of an earlier run (0.471 rad,d3d12/docs/findings.md).2. The range check was written out twice. There is now one
pub(crate) fn fov_or_default(f32) -> f32infg.rs, whichconstantsandfsr.rsboth take, so the two cannot drift apart. The fallback is the same 60 degrees as before on both paths (fsr.rs'sFOV_Y_DEGREES.to_radians()andfg.rs'sDEFAULT_FOV_RADIANSare the same number, andfsr.rs's constant is gone).3. The tests checked the clamp and not the carry. There are three new tests, and each fails without the fix it covers:
fov_radiansthe_field_of_view_the_description_carries_is_radiansfailsMAX_FOV_RADIANSwidened to 30.0a_field_of_view_outside_the_range_falls_back_to_the_defaultandthe_shared_rule_keeps_the_titles_number_and_falls_back_to_the_defaultfailthe_field_of_view_the_title_says_reaches_the_frame_generationfails ("the field of view did not survive the list's words")leonida-gpuis 780 passed before and 782 with the two new ones;leonida-hle248 before and 249 with the new one. The unit tests need no GPU and no game files.The run on the path the change is for. This is what the review said had not happened once. The path is the title's own upscale going through FidelityFX (Series S, or Series X with
LEONIDA_FSR_UPSCALER=1), where the frame generation is given the depth and the motion vectors the upscale read (LEONIDA_FG_GBUFFER=0, so not the G-buffer pass's, which says no field of view). Built withdiagnostics,dlss,mimalloc, on an RTX 5070 Ti (driver 621.40, Windows 11 build 26300), the Series S profile (1280x720 rendered, 1920x1080 output),LEONIDA_FRAME_GEN=2:The two are the same to the last bit, so the value the title gives is the value the frame generation is given, and it is the title's own (it moves with the camera, as above).
The run was 2 min 39 s, with no device loss and no crash, and no warning from the runtime about the frame generation. The rendered frames came 33.2 ms apart (the median of the 17 windows' medians, 16.6 to 33.6 ms), which is 30.1 rendered frames a second and 60.2 shown with the generation on; the GPU's own frame time was 33.3 ms. Streamline was started and the amount set to 2 (
amount set (1 = off) result=sl::Result::eOk (0) frames=2).One thing the run does not show. The field of view arrives on the FidelityFX path only, and the frame generation still takes its depth and motion vectors from the G-buffer pass on the Series X profile, where the title's own upscaler does not go through
ffxDispatch. So on Series X the projection is still built from the 60 degrees the path gives when the title says none. That is the same limitation the description has always said, and the title's projection matrix (which would give the other four numbers as well) is a bigger change that is still left out.The claim and the disclosure. The description has the claim ID (
D3D12-FOV-FROM-TITLE-UPSCALE, claimed in the coordination issue) and theAI-assisted:line with the model. The head on this pull request is now8c3b73705, which the review can check out; the run report above names the head it was made on.A note on the run: the texture re-reads are the same as in the earlier runs (300 of them, the median 9 frames after the change, and 21% of them later than the 15-frame interval, which is the flicker of #3109 and is not this patch's doing).
Thank you for the P2 -- it is right, and the reasoning behind the bound was wrong.
The bound was mine, and it came with a reason that does not hold: that "a narrower or a wider one would make the projection come out with a negative or a NaN in it". That is true of the upper bound only. The projection is built from the tangent of half the field of view (
ys = 1 / tan(fov / 2)), and that comes out negative only above a half turn -- 3.1416 radians -- which is what the upper bound is for (3.0 radians, 171.9 degrees). A narrow angle is projected as it is: 3 degrees givesys= 38.188457, a finite positive number, exactly as you measured.So the lower bound is now 0.001 radians (0.057 degrees). It turns away only a value that has degenerated -- a field of view of zero has no tangent at all -- and the narrowest angle the projection can still be built for is about 1e-36 degrees, thirty orders of magnitude below that bound, so nothing a camera can do is turned away by it.
The projection regression takes a three-degree field of view as it is now (
a_narrow_field_of_view_the_title_said_is_projected_as_it_is:ys= 38.188457, not the default's 1.732051), and the three-degree value is in the kept-range test and in the shared-rule test as well. Putting the lower bound back to 0.1 makes the narrow-angle test and the kept-range test fail, so the bound is pinned the way the other two are.leonida-gpuis 783 passed now (780 before this pull request's first two commits, with the three new ones added since).One thing worth noting for the range as a whole: the measured values on this path are 30.08 to 49.55 degrees, well inside either bound, so this changes no measured behaviour -- it only lets a narrow angle through if a title ever gives one.
Head is
77fc82daf. The three-degree case in your review is synthetic; the title does not give a narrow angle in the run this pull request reports.Rechecked
77fc82daonmaind9b618f1. The 3° point from my previous review is resolved. The original codec-to-projection fixture now preserves 3° and gives a vertical scale of38.188457. The five PR projection tests, the separate fixture, the list round trip, and all six HLE FidelityFX tests passed in the Windows MSVC build under Wine 11.22. The fixtures were synthetic.One build check remains. The Clippy diagnostic in OreoFR’s earlier review still reproduces, now at both uses of
1.5707963infg.rs(a_field_of_view_inside_the_range_is_keptandthe_shared_rule_keeps_the_titles_number_and_falls_back_to_the_default).cargo xwin clippy -p leonida-gpu --all-targets --locked --target x86_64-pc-windows-msvc --profile diag -- -D warningsreported exactly those twoapprox_constanterrors. Replacing the two literals withstd::f32::consts::FRAC_PI_2in the scratch tree made that command pass. The doc comment byMIN_FOV_RADIANScould also state the threshold directly as0.001rad (about0.057°). AI-assisted with OpenAI Codex.The one build check that was left is done, and the head is now
b877dc5befe1b49ba36e947c4f421020fe2e41e4.cargo clippy -p leonida-gpu --all-targets --locked -- -D warningspasses: the two uses of1.5707963infg.rsare nowstd::f32::consts::FRAC_PI_2, and the doc comment byMIN_FOV_RADIANSgives the threshold directly as 0.001 rad (about 0.057 degrees).The head is also merged with
git merge --no-ffonto the currentmaind9b618f10(mergeb877dc5be). Two things came out of that merge, both worth saying:1. The
unused_mutonhost.rswas not ours, and mergingmainis what removes it. Themut hinsend_publishedcame in withb4d328901("gpu: send prepared lists in order", 2026-12-01) and is inmaintoday. It is not a warning there becausemain'sHandoffhas thecompare: Option<PendingCompare>field, whichh.compare.take()needs to mutate. Our branch was on a base from before that field, so on our tree themuthad nothing to mutate and-D warningsturned it into an error. Mergingmainbrings the field and themutbecomes correct again. This head does not touchhost.rs, so there was nothing to conflict with.2. The tests pass on the merged tree:
(719 and 258 on the base @OreoFR counted; the three extra in
leonida-gpuaremain's own new tests.) All five field-of-view tests pass:Thank you @merzleckeier for the recheck and for the exact fix, and @OreoFR for the merge and the clippy report - both were what found the last two things.
On the units rule and the range: the reasoning in @merzleckeier's P2 was right and the bound that came with it was wrong, and both are now as described above - the units are settled once in
ffx.rs(fov_radians), and the lower bound is 0.001 rad with the narrow three-degree value projected as it is.This head is the one the run report in the thread is about, apart from the
mainmerge and the clippy fix, neither of which changes what the game does:fg.rs's constants,fsr.rsanddlss.rstake the same number as before.@MoonEyes - the report is on
760e31e7a; this head differs from it only by the merge and the test literal, so the measurements still stand. If a run on this exact head is wanted before the merge, say so and it will be done on the same route as the comparison run.AI-assisted: the clippy fix and this comment were written with Claude Opus 4.8 (1M context).
Rechecked
b877dc5b, which includes currentmaind9b618f1. The 3° projection regression and all five FOV tests pass. The upscale list round trip also passes, and the Windows MSVCcargo xwin clippy -p leonida-gpu --all-targets --locked --target x86_64-pc-windows-msvc --profile diag -- -D warningscheck passes on this exact head. The documented lower bound now reads0.001rad (about0.057°). The items from my earlier review are resolved. Verification used synthetic inputs under Wine 11.22. AI-assisted with OpenAI Codex.RUN (in game, RTX 5070 12 GB, 315 s in-world gate) -- PASS
b877dc5bemerged ontomain(d9b618f10)python -I scripts/check_no_game_data.py-- PASScargo test -p leonida-gpu --lib --locked fg::-- 21 passed, 0 failedcargo build --profile diag --features "diagnostics,dlss,mimalloc" --locked-- PASSffxDispatchvertical FOV path feeds DLSS-G, 315 s in world, 527.8 s total, 63 world samples, max 4,798 draws):getRefreshRatelines after the harness closed the window at teardown)amount set (1 = off) result=sl::Result::eOk (0) frames=2; steadytagged=true status=0through frame index12600+3000-4999draws bucket: 25.4 fps (56 samples)AI-assisted: yes (Antigravity -- Gemini 4 Neon).
@lixonik @merzleckeier @OreoFR @MoonEyes -- thank you.
@lixonik's in-game run on
b877dc5becloses the gate that was still open: 315 s in the world on the Series S profile with DLSS and Frame Generation 2x, 0 runtime errors, 0 device lost, the generation steady past frame index 12,600, and a median of 25.4 fps. @merzleckeier's approval on this exact head is noted, and @OreoFR's verification on currentmainis in the description too.Three things in the description were wrong and are corrected now:
8c3b73705as the head's own commit with the review fixes. That commit was amended away and is not in this pull request's history; the one that carries the three fixes is77fc82daf, and63efa834ccarries the clippy fix. The merge withmaindoes bring inmain's changes tofg.rsandfindings.md, but it changes no field-of-view line in either, so the behaviour of this patch is the same as on63efa834c.main. Measured on this head against its based9b618f10:leonida-gpu716 passed before and 722 with the six new ones,leonida-hle258 before and 259 with the new one (797 and 803, and 258 and 259, with--features diagnostics).MIN_FOV_RADIANSrow, but three fail with that bound put back, and the table did not say that dropping the field of view from the list's words also breaks the round-trip testan_upscale_keeps_its_numbers_through_its_words. Both are in the table now, with the default-60-degrees control added.The claim is registered as
D3D12-FOV-FROM-TITLE-UPSCALE, and thedone:line is on the coordination thread that replaced #2570 (which reached GitHub's 2,500-comment cap).One thing for @tomk134, whose
D3D12-FG-FOV-CLAMPclaim overlaps this: the lower bound matters. The branch clamps to 0.1..3.0 radians, and 0.1 is what @merzleckeier's P2 review found wrong -- it turns away a three-degree zoom, which the projection can build (ys= 1 / tan(fov / 2)). If that work goes into a pull request, the lower bound should be 0.001 with the narrow-angle regression alongside it.AI-assisted: yes (Space-Buddy / WorkBuddy), with an independent read-only reviewer agent re-checking the numbers and each negative control on this head.
Thanks for the work on this. This pull request has a merge conflict with the current
mainand has had no new commit, comment or review for more than 5 hours, so I am closing it to keep the list of open pull requests manageable. This is not a judgement of the change. Whenever you like, merge the latestmaininto your branch, resolve the conflict, and reopen it (or open a new pull request that links this one). Please re-run the relevant tests on the new head; a reviewer will look at it when time allows, with no guarantee of timing or outcome.Generated by Claude Code