Skip to content

d3d12: keep RDNA2's 2 GB aperture segment from filling (device lost at the first heavy scene with relay 2) - #2670

Open
amujark wants to merge 9 commits into
ProjectLeonida:mainfrom
amujark:fix/rdna2-aperture-segment
Open

amujark wants to merge 9 commits into
ProjectLeonida:mainfrom
amujark:fix/rdna2-aperture-segment

Conversation

@amujark

@amujark amujark commented Nov 30, 2026

Copy link
Copy Markdown

Claimed in the coordination issue as: D3D12-RDNA2-APERTURE-SEGMENT (#2570 (comment))

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, and main alone does it 72 s in even with LEONIDA_BURY_LAG=16. LEONIDA_RELAY=0 survives, 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 last bury_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:

  1. f173347: the host lists of landed flights go back to the pool at once (list::recycle_landed). What their commands named (Held: the whole Deferred, the texture states, twins and refreshes being found, and the Detached's descriptor state and uploads) waits bury_lag() through retire. Both the reaper thread and the path without it use it.
  2. 018d372: host/segments.rs reads the adapter's segments with D3DKMTQueryStatistics (Wdk_Graphics_Direct3D feature). They are logged once at device creation and looked at every 100 ms at most. While an aperture segment holds more than LEONIDA_SEGMENT_TIGHT percent of its limit, send_late lands the flights in the air.
  3. 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.
  4. 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, so LEONIDA_ALLOCATOR_TRIM still sees its real age. LEONIDA_LAZY_PRELUDE=0 still 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=0 looked right at 17-20 fps. d3d12/scripts/play-nvidia.ps1 sets LEONIDA_RELAY_COPY=1 for 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:

device lighting fps
main 452d1d1b6, relay 2, LEONIDA_BURY_LAG=16 removed 72 s in (1,253 host lists alive) (not reached) -
this PR, relay 0 no removal right 8
this PR, relay 2, launcher defaults before the last commit no removal in 11 min rises and falls, goes black 18-20
this PR, relay 2, LEONIDA_RELAY_COPY=0 (the last commit's default here) no removal right 17-20 in the world, 10-15 in cinematics
  • With the fix, host lists alive settle at 1,353-1,378 and stay there. They are not fewer than at the removal, but the segment no longer fills: preludes made fell to 126-154 for the whole run, and the back-off never fired (segment 1, the 2,048 MB aperture).
  • 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 on main 452d1d1b6. The new host::segments::tests::* and list::tests::a_trim_keeps_the_first_and_takes_the_rest pass.
  • cargo check -p leonida-gpu and --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.py on the changed files: pass. The branch is on main 452d1d1b6 and merges cleanly with main 0eab02a8b.

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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

…commands named waits

On an RX 6800 XT with LEONIDA_RELAY=2 the host device is lost (0x887A0007, nothing in the
air) in the first heavy scene, at some 1,270 host lists alive. land() kept the lists of the
last bury_lag() (64) flights, and each list's allocator keeps its command buffers (1 MB and
64 KB per list) in the driver's 2 GB aperture segment, which fills up and the kernel marks
the device failed.

The lists go back to the pool as soon as their flight has landed (list::recycle_landed).
What their commands named (the Detached state and uploads, and HostList::take_held: deferred
work, host textures, twins, refreshes still being found) goes through host::retire and waits
the bury lag, as any other object let go. The reaper thread uses recycle_landed too;
the send_late fallback and the synchronous path stay on recycle.

After kyokyotosh/VIctory-6700XT f173347 (GPL-3.0), via PastiiJay/klbf-lab ProjectLeonida#127.

AI-assisted. Not yet built or run on a GPU.
…t is nearly full

The driver keeps its command buffers in a system-memory (aperture) segment that DXGI's
budgets leave out (2 GB on RDNA2 cards in klbf-lab ProjectLeonida#127 and the 6700 XT's FINDINGS). When
host lists are made faster than flights give them back, it runs full and the device is lost.

host/segments.rs reads the segments with D3DKMTQueryStatistics, logs them once when the
device is created, and tight() says whether an aperture segment is above
LEONIDA_SEGMENT_TIGHT percent (85 by default, 0: never), looked at every 100 ms at most.
send_late settles the flights then when no idle host list is left.

After kyokyotosh/VIctory-6700XT 018d372 (GPL-3.0), via PastiiJay/klbf-lab ProjectLeonida#127.

AI-assisted. Not yet built or run on a GPU.
…ost lists go

Looking at the segment only when no host list was idle came too late: lists kept idle were
already holding their command memory in the 2 GB aperture segment. Now tight is looked at on
every send, and while it holds, list::trim_idle leaves 64 idle host lists and lets the rest
go with their allocators. The threshold is 80 percent by default and has hysteresis: it
stops being tight 10 points below (70 percent), because near the limit the video memory
manager pages and the card waited a second a frame.

The threshold decision is a pure function (is_tight) with unit tests, as is the trim's split.
The trim is not counted in ALLOCATOR_TRIMS, which reports LEONIDA_ALLOCATOR_TRIM's own lets-go.

After kyokyotosh/VIctory-6700XT e3c0703 (GPL-3.0), via PastiiJay/klbf-lab ProjectLeonida#127.

AI-assisted. Not yet built or run on a GPU.
…as long as the list

Every host list that ever needed texture transitions kept a prelude (a second allocator and
command list) for its whole life, even while idle. On an RX 6700 XT that was 952 preludes for
1,476 host lists, near 1 GB of the 2 GB aperture segment whose filling loses the device
(VIctory-6700XT FINDINGS-6700XT.md); klbf-lab ProjectLeonida#127 reports the same on an RX 6800 XT.

HostList::prelude is now a Mutex<Option<ListPrelude>>: the list takes one from PRELUDES the
first time it is submitted with transitions (take_prelude) and HostList::reset, which only runs
once the submissions have finished, gives it back (give_prelude). At most 128 stay idle, and
trim_preludes cuts them to 16 while the aperture segment is tight, next to trim_idle.
The pool keeps each allocator's creation instant, so LEONIDA_ALLOCATOR_TRIM's refresh of
preludes (allocator_refresh with which = 1) sees the real age. LEONIDA_LAZY_PRELUDE=0 still makes
one with the list. The preludes-made counter now counts real creations, not first uses.

After kyokyotosh/VIctory-6700XT 63a773e (GPL-3.0), via PastiiJay/klbf-lab ProjectLeonida#127.

AI-assisted. Not yet built or run on a GPU.
…the d3d12 README

The device loss on RDNA2 cards in the first heavy scene had no mention anywhere a user
would look for a switch to turn the new behaviour off or tune it.

AI-assisted.
… RX 6800 XT, klbf-lab ProjectLeonida#127 on an RX 6900 XT

The doc comments put klbf-lab ProjectLeonida#127 on an RX 6800 XT; it measured an RX 6900 XT, and the
1,270 host lists alive at the loss are this tree's own run (relay 2, 2026-11-29).
…light went black

On an RX 6800 XT with relay 2 and the launcher's default settings the lighting rose and fell
with where the camera looked and ended black (the automatic exposure seems to read a late
value). The same build and place with LEONIDA_RELAY_COPY=0: the light right at 17 to 20 fps
(relay 0 is right too, at 8 fps). Measured 2026-11-30 on that card only.

play-nvidia.ps1 now drops LEONIDA_RELAY_COPY from its defaults when the card name matches
Radeon RX 6000; the card name is read once and shared with the frame generation check.
-More @{LEONIDA_RELAY_COPY='1'} is applied after and still wins.

AI-assisted.
@merzleckeier

Copy link
Copy Markdown
Contributor

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 emits LEONIDA_ADAPTER=RTX 4070, but LEONIDA_RELAY_COPY is now unset at launch and after replaying the F1 command. A saved LEONIDA_ADAPTER=RTX 4070 produces the same result.

  • MEASURED Three fresh PowerShell 7.4.21 dry runs per tree with mocked CIM, on main 40e7fe69 and after merging 1462e3e8 (6be18311). Main emits LEONIDA_RELAY_COPY=1 in all controls. The PR retains 1 with 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 saved LEONIDA_RELAY_COPY=1 still wins on the mixed setup.
  • READ IN CODE The launcher tests a joined list of controller names against the Radeon pattern. The runtime resolves the requested card separately through DXGI, including the F1 menu’s #index selectors. Basing the default on the resolved DXGI adapter would keep the workaround scoped to the selected card. Launcher rule · DXGI selection
  • MEASURED Adding d3d12: preserve -MotionBlur across F1 restart #2626 on top (845e0208) gives the same relay settings. In all six cases across three runs, -MotionBlur survives 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.

@bobcatchris

Copy link
Copy Markdown
Contributor

Independent verification on native Windows 11 Pro (10.0.26200) + AMD Radeon RX 7900 XTX (gfx1100, driver 32.0.32029.2010, Rust 1.98):

  • Merged PR head 1462e3e8d cleanly onto main (40e7fe69d) — zero conflicts.
  • cargo test -p leonida-gpu --lib -- --test-threads=4 — 558 passed; 0 failed; 47 ignored (12.93s), including the new host::segments tests.
  • python -I scripts/check_no_game_data.py on all 6 touched files — PASS.

AI-assisted: Antigravity (Gemini 4 Neon)

@amujark

amujark commented Nov 30, 2026

Copy link
Copy Markdown
Author

Thanks, you were right: the launcher judged by every controller in the PC, not by the card the game plays on. Fixed in 077d608, as you suggested, by moving the decision to the runtime:

  • The launchers (play-nvidia.ps1, and play.ps1, which had the same default) now set LEONIDA_RELAY_COPY=auto instead of 1, and play-nvidia.ps1 no 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_ADAPTER by name and the F1 menu's #index all count) is checked: AMD vendor id 0x1002 and RX, optional spaces, 6 and three digits in DXGI's description (the launcher's old RX\s*6\d\d\d). Under auto, 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 a Host, after the device exists.
  • An explicit 1 or 0 still wins: the F1 file and -More are applied over the launcher's auto, and the runtime only treats auto by card.
  • The F1 menu's RELAY COPY QUEUE cycles OFF / ON / BY CARD (RX 6000 OFF); d3d12/README.md lists the variable.

What was tested:

  • MEASURED 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).
  • MEASURED play-nvidia.ps1 -DryRun: LEONIDA_RELAY_COPY=auto plain and with -Adapter 'RTX 4070' (which also prints LEONIDA_ADAPTER=RTX 4070); -More @{LEONIDA_RELAY_COPY='1'} prints 1.
  • NOT MEASURED The mixed NVIDIA + Radeon case on real hardware, and a game run with this commit: the only card here is an RX 6800 XT (Adrenalin driver 32.0.21045.29003). On that card auto should 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 on main already and outside this PR.

AI-assisted (Claude Code).

@lerapeurdu62280-debug

Copy link
Copy Markdown

Game-run A/B on Windows AMD RDNA2 (RX 6600 8 GB), the profile this PR is about. n=1 each, and one difference in the caches I could not avoid (below), so read it as a first data point, not a proof.

RUN rx6600-warm-2 (A) | 2026-11-30 18:16-18:19 UTC | lerapeurdu62280-debug | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        afb511541 + none
MACHINE:     AMD Radeon RX 6600 8 GB, desktop | 32.0.21045.29003 | Windows 11 26300 | 32 GB, Ryzen 5 3600
RECIPE:      README "Playing it": scripts\play-d3d12.ps1 -Log, its defaults (Series X, 2560x1440, diag + diagnostics,mimalloc) + DEVIATIONS: none | relay chosen: LEONIDA_RELAY=1
MEASURED:    story load, 1 frame line in the world | ~180 s in the title
END:         device lost (0x887A0007, device-removed data none, nothing of ours on the card)
CACHES:      warm; leonida warm made 1,719 pipelines before the start; 69 more made in play, each with the library refusing its entry (E_INVALIDARG)
INSTRUMENTS: none

RUN rx6600-pr2670-1 (B) | 2026-11-30 18:20-18:25 UTC | lerapeurdu62280-debug | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        afb511541 + #2670 (head merged, no conflicts)
MACHINE:     same
RECIPE:      same + DEVIATIONS: none | relay chosen: LEONIDA_RELAY=1; segments logged: id 1 aperture 2048 MB (8 MB resident at start)
MEASURED:    world load into play, 30 frame lines in the world (1000+ draws), median 1.9 fps there (slowest tenth 0.3, fastest tenth 9.6) | ~290 s in the title
END:         time limit (closed by the player), no device lost, no ERROR line in the log
CACHES:      warm; leonida warm made 1 pipeline before the start; 0 made in play
INSTRUMENTS: none

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 main on 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

@lerapeurdu62280-debug

lerapeurdu62280-debug commented Nov 30, 2026 •

Copy link
Copy Markdown

The cleaner pair, as offered above: A and B from the same emptied caches (Leonida's pipelines folder and AMD's DxcCache moved aside before each run), so neither starts with pipelines the other made.

RUN rx6600-ab-A | 2026-11-30 18:30-18:34 UTC | lerapeurdu62280-debug | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        afb511541 + none
MACHINE:     AMD Radeon RX 6600 8 GB, desktop | 32.0.21045.29003 | Windows 11 26300 | 32 GB, Ryzen 5 3600
RECIPE:      README "Playing it": scripts\play-d3d12.ps1 -Log, its defaults + DEVIATIONS: none | precompile: shaders yes; pipelines 0 (emptied)
CACHES:      shaders warm; pipelines and driver cache emptied | RUN 1 of 2
TARGET:      device lost or not | PREDICTED: not written down before the run (expected: device lost, as the cold run in #2464)
MEASURED:    world load, 17 frame lines in the world, 0.2 fps there (pipelines made in play) | ~267 s in the title
END:         device lost (0x887A0007, device-removed data none; the submitting thread was preparing a submission, nothing of ours on the card, pipeline makes in flight)
VERDICT:     n/a (no prediction written before)

RUN rx6600-ab-B | 2026-11-30 18:35-18:45 UTC | lerapeurdu62280-debug | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        afb511541 + #2670
MACHINE:     same
RECIPE:      same + DEVIATIONS: none | precompile: shaders yes; pipelines 0 (emptied)
CACHES:      same state as A | RUN 2 of 2
TARGET:      device lost or not | PREDICTED: not written down before the run (expected: no device lost)
MEASURED:    world load into play, 32 frame lines in the world, 0.2 fps there (pipelines made in play, as A) | ~625 s in the title, ~380 s after the story pack opened
END:         time limit (closed by the player), no device lost, no ERROR line
VERDICT:     n/a (no prediction written before)

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=1 per 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

…e card's memory neared its limit, while the submitting thread freed 448 idle lists and 112 preludes; now a thread of its own frees them (LEONIDA_TRIM_ASYNC=0: as before)
@amujark

amujark commented Nov 30, 2026

Copy link
Copy Markdown
Author

Added aace3e2: 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() and trim_preludes() ran inline on the submitting thread at the first submission after segments::tight turned true. They freed up to ~448 idle host lists and ~112 preludes there, and freeing them is the graphics kernel's time. Two LEONIDA_TIMELINE captures showed it:

  • the line and the title's present stood still for 153 ms and 262 ms;
  • the stall matched the tight=true / tight=false pair in the log exactly;
  • resident memory fell 242-370 MB during it.

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.

  • If that thread cannot be spawned, they are freed inline as before.
  • LEONIDA_TRIM_ASYNC=0 gives the old behaviour.
  • In diagnostics builds LEONIDA_AB can switch it live.
  • A per-second line gives the time and count freed.

Measured on an RX 6800 XT (driver 32.0.21045.29003), Ryzen 9 5950X, Series S profile, relay 2, FSR 3.1:

  • In a 35-minute run of normal play, A/B every 8 s, 182 phases in the world, there were only 3 tight episodes.
  • In those, the thread freed about 37 lists and preludes a frame, 25-32 ms of freeing a frame, off the submitting thread.
  • Frames over 100 ms overall were 3.9 % vs 4.3 %: the same, because the episodes were rare in that run.
  • So it removes a real stall when the segment fills, but it does not change average fps.
  • No device removal in any run.

Tests. trim_tests, host::segments and the trim test in list.rs: 9 passed, with and without --features diagnostics. The diag build passes.

AI-assisted.

@merzleckeier

Copy link
Copy Markdown
Contributor

Checked the release-thread behavior with a real D3D12 buffer at aace3e264 + 9f27ba2e1. I passed a 64 KiB hardware buffer through let_go_apart and held its destruction behind a channel handshake. With LEONIDA_TRIM_ASYNC=1, the caller returned while the destructor was still held on leonida-trim. With 0, 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).

@KelboLive KelboLive left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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's views_are_made_beside_the_heap_and_copied_in failure passes here, so it is not a regression from this PR. Merged onto current main (tree 18cdc655): 641 passed, 0 failed, 59 ignored, merge-tree clean, check_no_game_data and diff --check clean, both launcher scripts parse.
  • The claim holds in the code: landed flights are recycled at once with take_held retired (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).
  • Mutation: removing the ten-point hysteresis reddens it_stays_tight_ten_points_below_the_percent and a_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.

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Dec 1, 2026
@lerapeurdu62280-debug

Copy link
Copy Markdown

Test report on RDNA 2 (RX 6600 8 GB), PR head aace3e264 merged on top of main locally (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 -SeriesS with 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):

Result
host::segments at device creation reads the three segments correctly: id 0 local 8146 MB, id 1 aperture 2048 MB, id 2 aperture 30614 MB
Aperture segment (2048 MB) residency 24–27 MB at the logged points, never close to the 80 % mark
Tight-segment path never entered (no related lines in any log)
Device removed / 0x887A0007 0 in all 5 sessions
Frame times (one 24 min session) 13.6 fps average, median 79 ms, 8.2 % of frames over 100 ms, 2 over 1 s

Relay stage: stage 2 in every session (LEONIDA_RELAY=2 in the settings line, or unset = default; exact=true). Side note: with relay 2 set, the host info 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 plain main without the PR would be the next step if you want one.

AI-assisted (Claude). EI S.O.S INFO LUDO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants