d3d12: separate upload VA from BVH arenas so DLSS FG runs with ray tracing (D3D12-RT-FG-ARENA-VA-STORM) #2643
Open
github-bot
wants to merge 10 commits from
github-bot/gh-2643 into main
AGit
pull from: github-bot/gh-2643
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
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
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2643
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2643"
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?
@zmasi on GitHub · 2026-11-29 20:43 UTC · original
zmasi:fix/d3d12-rt-fg-arena-va-storm→main· +783 −90 · 7 files · 10 commits · openClaimed in #2570:
D3D12-RT-FG-ARENA-VA-STORM(#2570)Summary
Fixes
D3D12-RT-FG-ARENA-VA-STORMacrossd3d12/crates/leonida-gpu/src/{upload.rs, memory.rs, fg.rs, lib.rs},d3d12/crates/leonida-hle/src/lib.rs, andd3d12/apps/leonida/src/main.rs(head9f39297d6a):[4 GiB, (MEMORY_PAGES - 1) * 64 KiB)) from host-only arena VA ([2^37, 2^40)) and reserve low upload space at startup:upload::reserveplaced both shader-addressed command-list upload blocks (Upload::new, whose CPU pointers are passed to shaders as 40-bit GPU addresses and indexed in the2^21-pageMEMORY_PAGESdirectory) andMemory's own CPU-side directory and 64 MiB BVH page arenas (memory.rs, which no shader ever addresses by CPU pointer) inside[4 GiB, 2^37)with nothing reserved ahead at process startup.fg::present_start), low-VA reservations alongsidexmemtitle mappings exhausted contiguous 64 MiB holes in[4 GiB, 2^37)(kept alive across toggles byDLSSGFlags::eRetainResourcesWhenOff).upload::reserve_space(wired vialeonida_hle::reserve_upload_space()right after logging init inapps/leonida/src/main.rs) now pre-reserves top-down write-watched address space (POOL_PIECES, uncommitted until sliced, bounded strictly below the emptyMEMORY_PAGES - 1clamp sentinel at0x1f_ffff_0000) forUpload::new(with 1-second failed-window scan backoff, non-destructivecommit_pool_slice, and overflow-checkedUpload::from_heapfallback), whileupload::reserve_out_of_reachplacesMemory's directory and 64 MiB arenas in[2^37, 2^40)first (with overflow-safeLEONIDA_LOW_EARLY_MBearly 64 MiB write-watched reservations andcommit_early_pieceretry). Adapted with credit from GPL-3.0 upstream commits inKemerd/VIctory-NVIDIA-RT(cbe02a6f9c,3e7e69cccf,1527faeac4) andtrustno1-coder/VIctory-NVIDIA(30b979ee48,e69e39c55b,0dd6ed89f7).VirtualAlloc2arena storm and 64 MiB VA leak inMemory::anotherandMemory::new:memory::readyandMemory::mapcalledMemory::another()->VirtualAlloc2under the globalMEMORYmutex on every BVH builder and ray-tracing dispatch (thousands of kernel VAD scans per frame, collapsing recording to~0.1 FPSwhile unmapped BVH pages stayed0indirectoryand blew ray-resolve passes out to white), andMemory::another/Memory::newleaked reservations whenshadow::by_addressorMemory::numberreturnedNone.Memory::another(another_from+ sharednumber_intoover disjoint struct field borrows) now memoizesfailed_arena_frameso a frame tries at most once and retries on the next frame, and bothMemory::anotherandMemory::newrelease reservations viaupload::releasewhenever host-copy creation or numbering fails.fg::wanted:wanted_forsoLEONIDA_FRAME_GENstarts withLEONIDA_BVH_BUILDER=1by default while preservingLEONIDA_FG_WITH_RT=0as an explicit opt-out.Verification
origin/main):[4 GiB, 2^37)reproduced both the multi-second Windows 11 kernelVirtualAlloc2scan stall across repeatedMEM_ADDRESS_REQUIREMENTSqueries andNonefailures for 64 MiBMemoryarenas;Memory::anotherhad no per-frame backoff and leakedatwhenshadow::by_address/numberreturnedNone;fg::wanted()returned0wheneverLEONIDA_BVH_BUILDER=1withoutLEONIDA_FG_WITH_RT=1.cargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib upload::tests -- --test-threads=4->7/7passed ([2^37, 2^40)write-watch tracking +VirtualQueryMEM_FREErelease,[4 GiB, (MEMORY_PAGES - 1) * 64 KiB)POOL&MEM_TOP_DOWNsentinel-bound +Memory::mappable_pageproof, commit-failure retry, window backoff, overflow/heap fallback).cargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib memory::tests -- --test-threads=4(default and--features diagnostics) ->4/4passed (2,048-dispatch per-frame storm backoff =1call,MEM_FREEverification on failed host copy, live D3D12shadow::by_addressUAV buffer above2^37).cargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib fg:: -- --test-threads=4->3/3passed (wanted_tests,limit_tests,reflex_frame_tests).cargo test --manifest-path d3d12/Cargo.toml -p leonida-hle --lib tests::(210/210) &cargo test --manifest-path d3d12/Cargo.toml -p leonida --bin leonida(36/36) -> passed.cargo clippy --manifest-path d3d12/Cargo.toml -p leonida-gpu -p leonida-hle -p leonida --tests&--features diagnostics->0warnings in modified files.python -I scripts/check_no_game_data.py->0issues, pure LF.GPUs tested: NVIDIA GeForce RTX 3090 (Windows 11, driver 610.88)
AI-assisted: yes
Checklist
mainand merges cleanly.CONTRIBUTING.md), including in logs or reports quoted here.docs/design.md, with how it was confirmed. (n/a: D3D12 runtime memory/FG management only)@ammonium231 on GitHub · 2026-11-30 05:59 UTC · original
RTX 3090 / 621.40, validation on,
9f39297d6merged onto main1d22590b9: upload::tests 7, memory::tests 4, fg:: 10 pass (main 2/2/9), no validation errors. Unit tests only; the in-title DLSS FG + RT path isn't exercised.@enlight3d on GitHub · 2026-11-30 10:46 UTC · original
RUN (independent run, #2643 head
9f39297d6on maine1fe82f63; merged locally withgit merge --no-ff, no conflicts; also no conflict with #2566 head70ea7d6ecpergit merge-tree --write-tree). Main has since moved to012b79a67, which changes onlyd3d12/docs/findings.mdandd3d12/scripts/play-nvidia.ps1, so the crates tested are the same. It still merges cleanly there.Commands, in
d3d12/, target x86_64-pc-windows-msvc, toolchain 1.98.1, all with--locked:cargo test -p leonida-gpu --no-fail-fast: green, 567 passed / 0 failed / 50 ignored. Main gives 559 / 0 / 50, so the 8 new tests all pass and the ignored ones are the same.cargo test -p leonida-hle: 220 / 0 / 2.cargo test -p leonida(the app): 43 / 0 / 0. Both are the same as on main.cargo clippy -p leonida-gpu -p leonida-hle -p leonida --all-targets(without-D warnings, which already fails on main in leonida-shader and leonida-lua), on main and on the merge: no new warning in the six files the PR touches (9 already there on main, the same 9 on the merge).another_from,wanted_for,reserve_out_of_reach,release,commit_pool_sliceand others not found). That alone proves little, so I also ran the behavioural reds below.cargo test -p leonida-gpu --lib -- memory::tests upload::tests fg::wanted_tests. These 12 tests all pass in the full run above, without a mutant:another_from:failed_arena_backs_off_for_the_frame_and_releases_unnumbered_reservationsfails, with 2,048 reservation attempts instead of 1.release(at)removed after a failed copy: the same test fails later on. The reservation is still committed (state 0x1000, notMEM_FREE).wanted_forput back to main's rule (off with ray tracing unlessLEONIDA_FG_WITH_RT=1):frame_generation_starts_with_ray_tracing_unless_explicitly_disabledfails (0 for 1).reserve_out_of_reachwithout its [2^37, 2^40) step:out_of_reach_places_write_watched_memory_above_37_bits_and_releases_cleanlyandby_address_shadow_works_on_out_of_reach_reservationfail, both getting an address in [4 GiB, 2^37).window_allows_atdisabled:window_backoff_suppresses_repeated_scans_until_expiryfails.A default change to note: in
fg.rs, frame generation now starts withLEONIDA_BVH_BUILDER=1unlessLEONIDA_FG_WITH_RT=0. Main left it off there because the two together ran at 0.1 frames a second.scripts/play-nvidia.ps1is not changed, and on current main it still removesLEONIDA_FRAME_GEN(and FSR 3 frame generation) when ray tracing is on, unlessLEONIDA_FG_WITH_RT=1. So through the launcher, frame generation with ray tracing stays off, and the new default only applies to starts without the launcher.Perf: this needs an in-game A/B with ray tracing on.
d3d12/README.mdsays DLSS frame generation runs on RTX 40 and 50 cards only, so its frame-generation half cannot be run on an RTX 3090 (the PR lists a 3090 as the tested GPU). The arena and stall half can be (ray tracing on, frame generation off).No runtime/ C++ or Python in this PR, so no link or import check applies.
Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.
@KelboLive on GitHub · 2026-11-30 16:36 UTC · original
Independent check on Windows (not the author), at
9f39297d6.cargo test --locked -p leonida-gpu --lib(shared warm target): 540 passed, 0 failed, 46 ignored in 13.7 s.The diff is source-only (
main.rs,fg.rs,lib.rs), so this is compile + regression coverage. The DLSS-FG-with-ray-tracing behaviour itself needs a game run, which I did not do.Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, NVIDIA RTX 4070 Ti SUPER (driver 621.01), Rust 1.98.1 pinned.
AI-assisted: yes (opencode).
@lixonik on GitHub · 2026-12-01 03:25 UTC · original
Independent game-run A/B test on Windows 10 + NVIDIA RTX 5070 12 GB (driver 621.40) with DLSS Frame Generation 2x + Ray Tracing enabled (
MEASURED, n=1 control / n=2 PR runs;d3d12/target/diagbuilt withdiagnostics,dlss,mimalloc, DLSS v310.9.16, Streamline v2.14.16).Verdict:
better(reproduces themain0.2 fps / 13-arena collapse and fixes it cleanly in both PR runs:5,391.0 ms->101.8 / 104.0 ms,0.2 -> 8.7 / 8.9 fpsin the3000-4999draw bucket, 20 arenas / ~1,157-1,187 MB allocated, 0 runtime errors, 0 device losses).One small launcher note (
READ IN CODE,d3d12/scripts/play-nvidia.ps1:519):play-nvidia.ps1still stripsLEONIDA_FRAME_GENwhen-RayTracingis passed unless-More @{LEONIDA_FG_WITH_RT='1'}is supplied, so both arms below passedLEONIDA_FG_WITH_RT=1explicitly (updatingplay-nvidia.ps1can be done here or in a follow-up). Also note: in unattended runs Streamline reportedtagged=true status=0withpresented=1 per=1on the periodic state snapshot alongside Reflex latency reports; interactive foreground focus was not manually tested for interpolation cadence, while the low-VA exhaustion and 5.4 s/frame collapse are completely resolved.Summary via
tools/d3d12_run_fps.py --compare(A vs B1):3000-4999draws: A0.2 fps (6)vs B18.7 fps (10)(+5700%), B28.9 fps (8)5000-6999draws: A0.2 fps (2)vs B110.4 fps (2)AI-assisted: Antigravity.
@merzleckeier on GitHub · 2026-12-01 13:07 UTC · original
Required an actual GPU backing for the out-of-window reservation with
2cea6871c+ed867d7b2. I changed the optionalby_address_shadow_works_on_out_of_reach_reservationassertion locally to require a hardware D3D12 device and a successful backing allocation. The 128 KiB fixture created the backing and passed span and GPU-offset checks on AMD RADV 26.3.1 and RTX 4070 SUPER (620.73.4), under Wine 11.22 and vkd3d-proton 3.1.0. The upload, memory and frame-generation helper filters passed 7, 4 and 10 tests respectively on each device. These tests cover the reservation and backing path. DLSS Frame Generation with ray tracing in-game was outside this run.AI-assisted with OpenAI Codex.
@OreoFR on GitHub · 2026-12-01 23:48 UTC · original
RUN (provisional, n=1 per arm) of head
2cea6871cmerged onto main913b88b90(tree 940650739), against main913b88b90as control. RTX 4070 Laptop 8 GB, NVIDIA 621.40, Windows 11, launcher-SeriesS -RayTracingwith DLSS and frame generation left at their defaults, BAR 0, texture budget 1024, 330 s walking run each, the pull request first and main second.AI-assisted: Claude Code (oreofr-agent).
@MoonEyes on GitHub · 2026-12-02 12:23 UTC · original
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).
@Kal0s-design on GitHub · 2026-12-02 13:54 UTC · original
Ran natively on Windows 11, head
2cea6871cmerged into currentmain(128648cfe, no conflicts),leonida-gpuwith--features diagnostics,--locked, toolchain 1.98.1. I ran the tests on the hardware card and again on WARP, with the same results.Earlier runs covered the PR's own tests, mutants and in-game runs. This run checks whether the split between the upload pool, the early pieces and the out-of-reach arenas can give out the same address twice or send a lookup to the wrong buffer.
Suite
cargo test -p leonida-gpu --lib(merge)memory::tests upload::tests fg::cargo clippy -p leonida-gpu --all-targetsmemory.rs,upload.rs,fg.rsorlib.rsAllocator probes (throwaway tests in
upload.rs, not committed)Upload::neweach (100 B to 9 MiB, sizes chosen so some need a new arena), plus 32reserve_out_of_reachof 4 or 64 MiBLOW_END), every out-of-reach block in [2^37, 2^40)LEONIDA_BVH_BUILDER=1: 8 threads × 10reserve_out_of_reach(64 MiB)commit_pool_sliceon a 3-piece fake pool, 5,000 random sizes from 1 B to 64 MiB + 1POOLmarked full, thenreserve(4 MiB)0x1_0000_0000, belowLOW_ENDand clear of all 32 pool pieces (0x1f7fff0000up toLOW_END)Upload::new(4 MiB)back to back...bff0000,...c3f0000), andshadow::extentat each start and each last byte resolves to its own bufferI found no overlap and no address given twice, and
shadow::extentresolves both ends of two adjacent arenas to their own buffers.Two behaviour changes, read in code, not tested in game:
Upload::newnow returns process-heap memory (above 2^40) wheremainreturnedNone. Soallocate_upload(list 0x4a0, the title's BVH instance descriptions) now gets a pointer that shaders read as zeros, wheremaingave a null pointer. The PR logs this once.reserve_upload_space()runs at startup whateverLEONIDA_UPLOAD_LOWsays. SoLEONIDA_UPLOAD_LOW=0("from the process heap, as before") still reserves the 32 × 64 MiB of address space, though it commits none of it.Not checked: DLSS frame generation together with ray tracing in game. How much room the low window has after Streamline/NGX/CUDA have loaded.
shadow::lookup, or an ask spanning two adjacent arenas.leonida-hleand the app on this merge. The same probes onmain(no comparison made).GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
@enlight3d on GitHub · 2026-12-02 17:07 UTC · original
RUN (in game, gate-style, as asked by MoonEyes): head
2cea6871ctested in a batch with #2643 (2cea6871c), #3031 (a47b86855), #2789 (4bd128a8c) and #2661 (1b3f3dee0), all merged withgit merge --no-ffontomain23a51c494(no conflict; the only file the four share isd3d12/docs/switches.md). Built withdiagnostics,mimalloc, targetx86_64-pc-windows-msvc. RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300).Launcher defaults, Series S settings,
-NoDlss -NoFrameGen, standing at the save; a warm-up run first (the batch changes the translator, so everything was re-translated), then one run of 420 s with the memory safety stop:Verdict: PASS for the batch (a pass covers each of the four; a failure would not have said which). Not covered here:
-RayTracing(a run with it is queued), DLSS frame generation with ray tracing (needs an RTX 40/50 card), other GPUs.AI-assisted: Claude Code (Claude Opus 5.5)
@MoonEyes on GitHub · 2026-12-02 18:13 UTC · original
Checked #2643: Rust reviewed at the level of its structure, not built here (Windows-only). Merged onto current
mainthe switches registry check fails: the newLEONIDA_LOW_EARLY_MBis not ind3d12/docs/switches.md.2cea6871cbmain45dc41f95cgit merge-tree); merge basead25611b53, 884 commits behindRan (Linux, Python 3.13.18, on an export of the merge tree in its own git repository)
Same commands on
main45dc41f95calone: exit 0, 20/20 OK. The name comes from this branch:d3d12/crates/leonida-gpu/src/upload.rsreadsstd::env::var("LEONIDA_LOW_EARLY_MB"). The head's CI of 30 November was green; on today's merge the check fails, so merging as is would turnmainred. Fix: mergemain, runpython -I tools/d3d12_switches.py --out d3d12/docs/switches.md, commit.Review notes (not built)
[4 GiB, (MEMORY_PAGES - 1) * 64 KiB)) from host-only arena VA ([2^37, 2^40)), and stoppingMemory::anotherfrom callingVirtualAlloc2on every dispatch after a failed reservation, addresses the cause described (VA exhaustion and a per-dispatch reservation storm under the globalMEMORYmutex), not a symptom.d3d12/is GPL-3.0-or-later (d3d12/Cargo.toml:11), so the licences are compatible. A maintainer may still want the credited commit IDs in the commit message, not only in the description.main. The Windows checks (ghost, KelboLive, lixonik A/B, merzleckeier, OreoFR, Kal0s-design) are on this head or the earlier9f39297d6and agree.Verdict: defects. One regenerated
switches.mdon a current merge; otherwise covered by the Windows and in-game evidence already posted.AI-assisted: Claude Opus 5.5 (Claude Code), verification only.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
@zmasi on GitHub · 2026-12-02 18:23 UTC · original
Thanks @MoonEyes — merged
origin/main(45dc41f95c), regeneratedd3d12/docs/switches.md(LEONIDA_LOW_EARLY_MB,LEONIDA_BVH_BUILDER,LEONIDA_FG_WITH_RT), and recorded the credited GPL-3.0 upstream commit IDs in commitad354791d5as well. The PR's Rust diff from2cea6871cb(covered by @enlight3d's RTX 3090 in-game batch gate and @Kal0s-design's hardware + WARP runs) is completely unchanged.Verified on
ad354791d5:python -I tools/d3d12_switches.py --check d3d12/docs/switches.md-> exit 0python -I tests/test_d3d12_switches.py->20/20OKcargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib upload::tests(7/7),memory::tests(4/4),fg::(17/17), pluscargo checkwith and without--features diagnostics-> green.@zmasi on GitHub · 2026-12-02 23:08 UTC · original
Merged current
origin/main(16243cd6eb, integrating #3154'stitle_range.rsina17a658ea9):leonida_hle::reserve_upload_space()now runs immediately afterleonida_gpu::title_range::keep()(skippingPOOLwhentitle_rangeholds[4 GiB, 2^37 - 64 KiB), while still reservingLEONIDA_LOW_EARLY_MBin[2^37, 2^40)forMemory), andupload::releasere-holds freed low-window spans intitle_rangewhile leaving[2^37, 2^40)out-of-reach reservationsMEM_FREE(11/11upload::,10/10title_range::,4/4memory::,17/17fg::,27/27xmem::, and20/20test_d3d12_switches.pypassing).@OreoFR on GitHub · 2026-12-03 00:54 UTC · original
In-game run (head
a17a658ea9merged --no-ff onto main81efe45669): PASS (stability), with one frame-generation observation.Setup:
Run A, this PR's case:
-SeriesS -HardwareRT -FrameGen 2 -PrecompileUsed,LEONIDA_FG_WITH_RT=1, BAR 0, texture budget 1024.81efe4566alone, same settingsLEONIDA_FG_WITH_RTset.Run B, standard gate:
-SeriesS -NoDlss -NoFrameGen -PrecompileUsed, BAR 0, texture budget 1024.AI-assisted (oreofr-agent)
@zmasi on GitHub · 2026-12-03 03:28 UTC · original
Merged
origin/main(516c9eaabf, including#3230and#3244) into26e7b6057estrictly to regenerated3d12/docs/switches.md(needs rebase); all six Rust files (main.rs,fg.rs,lib.rs,memory.rs,upload.rs, andleonida-hle/src/lib.rs) have byte-identical diffs againstorigin/maincompared toa17a658ea9.@OreoFR Thank you for the RTX 4070 Laptop 8 GB run report! On the
A1observation (per=1in 20 of 21 state lines despiteStreamline started with frames=2, while 1 of 21 lines inA1and 11 of 11 inA2hadper=2):wanted_for(fg.rs:67-89, cached inOnceLock), which returned the same1(2x) asmainunderLEONIDA_FG_WITH_RT=1;present_start,present_end,tag, andSTALE_RESETS(12 resetsin bothA1andA2) are untouched.A1did reachper=2, Streamline initialized and generated at least one interval before dropping back toper=1(fg.rs:1509). The most common cause ofstatus=0, tagged=true, presented=1after an active interval is the game window losing Win32 foreground focus (fg.rs:1503-1504: DLSS-G suspends generation whenever the window is unfocused); checkingstatusandtaggedonA1'sframe generation: statelines (fg.rs:1512-1520) will show whether it was unfocused pass-through (status=0, tagged=true, presented=1) vs a non-zero Streamlinestatusortagged=false.#3230now onmain,play-nvidia.ps1setsLEONIDA_FG_WITH_RT=1automatically on Series S (and Series X>= 20 GB), whilewanted_forinfg.rsaligns direct runtime launches (play-d3d12.ps1/ Linux) and still honorsLEONIDA_FG_WITH_RT=0.AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
@fiestorra on GitHub · 2026-12-03 05:47 UTC · original
VERIFY-2642 y
#2643— las dos grandes, las dos sin tests nuevos, y una de ellas mejora al fusionarLas dos de zmasi, las dos de 5-6 días, y las dos con
switches.mden el diff (la marca de esta noche para «cambia lo que el jugador puede encender»):La única falla en las dos es la de la iGPU.
#2643— y este número sí dice algo724es más que los715demain, con cero tests nuevos — o sea que su base trae nueve tests quemainya no tiene o tiene distintos, y aun así la suite pasa. Lo digo porque es lo contrario de un problema: un árbol que añade pruebas respecto amainy pasa entero es un árbol que se fusionó con cuidado.El cambio: separar la VA de subida de las arenas del BVH para que DLSS FG funcione con ray tracing — 570 líneas en
upload.rs, 229 enmemory.rs. Es un cambio de reparto de memoria, y el título nombra el síntoma exacto («DLSS FG runs with ray tra…»): el jugador enciende las dos cosas y una se rompe.#2642— compilar shaders SM 5.1 con DXC en WineY esta es la más ambiciosa de las dos: 13 ficheros, y
inplace.rs/replay/play/merge.rsen el diff — no es sólo el compilador, es el camino de la grabación.Lo que verifiqué en las dos: la suite completa del crate, con la única falla conocida, y que ninguna trae test nuevo.
Lo que no: que DLSS FG y el ray tracing convivan (
#2643) ni que un shader SM 5.1 compile en Wine (#2642) — son los dos estados que el título promete y ninguno está en la suite.Y una observación sobre la cola, con las dos delante: son las dos PRs más grandes que quedan sin revisar (1 003 y 771 líneas) y las dos vienen del mismo autor con la misma etiqueta de
switches.md. Si alguien va a fusionar dos de las antiguas esta semana, estas dos cambian el comportamiento del juego más que las otras cinco juntas — y por eso son las que más necesitan una fila engpu-test-results/, que es lo único que puede decir si funcionan.@lixonik on GitHub · 2026-12-03 08:57 UTC · original
RUN (in game, RTX 5070 12 GB, Hardware RT + Streamline FG 2x init, 315 s in-world gate) -- PASS (stability), plus one parallel unit-test race finding
26e7b6057merged cleanly (git merge --no-ff) ontomain(d9b618f10)python -I scripts/check_no_game_data.py-- PASSpython -I tools/d3d12_switches.py --check d3d12/docs/switches.md-- PASScargo test -p leonida-gpu --lib --locked upload:: -- --test-threads=1-- 11/11 PASScargo test -p leonida-gpu --lib --locked memory::-- PASScargo test -p leonida-gpu --lib --locked fg::-- 17/17 PASS (includingframe_generation_starts_with_ray_tracing_unless_explicitly_disabled)cargo test -p leonida-hle --lib --locked-- 258 passed, 0 failed, 2 ignoredcargo build --profile diag --features "diagnostics,dlss,mimalloc" --locked-- PASScargo test):cargo test -p leonida-gpu --lib --locked upload::without--test-threads=1failed 2 of 4 times atcrates/leonida-gpu/src/upload.rs:610(release_reholds_title_range_spans_and_leaves_out_of_reach_free:assert_eq!(mbi.State, MEM_FREE)got4096(MEM_COMMIT) instead of65536(MEM_FREE)).out_of_reach_places_write_watched_memory_above_37_bits_and_releases_cleanlyruns in parallel in the same[OUT_START, OUT_END)window and can immediately claim the just-freed lowest VA betweenrelease_in(&range, out)andVirtualQuery(out, ...). Serializing theOUT_START..OUT_ENDVirtualQuerytests (or holding a test mutex across reserve/release/query) should eliminate the flake.LEONIDA_HW_RT=1,LEONIDA_AMBIENT=0,LEONIDA_RT_RESOLVE=1,LEONIDA_ACTIVATE_RAYS=1) +-FrameGen 2, 315 s in world, 498.3 s total, 63 world samples, max 5,137 draws):eWarnOutOfVRAM: 0 (only StreamlinegetRefreshRatelines after the harness closed the window at teardown)title_rangeheld126,975 MiBacross124pieces before Streamline/NGX loaded (sl.dlss_gPRODUCTION)569 MB/1,074 MBbudget,0evicted)3000-4999draws bucket: 23.8 fps (57 samples)per=1): Streamline initialized cleanly (Streamline started frames=2,amount set (1 = off) result=sl::Result::eOk (0) frames=2,status=0across all 29 state lines,tagged=truein world), butpresented=1 per=1on all state lines on this Windows 10 automated test setup (the sameper=1behavior occurred on an unrelated FG-only run on this host, so this appears host/window-state related rather than PR-specific). Also not tested in-game here: software BVH (LEONIDA_BVH_BUILDER=1) withLEONIDA_FG_WITH_RTunset.AI-assisted: yes (Antigravity -- Gemini 4 Neon).
@zmasi on GitHub · 2026-12-03 11:25 UTC · original
Merged
origin/main(6e97990505,#3318) into2e0b23a002to regenerated3d12/docs/switches.md(needs rebase), and serialized the four[OUT_START, OUT_END)VirtualQuerytests acrossupload::testsandmemory::testsunder#[cfg(test)]out_of_reach_test_lock()— thank you @lixonik for both the 315 s RTX 5070 Hardware RT + Streamline FG 2x gate report and catching that parallel test race! Zero non-test Rust bytes changed compared to26e7b6057e(15/15consecutive parallelupload::+memory::runs pass).AI-assisted: Gemini 4 Neon (XHigh) and Gemini 4 Carbon (High).
@MoonEyes on GitHub · 2026-12-03 14:31 UTC · original
RUN (in game, third party, batch of five pull requests), each head merged with
git merge --no-ffonto mainb053a1813, in one build: #2686c5269801b, #26432e0b23a00, #27894cd9d71f8, #30720f1e26355, #299991537d2af. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.6 fps on other runs today: a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #2834 was left out of the batch (it conflicts with the others).
Limits: one run; arrival in the world was driven by keys and not checked on pictures. The precompile took 589 s (the batch changes shader code, so the pipeline cache was cold). Switches that are off by default were not turned on: this run covers their default path only.
AI-assisted (Claude Code, Claude Opus 5.5).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.