d3d12: keep RDNA2's 2 GB aperture segment from filling (device lost at the first heavy scene with relay 2) #2670
Closed
amujark wants to merge 9 commits from
upstream-pr/2670 into main
pull from: upstream-pr/2670
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
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.
Reference
ProjectLeonida/mandy!2670
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2670"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by amujark on 2026-11-30T01:27:45Z.
Claimed in the coordination issue as: D3D12-RDNA2-APERTURE-SEGMENT (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7266137587)
What and why
On an RDNA2 card with the default play settings (
LEONIDA_RELAY=2) the host device is removed at the first heavy scene (the opening cinematic):0x887A0007, DRED breadcrumbs empty, "nothing of ours was running on the card", with about 1,250-1,270 host lists alive. It happened in every run, andmainalone does it 72 s in even withLEONIDA_BURY_LAG=16.LEONIDA_RELAY=0survives, at about 8 fps.This is the failure of PastiiJay/klbf-lab#127. The video memory manager's 2 GB aperture segment, which DXGI's budgets leave out, holds the driver's command buffers (1 MB and more per command list).
land()kept the lists of the lastbury_lag()flights, and every host list kept its own prelude for life, so the segment ran full and the scheduler marked the device faulted.The fix is ported by hand from kyokyotosh/VIctory-6700XT (GPL-3.0, as this tree), one commit each, attributed in the messages and the doc comments:
f173347: the host lists of landed flights go back to the pool at once (list::recycle_landed). What their commands named (Held: the wholeDeferred, the texture states, twins and refreshes being found, and theDetached's descriptor state and uploads) waitsbury_lag()throughretire. Both the reaper thread and the path without it use it.018d372:host/segments.rsreads the adapter's segments withD3DKMTQueryStatistics(Wdk_Graphics_Direct3Dfeature). They are logged once at device creation and looked at every 100 ms at most. While an aperture segment holds more thanLEONIDA_SEGMENT_TIGHTpercent of its limit,send_latelands the flights in the air.e3c0703: it is looked at on every send, with hysteresis: tight from 80 % by default, clear below 70 % (0: never). While tight, idle host lists are trimmed to 64, with their bytes taken out of the pool's count. The threshold is a pure function (is_tight) with unit tests.63a773e: preludes come from a pool. One is taken when a list is first submitted with transitions and given back at its reset; 128 are kept idle, 16 while tight. The pool keeps each allocator's creation instant, soLEONIDA_ALLOCATOR_TRIMstill sees its real age.LEONIDA_LAZY_PRELUDE=0still makes one with the list.There is one more change, in the launcher. With the fix and relay 2 on the same card, the lighting rose and fell with where the camera looked and went black, which looks like the automatic exposure reading a late value. The same build in the same place with
LEONIDA_RELAY_COPY=0looked right at 17-20 fps.d3d12/scripts/play-nvidia.ps1setsLEONIDA_RELAY_COPY=1for every card; it now leaves it out on Radeon RX 6000 cards.-More @{LEONIDA_RELAY_COPY='1'}still puts it back (checked with-DryRun). Only the RX 6800 XT is measured.Tested
RX 6800 XT, one run each, Series S profile,
-Log, pipelines already cached:main452d1d1b6, relay 2,LEONIDA_BURY_LAG=16LEONIDA_RELAY_COPY=0(the last commit's default here)cargo test -p leonida-gpu: 556 passed, 1 failed, 47 ignored. The failure,descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, fails the same way onmain452d1d1b6. The newhost::segments::tests::*andlist::tests::a_trim_keeps_the_first_and_takes_the_restpass.cargo check -p leonida-gpuand--features diagnostics: ok.cargo clippy -p leonida-gpu --features diagnostics: no new warnings in the changed lines.cargo build --locked --profile diag -p leonida --features diagnostics,mimalloc: ok.python -I scripts/check_no_game_data.pyon the changed files: pass. The branch is onmain452d1d1b6and merges cleanly withmain0eab02a8b.GPUs tested: AMD Radeon RX 6800 XT, Adrenalin 32.0.21045.29003, Windows 11 (Ryzen 9 5950X, 32 GB)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T01:34:55Z.
I reproduced a launcher edge case with mixed Radeon and NVIDIA adapters. With both an RTX 4070 SUPER and RX 6800 XT in the controller inventory,
-Adapter 'RTX 4070'still emitsLEONIDA_ADAPTER=RTX 4070, butLEONIDA_RELAY_COPYis now unset at launch and after replaying the F1 command. A savedLEONIDA_ADAPTER=RTX 4070produces the same result.main40e7fe69and after merging1462e3e8(6be18311). Main emitsLEONIDA_RELAY_COPY=1in all controls. The PR retains1with the RTX alone, omits the setting with the RX 6800 XT alone, and omits it on the mixed setup with either card selected. An explicit savedLEONIDA_RELAY_COPY=1still wins on the mixed setup.#indexselectors. Basing the default on the resolved DXGI adapter would keep the workaround scoped to the selected card. Launcher rule · DXGI selection845e0208) gives the same relay settings. In all six cases across three runs,-MotionBlursurvives the F1 replay, and the four motion-blur passes stay enabled.This checks launcher settings with synthetic inputs. Aperture pressure and rendering were outside the probe. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-11-30T01:50:52Z.
Independent verification on native Windows 11 Pro (
10.0.26200) + AMD Radeon RX 7900 XTX (gfx1100, driver32.0.32029.2010, Rust1.98):1462e3e8dcleanly ontomain(40e7fe69d) — zero conflicts.cargo test -p leonida-gpu --lib -- --test-threads=4—558 passed; 0 failed; 47 ignored(12.93s), including the newhost::segmentstests.python -I scripts/check_no_game_data.pyon all 6 touched files — PASS.AI-assisted: Antigravity (Gemini 4 Neon)
Imported from ubiquitarianism/leonida. Originally posted by amujark on 2026-11-30T08:12:19Z.
Thanks, you were right: the launcher judged by every controller in the PC, not by the card the game plays on. Fixed in
077d6084c, as you suggested, by moving the decision to the runtime:play-nvidia.ps1, andplay.ps1, which had the same default) now setLEONIDA_RELAY_COPY=autoinstead of1, andplay-nvidia.ps1no longer removes it by the controller list.host.rs: when the host device is made, the adapter it is on (EnumAdapterByLuid(device.GetAdapterLuid()), so the default card,LEONIDA_ADAPTERby name and the F1 menu's#indexall count) is checked: AMD vendor id0x1002andRX, optional spaces,6and three digits in DXGI's description (the launcher's oldRX\s*6\d\d\d). Underauto,relay_copy()is off only on such a card and logs which way it went. If the adapter cannot be read it stays on, which was the default before this branch. Its one caller (make_relay_fetch) runs on aHost, after the device exists.1or0still wins: the F1 file and-Moreare applied over the launcher'sauto, and the runtime only treatsautoby card.d3d12/README.mdlists the variable.What was tested:
cargo test -p leonida-gpu --lib -- rx6000 every_line_fits values_cycle: 3 passed (a new table test of the name rule: RX 6800 XT, RX 6700M, RX6600 yes; RX 7900 XTX, RX 580, Radeon(TM) Graphics, an NVIDIA name, "RX 6800" with NVIDIA's vendor id and WARP no; plus the menu's width and cycling tests).play-nvidia.ps1 -DryRun:LEONIDA_RELAY_COPY=autoplain and with-Adapter 'RTX 4070'(which also printsLEONIDA_ADAPTER=RTX 4070);-More @{LEONIDA_RELAY_COPY='1'}prints1.autoshould give what the previous commit gave (relay copy off), which is what the light was measured with.Left as it is: the frame-generation default a few lines below (
$card -match 'RTX\s*(40|50)\d\d') reads the same joined list, so on a mixed PC it can turn on DLSS frame generation while the game runs on the Radeon. That is onmainalready and outside this PR.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by lerapeurdu62280-debug on 2026-11-30T18:25:45Z.
Game-run A/B on Windows AMD RDNA2 (RX 6600 8 GB), the profile this PR is about.
n=1each, and one difference in the caches I could not avoid (below), so read it as a first data point, not a proof.tested: #2670 on RX 6600 8 GB (Windows, AMD 32.0.21045.29003), better: story load + device lost at ~180 s / play for ~290 s, closed by hand, no device lost.
The caveat: B started with every pipeline A and the warm step had made, and made none in play, while A still made 69 in play. Both device losses on
mainon this card (also the cold run in #2464) came while pipelines were being made in play, so part of the difference may be the cache, not this PR. A cleaner pair would be A and B both from the same emptied pipeline cache; I can run that if it helps.Contribution : EI S.O.S INFO LUDO
Imported from ubiquitarianism/leonida. Originally posted by lerapeurdu62280-debug on 2026-11-30T18:46:08Z.
The cleaner pair, as offered above: A and B from the same emptied caches (Leonida's
pipelinesfolder and AMD'sDxcCachemoved aside before each run), so neither starts with pipelines the other made.tested: #2670 on RX 6600 8 GB, better: device lost ~240 s after the story pack opened / no device lost through ~380 s, closed by hand. Same caches state this time, so the cache caveat of my first comment does not apply here. Still
n=1per side. The frame rate is the same in both (0.2 fps while pipelines are made in play); this PR does not change that, nor should it.Contribution : EI S.O.S INFO LUDO
Imported from ubiquitarianism/leonida. Originally posted by amujark on 2026-11-30T20:54:29Z.
Added
aace3e264: while an aperture segment is tight, the trim this PR adds froze the line of submissions and the title's present for 150-260 ms.What happened.
trim_idle()andtrim_preludes()ran inline on the submitting thread at the first submission aftersegments::tightturned true. They freed up to ~448 idle host lists and ~112 preludes there, and freeing them is the graphics kernel's time. TwoLEONIDA_TIMELINEcaptures showed it:tight=true/tight=falsepair in the log exactly;The change. The same objects are taken out under the same locks, by the same decision. Only their drop moves to a thread of its own,
leonida-trim. It is not the reaper, which can sit in 70-100 ms spans.LEONIDA_TRIM_ASYNC=0gives the old behaviour.LEONIDA_ABcan switch it live.Measured on an RX 6800 XT (driver 32.0.21045.29003), Ryzen 9 5950X, Series S profile, relay 2, FSR 3.1:
Tests.
trim_tests,host::segmentsand the trim test inlist.rs: 9 passed, with and without--features diagnostics. The diag build passes.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T13:43:38Z.
Checked the release-thread behavior with a real D3D12 buffer at
aace3e264+9f27ba2e1. I passed a 64 KiB hardware buffer throughlet_go_apartand held its destruction behind a channel handshake. WithLEONIDA_TRIM_ASYNC=1, the caller returned while the destructor was still held onleonida-trim. With0, the destructor ran on the caller and it returned only after release. Both arms passed on AMD RADV and RTX 4070 SUPER under Wine 11.22. The seven aperture-policy unit tests passed as well. This isolates ownership and scheduling of the release. Native RDNA2 aperture pressure and frame times remain outside this run.AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T14:49:11Z.
Review: COMMENTED
Independent check on Windows (Ryzen 9 7950X3D, RTX 4070 Ti SUPER, rustc 1.98.1) at
aace3e264.cargo test --locked -p leonida-gpu --lib -- --test-threads=4: 559 passed, 0 failed, 47 ignored; the author'sviews_are_made_beside_the_heap_and_copied_infailure passes here, so it is not a regression from this PR. Merged onto current main (tree18cdc655): 641 passed, 0 failed, 59 ignored,merge-treeclean,check_no_game_dataanddiff --checkclean, both launcher scripts parse.take_heldretired (host.rs:5030-5047,list.rs:398-408,:8599-8606), the aperture is polled at most every 100 ms (segments.rs:115-124), 80/70 hysteresis is enforced with strict>and safe at 0 (:95-101,:149-199), and the 64-list/16-prelude trims fire only while tight (list.rs:353-365,host.rs:1726,:1745).it_stays_tight_ten_points_below_the_percentanda_percent_under_ten_does_not_wrap_when_it_was_tight(7 → 5 passed, 2 failed). The guard is covered.One gap worth closing, because it is the actual fix: the lifetime change has no test that would go red if landed lists were held again. A test that counts a landed flight returning its list to the pool (drop/recycle counter) would cover
recycle_landed/take_held, which is the part that stops the aperture filling — the segment polling and hysteresis are well covered by comparison.As the body says, the device-loss and perf claims are RX 6800 XT-only; this machine cannot reproduce them, and the code-level evidence above is what can be checked without that card.
Imported from ubiquitarianism/leonida. Originally posted by lerapeurdu62280-debug on 2026-12-01T20:20:47Z.
Test report on RDNA 2 (RX 6600 8 GB), PR head
aace3e264merged on top ofmainlocally (rebuilt at 18:41 UTC+1 today, with #2764 / #2828 / #2865 / #2904 from main).Setup: AMD Radeon RX 6600 8 GB (driver 32.0.21045.29003), Ryzen 5 3600, 32 GB RAM, Windows 11 build 26300.
scripts/play-d3d12.ps1 -SeriesSwith FSR 3.1,LEONIDA_SUBMIT_FRAMES=0. Retail game data.What I saw (5 sessions today, about 2 h of play in total, longest 51 min):
host::segmentsat device creation0x887A0007Relay stage: stage 2 in every session (
LEONIDA_RELAY=2in the settings line, or unset = default;exact=true). Side note: with relay 2 set, thehostinfo line "what shaders wrote is copied back by a thread of its own … (LEONIDA_RELAY=1)" reads as if relay 1 were set, which confused me at first.Guard off (A/B): same build, same save,
LEONIDA_RELAY=2+LEONIDA_SEGMENT_TIGHT=0, 12 min of play: aperture segment at most 30 MB / 2048 MB, no device removed, 17.3 fps average, 4.3 % of frames over 100 ms.Reading: on this RX 6600 with current
main+ this PR, the 2 GB aperture segment never comes close to filling, with or without the guard, and I could not reproduce the device loss. So on this card the guard is harmless but I can't confirm it is what prevents the loss; the other parts of the PR were not turned off in the A/B. A run of plainmainwithout the PR would be the next step if you want one.AI-assisted (Claude). EI S.O.S INFO LUDO
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T11:50:26Z.
Closing: this pull request no longer applies to current
main(merge conflict ind3d12/crates/leonida-gpu/src/host.rs), and open pull requests that have fallen out of step withmainare being closed so the list stays workable. If you still want this change, rebase it on currentmainand reopen it (or open a new pull request); it will be looked at again.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by lerapeurdu62280-debug on 2026-12-02T12:26:14Z.
@amujark this was closed only for the
host.rsconflict, and the fix is still needed on RDNA 2 (my report above: RX 6600 8 GB, about 2 h of play without the device lost at the first heavy scene).In case it saves you time: I resolved that conflict on 2 December (main's reaper kept, with this PR's
recycle_landedand preludes in reserve) onlerapeurdu62280-debug/mandy:notre/2670, based on2705632c5. It still merges cleanly on today's main (f6dd2242e). Your commits are kept as they are, so you can rebase onto it or take only the resolution, and reopen.Contribution : EI S.O.S INFO LUDO
Pull request closed