d3d12: host lists record into pooled command allocators (D3D12-COMMAND-ALLOCATOR-RING) #3031

Open
Krashgamer wants to merge 5 commits from upstream-pr/3031 into main
Krashgamer commented 2026-12-02 02:43:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T02:43:30Z.


Claimed in the coordination issue as: D3D12-COMMAND-ALLOCATOR-RING (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7330840193)

What and why

Every host list and every list prelude had a command allocator of its own: some 2,500 in the world (1,474 host lists alive, plus their preludes). On NVIDIA an allocator keeps the memory of its largest recording through Reset, and what an allocator lets go stays in the driver's pool (Windows does not get it back). So the process held the sum of every allocator's peak. That is also why LEONIDA_ALLOCATOR_TRIM=1 measured nothing (findings.md): a replaced allocator's memory went back to the driver, and the new one grew again.

Device test on an RTX 3080 (no game):

Case Private bytes
1,000 allocators, nothing recorded +3.6 MB
1,000 lists created on one allocator +223 MB (0.22 MB each)
999 lists × 20,000 CopyBufferRegion, each on its own allocator +2,629 MB
the same after Reset of every allocator unchanged
releasing every allocator and list −10 MB
one list recorded 999 times on 999 allocators +2,311 MB
999 lists recorded once each on one allocator, reset between +321 MB

The allocators hold the memory.

This change:

  • New lists. Host lists and their preludes are made closed with no allocator (CreateCommandList1).
  • Pooled allocators. Each recording takes an empty allocator from a pool (host/recorders.rs) and has it to itself. When the recording is over (its list was reset after its run, or let go behind the submissions running, host::retire), the allocator is reset outside the pool's lock and goes back to the pool.
  • No list records after another in one allocator before its reset. D3D12 allows that, and the first version of this pull request did it (up to 16 recordings per allocator). With -RayTracing that hung the card (DXGI_ERROR_DEVICE_HUNG) in 5 of 15 runs, against 0 of 10 with an allocator per list. Of those 10, two ran this branch with LEONIDA_ALLOCATOR_RING=0, and eight ran a build of another branch on main whose own switch was unset. With one recording per allocator: 0 of 12 (see Tested). The cause inside the driver was not found; the pool keeps to the simplest contract instead.
  • Idle pools. Pooled idle lists stay closed. An open idle list would keep an allocator to itself.
  • Lists with no recording. A list that a submission names with no live recording of its own gets an empty one first. Without this, a list handed out closed for the title's next reset and submitted again with no reset ran with none, and the debug layer stopped the device: "A Command List created via ID3D12Device::CreateCommandList1 can not be executed before it has been reset … and closed".
  • LEONIDA_ALLOCATOR_RING=0 gives each list and each prelude an allocator of its own again ("home" slots), as before.
  • LEONIDA_ALLOCATOR_TRIM keeps only its idle-list part; the allocator replacement is gone (it did nothing).
  • New log line. The frame-rate line now prints, every twelfth time, how many allocators there are and how they are used.

Tested

Game gate, Series X, 300 s in the world, the same save, RTX 3080 10 GB, 32 GB RAM. Main 5b1fff821 against this change on it, alternating, two runs each. This change was measured at 9903ba336, the commit before the last review fixes listed below; those touch only list retirement, where a released allocator is let go, comments and tests. Columns (private = private bytes at most):

main: private / fps median this change: private / fps median gate
ray tracing off 27,574 and 27,569 MB / 24.5 and 24.1 26,187 and 25,965 MB / 24.7 and 24.2 all PASS
-HardwareRT (one complete run each) 27,926 MB / 21.1 26,967 MB / 21.3 all PASS*

* With -HardwareRT both main and this change stay over the card's memory budget for about 190 of the 300 s; the gate's over-budget stop was turned off for these runs (a first round with it on stopped main and this change alike at ~175 s).

-RayTracing (the title's own structure builder, where the first version hung): 4 gate runs of this head, all PASS, 0 device lost (fps 11.6-15.1, private 30.8-31.4 GB); with 8 runs of an equivalent earlier build, 0 of 12 hung.

Measured by others: OtavMacedo, RTX 3070 8 GB, 16 GB RAM, Series X, 4 pairs of two builds (4e59d46e8 on the same base against the base alone, 12 gate runs, all PASS): private bytes at most -752 MB (-3.0 %, 95 % interval -1,232 to -271), least left to commit +718 MB, frame time no clear difference. They saw longer gaps between frames in the last two runs with the change (up to 4.6 s), not read as caused by it; worth watching near arrival (https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7378647676).

Other results:

  • Allocators: about 1,200 pooled; some 400 of them held over 60 s by lists the title keeps recorded and unreset.
  • Releasing a prelude's recording early (tried): no measurable change (31,175 against 31,262 MB with -RayTracing, 4 pairs), so not part of this change.

Without the game:

  • cargo test -p leonida-gpu --features diagnostics --lib on WARP with the debug layer (LEONIDA_D3D12_WARP=1 LEONIDA_D3D12_DEBUG=1): 789 passed.
  • Clippy: no new warnings.
  • check_no_game_data.py: passed.
  • Docs tests: passed.
  • d3d12_switches.py --check: passed.

Red/green for host::batch_scratch_tests::lists_recorded_in_turn_share_allocators. The test records, runs and retires 200 lists in turn, then counts the allocators they took:

  • This change: at most a few allocators, and the test passes.
  • LEONIDA_ALLOCATOR_RING=0, with the test's switch guard taken out: "200 lists recorded in turn took 200 allocators", and the test fails.

lists_record_in_pooled_allocators_and_run checks that recordings alive at once have allocators of their own. The recorder module has unit tests for the bookkeeping:

  • a recording has its allocator to itself until it is over, then the allocator is reset and back in the pool
  • no reset while a recording in it is still open
  • a slot being reset is taken by nobody
  • home slots: two recordings in a row, and going with their owner

The change was reviewed by independent reviewer agents before this pull request and before this update. Findings fixed in the update:

  • HostList::retire closes a list still recording before its allocator can reset (it only asserted in debug builds).
  • An allocator whose owner went is released outside the pool's lock.
  • Tests asserted too little (an always-true check; an order production never takes).

GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.1088 (610.88), Windows 11 Pro 26200; Intel i7-10700K, 32 GB RAM

AI-assisted: yes, Claude Code (Claude Opus 5.5)

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)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5598758761 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T02:43:30Z. --- Claimed in the coordination issue as: D3D12-COMMAND-ALLOCATOR-RING (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7330840193) ### What and why Every host list and every list prelude had a command allocator of its own: some 2,500 in the world (1,474 host lists alive, plus their preludes). On NVIDIA an allocator keeps the memory of its largest recording through `Reset`, and what an allocator lets go stays in the driver's pool (Windows does not get it back). So the process held the sum of every allocator's peak. That is also why `LEONIDA_ALLOCATOR_TRIM=1` measured nothing (findings.md): a replaced allocator's memory went back to the driver, and the new one grew again. Device test on an RTX 3080 (no game): | Case | Private bytes | |---|---| | 1,000 allocators, nothing recorded | +3.6 MB | | 1,000 lists created on one allocator | +223 MB (0.22 MB each) | | 999 lists × 20,000 `CopyBufferRegion`, each on its own allocator | +2,629 MB | | the same after `Reset` of every allocator | unchanged | | releasing every allocator and list | −10 MB | | one list recorded 999 times on 999 allocators | +2,311 MB | | 999 lists recorded once each on one allocator, reset between | +321 MB | The allocators hold the memory. This change: - **New lists.** Host lists and their preludes are made closed with no allocator (`CreateCommandList1`). - **Pooled allocators.** Each recording takes an empty allocator from a pool (`host/recorders.rs`) and has it to itself. When the recording is over (its list was reset after its run, or let go behind the submissions running, `host::retire`), the allocator is reset outside the pool's lock and goes back to the pool. - **No list records after another in one allocator before its reset.** D3D12 allows that, and the first version of this pull request did it (up to 16 recordings per allocator). With `-RayTracing` that hung the card (`DXGI_ERROR_DEVICE_HUNG`) in 5 of 15 runs, against 0 of 10 with an allocator per list. Of those 10, two ran this branch with `LEONIDA_ALLOCATOR_RING=0`, and eight ran a build of another branch on main whose own switch was unset. With one recording per allocator: 0 of 12 (see Tested). The cause inside the driver was not found; the pool keeps to the simplest contract instead. - **Idle pools.** Pooled idle lists stay closed. An open idle list would keep an allocator to itself. - **Lists with no recording.** A list that a submission names with no live recording of its own gets an empty one first. Without this, a list handed out closed for the title's next reset and submitted again with no reset ran with none, and the debug layer stopped the device: "A Command List created via ID3D12Device::CreateCommandList1 can not be executed before it has been reset … and closed". - **`LEONIDA_ALLOCATOR_RING=0`** gives each list and each prelude an allocator of its own again ("home" slots), as before. - **`LEONIDA_ALLOCATOR_TRIM`** keeps only its idle-list part; the allocator replacement is gone (it did nothing). - **New log line.** The frame-rate line now prints, every twelfth time, how many allocators there are and how they are used. ### Tested Game gate, Series X, 300 s in the world, the same save, RTX 3080 10 GB, 32 GB RAM. Main `5b1fff821` against this change on it, alternating, two runs each. This change was measured at `9903ba336`, the commit before the last review fixes listed below; those touch only list retirement, where a released allocator is let go, comments and tests. Columns (`private` = private bytes at most): | | main: private / fps median | this change: private / fps median | gate | |---|---|---|---| | ray tracing off | 27,574 and 27,569 MB / 24.5 and 24.1 | 26,187 and 25,965 MB / 24.7 and 24.2 | all PASS | | `-HardwareRT` (one complete run each) | 27,926 MB / 21.1 | 26,967 MB / 21.3 | all PASS* | \* With `-HardwareRT` both main and this change stay over the card's memory budget for about 190 of the 300 s; the gate's over-budget stop was turned off for these runs (a first round with it on stopped main and this change alike at ~175 s). `-RayTracing` (the title's own structure builder, where the first version hung): 4 gate runs of this head, all PASS, 0 device lost (fps 11.6-15.1, private 30.8-31.4 GB); with 8 runs of an equivalent earlier build, 0 of 12 hung. Measured by others: OtavMacedo, RTX 3070 8 GB, 16 GB RAM, Series X, 4 pairs of two builds (`4e59d46e8` on the same base against the base alone, 12 gate runs, all PASS): private bytes at most -752 MB (-3.0 %, 95 % interval -1,232 to -271), least left to commit +718 MB, frame time no clear difference. They saw longer gaps between frames in the last two runs with the change (up to 4.6 s), not read as caused by it; worth watching near arrival (https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7378647676). Other results: - **Allocators:** about 1,200 pooled; some 400 of them held over 60 s by lists the title keeps recorded and unreset. - **Releasing a prelude's recording early** (tried): no measurable change (31,175 against 31,262 MB with `-RayTracing`, 4 pairs), so not part of this change. Without the game: - `cargo test -p leonida-gpu --features diagnostics --lib` on WARP with the debug layer (`LEONIDA_D3D12_WARP=1 LEONIDA_D3D12_DEBUG=1`): 789 passed. - Clippy: no new warnings. - `check_no_game_data.py`: passed. - Docs tests: passed. - `d3d12_switches.py --check`: passed. Red/green for `host::batch_scratch_tests::lists_recorded_in_turn_share_allocators`. The test records, runs and retires 200 lists in turn, then counts the allocators they took: - **This change:** at most a few allocators, and the test passes. - **`LEONIDA_ALLOCATOR_RING=0`, with the test's switch guard taken out:** "200 lists recorded in turn took 200 allocators", and the test fails. `lists_record_in_pooled_allocators_and_run` checks that recordings alive at once have allocators of their own. The recorder module has unit tests for the bookkeeping: - a recording has its allocator to itself until it is over, then the allocator is reset and back in the pool - no reset while a recording in it is still open - a slot being reset is taken by nobody - home slots: two recordings in a row, and going with their owner The change was reviewed by independent reviewer agents before this pull request and before this update. Findings fixed in the update: - `HostList::retire` closes a list still recording before its allocator can reset (it only asserted in debug builds). - An allocator whose owner went is released outside the pool's lock. - Tests asserted too little (an always-true check; an order production never takes). GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.1088 (610.88), Windows 11 Pro 26200; Intel i7-10700K, 32 GB RAM AI-assisted: yes, Claude Code (Claude Opus 5.5) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Kal0s-design commented 2026-12-02 06:15:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T06:15:37Z.


Windows 11, MSVC toolchain 1.98.1. Head 1ac80bcd3 merged into current main 0ae5a2664: the merge is clean. Unit tests only, no game.

cargo test -p leonida-gpu --features diagnostics --lib:

run this PR main
hardware 755 passed
WARP (LEONIDA_D3D12_WARP=1) 755 passed
WARP, LEONIDA_ALLOCATOR_RING=0 755 passed (one run had 1 failure in descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync; two reruns were clean, so I'd call it flaky)
hardware + LEONIDA_D3D12_DEBUG=1 6 failed
WARP + LEONIDA_D3D12_DEBUG=1 7 failed 749 passed, 0 failed
WARP + debug, LEONIDA_ALLOCATOR_RING=0 755 passed
WARP + debug, --test-threads=1 755 passed
WARP + debug, only indirect:: and host::card_steps 35 passed

So with the debug layer on, the failures need the ring on and the whole lib running in parallel. They came back on every parallel run I made: two on WARP and one on hardware. The tests that fail on WARP:

  • host::card_steps::tests::the_card_copies_what_is_recorded
  • host::card_steps::tests::the_card_gathers_what_is_recorded
  • indirect::tests::a_record_written_behind_a_batchs_pass_is_clamped_behind_its_writer
  • indirect::tests::host_list_batches
  • indirect::tests::host_list_budget_starts_empty_at_each_submission
  • indirect::tests::host_list_reuses_and_grows_scratch_across_submissions
  • indirect::tests::host_list_window_executions_need_no_barrier_of_their_own

Each fails on "the debug layer found an error". All of them report the same two messages, which name the same two buffers and the same two command lists:

ID3D12CommandList::CopyBufferRegion: ... Resource state (0x800: D3D12_RESOURCE_STATE_COPY_SOURCE) (assumed at first use) of resource (...) is invalid for use as a destination buffer. ... Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST.
ID3D12CommandList::CopyBufferRegion: ... Resource state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) (assumed at first use) of resource (...) is invalid for use as a source buffer. ... Missing State: 0x800: D3D12_RESOURCE_STATE_COPY_SOURCE.

My guess is that one recording picks up a state another test's list left behind. The tests that fail would then just be the ones that read the device's debug messages. I didn't find which recording that is. One thing I noticed while reading host/recorders.rs: RING is one process-wide ring, and Ring::take lends the next open or empty slot without looking at which device made its allocator. A test process creates more than one device. That may have nothing to do with it, but it's where I'd look first.

The description's debug-layer check ran the game for 120 s, not this unit suite, so this may be new to you. It doesn't show up without the debug layer.

Not checked: the game, and anything outside leonida-gpu --lib.

GPUs tested: one NVIDIA desktop card + WARP.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7336812400 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7336812400). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-02T06:15:37Z. --- Windows 11, MSVC toolchain 1.98.1. Head `1ac80bcd3` merged into current `main` `0ae5a2664`: the merge is clean. Unit tests only, no game. `cargo test -p leonida-gpu --features diagnostics --lib`: | run | this PR | `main` | |---|---|---| | hardware | 755 passed | | | WARP (`LEONIDA_D3D12_WARP=1`) | 755 passed | | | WARP, `LEONIDA_ALLOCATOR_RING=0` | 755 passed (one run had 1 failure in `descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync`; two reruns were clean, so I'd call it flaky) | | | hardware + `LEONIDA_D3D12_DEBUG=1` | **6 failed** | | | WARP + `LEONIDA_D3D12_DEBUG=1` | **7 failed** | 749 passed, 0 failed | | WARP + debug, `LEONIDA_ALLOCATOR_RING=0` | 755 passed | | | WARP + debug, `--test-threads=1` | 755 passed | | | WARP + debug, only `indirect::` and `host::card_steps` | 35 passed | | So with the debug layer on, the failures need the ring on and the whole lib running in parallel. They came back on every parallel run I made: two on WARP and one on hardware. The tests that fail on WARP: - `host::card_steps::tests::the_card_copies_what_is_recorded` - `host::card_steps::tests::the_card_gathers_what_is_recorded` - `indirect::tests::a_record_written_behind_a_batchs_pass_is_clamped_behind_its_writer` - `indirect::tests::host_list_batches` - `indirect::tests::host_list_budget_starts_empty_at_each_submission` - `indirect::tests::host_list_reuses_and_grows_scratch_across_submissions` - `indirect::tests::host_list_window_executions_need_no_barrier_of_their_own` Each fails on "the debug layer found an error". All of them report the same two messages, which name the same two buffers and the same two command lists: ``` ID3D12CommandList::CopyBufferRegion: ... Resource state (0x800: D3D12_RESOURCE_STATE_COPY_SOURCE) (assumed at first use) of resource (...) is invalid for use as a destination buffer. ... Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST. ID3D12CommandList::CopyBufferRegion: ... Resource state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) (assumed at first use) of resource (...) is invalid for use as a source buffer. ... Missing State: 0x800: D3D12_RESOURCE_STATE_COPY_SOURCE. ``` My guess is that one recording picks up a state another test's list left behind. The tests that fail would then just be the ones that read the device's debug messages. I didn't find which recording that is. One thing I noticed while reading `host/recorders.rs`: `RING` is one process-wide ring, and `Ring::take` lends the next open or empty slot without looking at which device made its allocator. A test process creates more than one device. That may have nothing to do with it, but it's where I'd look first. The description's debug-layer check ran the game for 120 s, not this unit suite, so this may be new to you. It doesn't show up without the debug layer. Not checked: the game, and anything outside `leonida-gpu --lib`. GPUs tested: one NVIDIA desktop card + WARP. AI-assisted: yes (Claude Code).
Krashgamer commented 2026-12-02 06:35:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T06:35:49Z.


@Kal0s-design thank you, that was a real one, and the cause was my new test, not the ring.

host::batch_scratch_tests::lists_recorded_in_turn_share_allocators copied a -> b and b -> a in turn inside one list, with no barrier. The first read promotes a to COPY_SOURCE for the rest of the list, so the copy back into it is invalid. That gives exactly the two messages you quoted, with two buffers and two lists. The debug layer puts them in the device's message queue, and every test that checks host.log_messages() on that device picked them up. That's why the failures needed the whole lib in parallel, and why they went away with LEONIDA_ALLOCATOR_RING=0: the test returns early when the switch is off. I bisected it with your filters: indirect:: host::batch reproduced it, and indirect:: with host:: minus batch_scratch_tests didn't.

Fixed in 1d6777868: the copies now go one way. The test checks the allocator count, which doesn't depend on direction, and it still holds (≤ 50 of 200).

  • WARP + LEONIDA_D3D12_DEBUG=1, whole leonida-gpu --features diagnostics --lib in parallel: 745 passed, twice. Before the fix, the same command failed 4–7.
  • Hardware (RTX 3080) + debug layer, parallel: 745 passed.

On the devices: every allocator in the ring comes from host().device (the four call sites are begin/home_slot, called with the host's device), and lists are only ever made there. The tests that create their own device (trainer, WarpHarness) use their own allocators and never touch the ring. With a single host device per process, a device check in take would never fire, so I left it out.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7337191196 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7337191196). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T06:35:49Z. --- @Kal0s-design thank you, that was a real one, and the cause was my new test, not the ring. `host::batch_scratch_tests::lists_recorded_in_turn_share_allocators` copied `a -> b` and `b -> a` in turn inside one list, with no barrier. The first read promotes `a` to `COPY_SOURCE` for the rest of the list, so the copy back into it is invalid. That gives exactly the two messages you quoted, with two buffers and two lists. The debug layer puts them in the device's message queue, and every test that checks `host.log_messages()` on that device picked them up. That's why the failures needed the whole lib in parallel, and why they went away with `LEONIDA_ALLOCATOR_RING=0`: the test returns early when the switch is off. I bisected it with your filters: `indirect:: host::batch` reproduced it, and `indirect::` with `host::` minus `batch_scratch_tests` didn't. Fixed in 1d6777868: the copies now go one way. The test checks the allocator count, which doesn't depend on direction, and it still holds (≤ 50 of 200). - WARP + `LEONIDA_D3D12_DEBUG=1`, whole `leonida-gpu --features diagnostics --lib` in parallel: 745 passed, twice. Before the fix, the same command failed 4–7. - Hardware (RTX 3080) + debug layer, parallel: 745 passed. On the devices: every allocator in the ring comes from `host().device` (the four call sites are `begin`/`home_slot`, called with the host's device), and lists are only ever made there. The tests that create their own device (`trainer`, `WarpHarness`) use their own allocators and never touch the ring. With a single host device per process, a device check in `take` would never fire, so I left it out. AI-assisted (Claude Code).
lixonik commented 2026-12-02 06:59:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-02T06:59:20Z.


RUN

Independent verification of #3031 (1ac80bcd3) merged cleanly onto main (f37c4a87d) on Windows 10 Pro 22H2 (build 19045), AMD Ryzen 9 5950X, 64 GiB RAM, NVIDIA GeForce RTX 5070 12 GB (driver 621.40), MSVC toolchain (1.98.1).

In-game Series X comparison (LEONIDA_MEMORY_MAP=1, -NoFrameGen, same binary 1ac80bcd3 + f37c4a87d, same save, 90 s in world each)

Metric LEONIDA_ALLOCATOR_RING=0 LEONIDA_ALLOCATOR_RING=1 (PR default) Delta
Max private bytes (copystat) 34,472 MB (last 33,863 MB) 31,013 MB (last 30,854 MB) -3,459 MB (-3.38 GiB)
Lowest commit headroom (residency) 14,966 MB (15,678 MB phys free) 17,855 MB (18,066 MB phys free) +2,889 MB
1024 MB private regions (last map) 9 regions (7,540 MB) 7 regions (5,439 MB) -2 regions (-2,101 MB)
32 MB write-combined regions (last map) 85 regions (2,605 MB) 77 regions (2,432 MB) -8 regions (-173 MB)
Private growth while lists were made 131 MB (1,978 lists, 1,539 preludes) 74 MB (2,015 lists, 1,583 preludes) -57 MB
World FPS (median / slowest tenth) 16.3 / 4.3 fps (19 samples) 21.4 / 12.6 fps (20 samples) +5.1 fps
Runtime errors / device removals 0 / 0 0 / 0 --

Allocator census at end of RING=1 run:
180 shared, 4 another list may record in, 18 empty, 162 with recordings not over (begun over 1 s ago 67, 10 s 64, 60 s 62); since the start 180 made, 37711 resets, 547674 recordings begun in an allocator another list had closed in.

Unit tests & D3D12 debug layer (cargo test -p leonida-gpu --features diagnostics --locked --lib -- --skip depth_bounds_pipeline_loads_and_filters_draws)

  • check_no_game_data.py & d3d12_switches.py --check: PASS.
  • Hardware default (RING=1): 754 passed, 0 failed (host::recorders::tests::* 5/5 and lists_recorded_in_turn_share_allocators 1/1 PASS).
  • Hardware + LEONIDA_D3D12_DEBUG=1 + --test-threads=1 (RING=1): 754 passed, 0 failed (0 debug-layer errors).
  • Hardware + LEONIDA_D3D12_DEBUG=1 parallel (RING=0): 753 passed, 1 failed (only the known pre-existing parallel race descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync; 0 debug-layer errors).
  • Hardware + LEONIDA_D3D12_DEBUG=1 parallel (RING=1): 749 passed, 5 failed -- reproduces @Kal0s-design's exact finding (ID3D12CommandList::CopyBufferRegion: Resource state (0x800: D3D12_RESOURCE_STATE_COPY_SOURCE) (assumed at first use) ... Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST) across the 5 indirect::tests::* tests.

Code note supporting @Kal0s-design's observation: static RING: Mutex<Ring> in d3d12/crates/leonida-gpu/src/host/recorders.rs:94 does not tag Slot with the owning ID3D12Device pointer (Ring::take at :146-158 and Recording::begin at :237-249 hand out any open/empty slot regardless of device). Scoping ring slots by device identity (or owning the ring per Host) would isolate multi-device test processes cleanly.

Verdict: In-game memory reduction is strongly confirmed on a second NVIDIA architecture (RTX 5070 / 621.40: -3,459 MB peak private bytes, 0 errors), while @Kal0s-design's parallel LEONIDA_D3D12_DEBUG=1 test failure reproduces deterministically.

AI-assisted: yes (Antigravity).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7337640169 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7337640169). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-02T06:59:20Z. --- RUN Independent verification of `#3031` (`1ac80bcd3`) merged cleanly onto `main` (`f37c4a87d`) on Windows 10 Pro 22H2 (build 19045), AMD Ryzen 9 5950X, 64 GiB RAM, NVIDIA GeForce RTX 5070 12 GB (driver `621.40`), MSVC toolchain (`1.98.1`). ### In-game Series X comparison (`LEONIDA_MEMORY_MAP=1`, `-NoFrameGen`, same binary `1ac80bcd3` + `f37c4a87d`, same save, 90 s in world each) | Metric | `LEONIDA_ALLOCATOR_RING=0` | `LEONIDA_ALLOCATOR_RING=1` (PR default) | Delta | |---|---:|---:|---:| | Max private bytes (`copystat`) | 34,472 MB (last 33,863 MB) | **31,013 MB** (last 30,854 MB) | **-3,459 MB (-3.38 GiB)** | | Lowest commit headroom (`residency`) | 14,966 MB (`15,678 MB` phys free) | **17,855 MB** (`18,066 MB` phys free) | **+2,889 MB** | | `1024 MB` private regions (last map) | 9 regions (7,540 MB) | **7 regions (5,439 MB)** | **-2 regions (-2,101 MB)** | | `32 MB` write-combined regions (last map) | 85 regions (2,605 MB) | **77 regions (2,432 MB)** | **-8 regions (-173 MB)** | | Private growth while lists were made | 131 MB (1,978 lists, 1,539 preludes) | **74 MB** (2,015 lists, 1,583 preludes) | **-57 MB** | | World FPS (median / slowest tenth) | 16.3 / 4.3 fps (19 samples) | **21.4 / 12.6 fps** (20 samples) | +5.1 fps | | Runtime errors / device removals | 0 / 0 | **0 / 0** | -- | Allocator census at end of `RING=1` run: `180 shared, 4 another list may record in, 18 empty, 162 with recordings not over (begun over 1 s ago 67, 10 s 64, 60 s 62); since the start 180 made, 37711 resets, 547674 recordings begun in an allocator another list had closed in`. ### Unit tests & D3D12 debug layer (`cargo test -p leonida-gpu --features diagnostics --locked --lib -- --skip depth_bounds_pipeline_loads_and_filters_draws`) - `check_no_game_data.py` & `d3d12_switches.py --check`: PASS. - Hardware default (`RING=1`): **754 passed, 0 failed** (`host::recorders::tests::*` 5/5 and `lists_recorded_in_turn_share_allocators` 1/1 PASS). - Hardware + `LEONIDA_D3D12_DEBUG=1` + `--test-threads=1` (`RING=1`): **754 passed, 0 failed** (0 debug-layer errors). - Hardware + `LEONIDA_D3D12_DEBUG=1` parallel (`RING=0`): **753 passed, 1 failed** (only the known pre-existing parallel race `descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync`; 0 debug-layer errors). - Hardware + `LEONIDA_D3D12_DEBUG=1` parallel (`RING=1`): **749 passed, 5 failed** -- reproduces `@Kal0s-design`'s exact finding (`ID3D12CommandList::CopyBufferRegion: Resource state (0x800: D3D12_RESOURCE_STATE_COPY_SOURCE) (assumed at first use) ... Missing State: 0x400: D3D12_RESOURCE_STATE_COPY_DEST`) across the 5 `indirect::tests::*` tests. Code note supporting `@Kal0s-design`'s observation: `static RING: Mutex<Ring>` in `d3d12/crates/leonida-gpu/src/host/recorders.rs:94` does not tag `Slot` with the owning `ID3D12Device` pointer (`Ring::take` at `:146-158` and `Recording::begin` at `:237-249` hand out any open/empty slot regardless of device). Scoping ring slots by device identity (or owning the ring per `Host`) would isolate multi-device test processes cleanly. **Verdict:** In-game memory reduction is strongly confirmed on a second NVIDIA architecture (RTX 5070 / `621.40`: **-3,459 MB** peak private bytes, 0 errors), while `@Kal0s-design`'s parallel `LEONIDA_D3D12_DEBUG=1` test failure reproduces deterministically. AI-assisted: yes (Antigravity).
Kal0s-design commented 2026-12-02 07:12:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T07:12:28Z.


Thanks, and sorry for pointing at the devices. The cause was the test, as you found. I checked 1d6777868 the same way, on top of current main 229d352ee. Only d3d12/docs/switches.md conflicts in that merge, so the Rust side is what's tested here:

  • WARP + LEONIDA_D3D12_DEBUG=1, whole leonida-gpu --features diagnostics --lib in parallel: 778 passed, 0 failed, twice. At 1ac80bcd3 the same command failed 7.
  • Hardware + debug layer, in parallel: 778 passed.
  • Hardware, no debug layer: 778 passed.

The switches.md conflict with the new main will need a rebase, though GitHub already shows it as conflicting.

GPUs tested: one NVIDIA desktop card + WARP.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7337903925 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7337903925). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-02T07:12:28Z. --- Thanks, and sorry for pointing at the devices. The cause was the test, as you found. I checked `1d6777868` the same way, on top of current `main` `229d352ee`. Only `d3d12/docs/switches.md` conflicts in that merge, so the Rust side is what's tested here: - WARP + `LEONIDA_D3D12_DEBUG=1`, whole `leonida-gpu --features diagnostics --lib` in parallel: 778 passed, 0 failed, twice. At `1ac80bcd3` the same command failed 7. - Hardware + debug layer, in parallel: 778 passed. - Hardware, no debug layer: 778 passed. The `switches.md` conflict with the new `main` will need a rebase, though GitHub already shows it as conflicting. GPUs tested: one NVIDIA desktop card + WARP. AI-assisted: yes (Claude Code).
Krashgamer commented 2026-12-02 07:28:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T07:28:00Z.


Rebased onto main 229d352ee. The only conflict was d3d12/docs/switches.md, regenerated with tools/d3d12_switches.py; the code is unchanged. Head is now a47b86855. WARP + LEONIDA_D3D12_DEBUG=1, whole leonida-gpu --features diagnostics --lib in parallel: 778 passed.

Thanks @lixonik for the in-game run on the RTX 5070 / 64 GB, and @Kal0s-design for re-checking the fix.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7338216597 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7338216597). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T07:28:00Z. --- Rebased onto `main` `229d352ee`. The only conflict was `d3d12/docs/switches.md`, regenerated with `tools/d3d12_switches.py`; the code is unchanged. Head is now `a47b86855`. WARP + `LEONIDA_D3D12_DEBUG=1`, whole `leonida-gpu --features diagnostics --lib` in parallel: 778 passed. Thanks @lixonik for the in-game run on the RTX 5070 / 64 GB, and @Kal0s-design for re-checking the fix. AI-assisted (Claude Code).
Krashgamer commented 2026-12-02 11:24:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T11:24:53Z.


Please don't merge yet: with ray tracing on (-RayTracing), this PR's default makes device removals likely. Investigating; I'll post the cause and a fix here.

All earlier verification, mine and yours, ran without real ray tracing: the launcher's default has every ray miss (LEONIDA_BVH_MISS=1). With -RayTracing, Series X, RTX 3080 10 GB, 300 s in the world per run, on this head (a47b86855) or main:

build, mode device lost private bytes, peak
main 0 of 6 runs about 32 GB
this PR, LEONIDA_ALLOCATOR_RING=0 0 of 2 32.1–32.3 GB
this PR, default (ring on) 3 of 6 30.6–31.0 GB
  • Each removal had no device-removed data and 21 submissions not yet finished after about 4.6 s: a hang, after 100–220 s in the world.
  • Frame rates are the same as main with ray tracing (about 12–15 fps median).
  • The memory saving holds with ray tracing: about 1.4 GB less.

Without ray tracing nothing changes from the numbers above in this thread: 0 removals in all runs.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7343886764 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7343886764). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T11:24:53Z. --- **Please don't merge yet: with ray tracing on (`-RayTracing`), this PR's default makes device removals likely.** Investigating; I'll post the cause and a fix here. All earlier verification, mine and yours, ran without real ray tracing: the launcher's default has every ray miss (`LEONIDA_BVH_MISS=1`). With `-RayTracing`, Series X, RTX 3080 10 GB, 300 s in the world per run, on this head (`a47b86855`) or main: | build, mode | device lost | private bytes, peak | |---|---|---| | main | 0 of 6 runs | about 32 GB | | this PR, `LEONIDA_ALLOCATOR_RING=0` | 0 of 2 | 32.1–32.3 GB | | this PR, default (ring on) | **3 of 6** | 30.6–31.0 GB | - Each removal had no device-removed data and 21 submissions not yet finished after about 4.6 s: a hang, after 100–220 s in the world. - Frame rates are the same as main with ray tracing (about 12–15 fps median). - The memory saving holds with ray tracing: about 1.4 GB less. Without ray tracing nothing changes from the numbers above in this thread: 0 removals in all runs. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 12:38:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:38:43Z.


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:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone 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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345652471 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7345652471). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:38:43Z. --- 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`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone 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).
tillo88 commented 2026-12-02 15:49:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tillo88 on 2026-12-02T15:49:24Z.


In-game numbers for this PR (head a47b86855) merged onto main at 229d352, on a replay bench with no frame cap, against 12 runs of plain main at the same commit. All 4 PR runs (two jobs, about four hours apart, with base runs between them) were faster than every base run:

runs fps prep ms median ms p95 ms p99 ms frames over 100 ms
main 229d352 12 38.12 (37.18–38.85) 17.5 (16.2–23.1) 24.5 (23.9–24.8) 39.3 (38.2–42.9) 91.2 (61.2–125.3) 29 (21–37)
this PR 4 39.81 (39.02–40.82) 16.7 (15.5–19.4) 23.9 (23.5–24.6) 36.8 (36.0–37.4) 74.2 (57.6–115.5) 26 (25–28)
  • Mean fps +4.4%. The base runs span 37.18–38.85 (about 4.5% min to max, standard deviation 0.58 fps); the slowest PR run (39.02) is above the fastest base run.
  • p95 frame time is lower in all 4 PR runs (36.0–37.4 ms) than in any base run (38.2–42.9 ms).
  • CPU prep per frame is below the base range in 3 of 4 runs (15.5–16.0 ms); the fourth (19.4 ms) had a hitch and is inside the base range.
  • Median, p99 and frames over 100 ms are within or near the base range; no change I'd claim there.
  • The allocator line was in the log (84–86 shared allocators). No crash, no device lost, no "host GPU failure" in any run.

Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11; mandy built with build-nvidia.ps1 (diag profile), started with play-d3d12.ps1 -NoFrameGen (Series X profile, dynamic resolution and upscaler, ray tracing off), LEONIDA_FPS_CAP=0. Route: the same start-of-game save each run, prison cutscene, plane cutscene and first boat section (~6.5 min), driven by recorded controller input. Means are over the 5 s windows with the route running; one warm-up run per job is not counted.

Measured unattended on a replay bench (same save, recorded controller input); numbers and text prepared with Claude.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7350981179 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7350981179). Originally posted by [tillo88](https://github.com/tillo88) on 2026-12-02T15:49:24Z. --- In-game numbers for this PR (head `a47b86855`) merged onto `main` at `229d352`, on a replay bench with no frame cap, against 12 runs of plain `main` at the same commit. All 4 PR runs (two jobs, about four hours apart, with base runs between them) were faster than every base run: | | runs | fps | prep ms | median ms | p95 ms | p99 ms | frames over 100 ms | |---|---|---|---|---|---|---|---| | `main` `229d352` | 12 | 38.12 (37.18–38.85) | 17.5 (16.2–23.1) | 24.5 (23.9–24.8) | 39.3 (38.2–42.9) | 91.2 (61.2–125.3) | 29 (21–37) | | this PR | 4 | 39.81 (39.02–40.82) | 16.7 (15.5–19.4) | 23.9 (23.5–24.6) | 36.8 (36.0–37.4) | 74.2 (57.6–115.5) | 26 (25–28) | - Mean fps +4.4%. The base runs span 37.18–38.85 (about 4.5% min to max, standard deviation 0.58 fps); the slowest PR run (39.02) is above the fastest base run. - p95 frame time is lower in all 4 PR runs (36.0–37.4 ms) than in any base run (38.2–42.9 ms). - CPU prep per frame is below the base range in 3 of 4 runs (15.5–16.0 ms); the fourth (19.4 ms) had a hitch and is inside the base range. - Median, p99 and frames over 100 ms are within or near the base range; no change I'd claim there. - The allocator line was in the log (84–86 shared allocators). No crash, no device lost, no "host GPU failure" in any run. Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11; mandy built with `build-nvidia.ps1` (diag profile), started with `play-d3d12.ps1 -NoFrameGen` (Series X profile, dynamic resolution and upscaler, ray tracing off), `LEONIDA_FPS_CAP=0`. Route: the same start-of-game save each run, prison cutscene, plane cutscene and first boat section (~6.5 min), driven by recorded controller input. Means are over the 5 s windows with the route running; one warm-up run per job is not counted. Measured unattended on a replay bench (same save, recorded controller input); numbers and text prepared with Claude.
Krashgamer commented 2026-12-02 15:54:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T15:54:38Z.


Thanks @tillo88, that matches what we see with ray tracing off (no device losses, a little faster).

With ray tracing on (-RayTracing), lists that share one allocator lead to GPU hangs (see the warning above). A switch-only test points at the sharing itself: with one recording per allocator, 0 of 4 runs hung, against 1 of 4 with sharing. So the next version keeps the pool of allocators but gives each recording one to itself, and releases prelude recordings once their submission ran. It is being measured now; I will post its numbers here (both ray-tracing modes and none).

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351131021 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7351131021). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T15:54:38Z. --- Thanks @tillo88, that matches what we see with ray tracing off (no device losses, a little faster). With ray tracing on (`-RayTracing`), lists that share one allocator lead to GPU hangs (see the warning above). A switch-only test points at the sharing itself: with one recording per allocator, 0 of 4 runs hung, against 1 of 4 with sharing. So the next version keeps the pool of allocators but gives each recording one to itself, and releases prelude recordings once their submission ran. It is being measured now; I will post its numbers here (both ray-tracing modes and none). AI-assisted (Claude Code, Claude Opus 5.5).
enlight3d commented 2026-12-02 17:07:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-02T17:07:42Z.


RUN (in game, gate-style, as asked by MoonEyes): head a47b86855 tested in a batch with #2643 (2cea6871c), #3031 (a47b86855), #2789 (4bd128a8c) and #2661 (1b3f3dee0), all merged with git merge --no-ff onto main 23a51c494 (no conflict; the only file the four share is d3d12/docs/switches.md). Built with diagnostics,mimalloc, target x86_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:

Reached the world 71 s
Time in the world 349 s
Device losses 0
Crashes 0
Frame median 29.4 ms (33.6 fps rendered)
Card busy 95 %
Private memory, max 26.6 GB

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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7352938584 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7352938584). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-12-02T17:07:42Z. --- RUN (in game, gate-style, as asked by MoonEyes): head a47b86855 tested **in a batch** with #2643 (2cea6871c), #3031 (a47b86855), #2789 (4bd128a8c) and #2661 (1b3f3dee0), all merged with `git merge --no-ff` onto `main` 23a51c494 (no conflict; the only file the four share is `d3d12/docs/switches.md`). Built with `diagnostics,mimalloc`, target `x86_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: | | | |---|---| | Reached the world | 71 s | | Time in the world | 349 s | | Device losses | 0 | | Crashes | 0 | | Frame median | 29.4 ms (33.6 fps rendered) | | Card busy | 95 % | | Private memory, max | 26.6 GB | 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 commented 2026-12-02 18:02:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:02:26Z.


Not built (Windows-only leonida-gpu). Not ready: the author has asked for it not to be merged.

  • Head: a47b86855, merge base 229d352ee, 188 behind current main 45dc41f95. A trial merge is clean. CI on the head: all 6 checks pass.
  • Evidence on this head:
    • lixonik: -3.4 GB peak private bytes in game.
    • tillo88: +4.4% fps on a replay bench.
    • enlight3d (17:07): batch gate PASS, but without -RayTracing.
    • Kal0s-design: the debug-layer failures were traced to the PR's own test and fixed in 1d6777868.

Blocking finding, from the author (Krashgamer, 11:24 and 15:54): with -RayTracing, the default LEONIDA_ALLOCATOR_RING=1 caused 3 of 6 device removals, against 0 of 6 on main and 0 of 2 with the ring off. They were hangs with 21 unfinished submissions, 100 to 220 s into the world. A switch-only experiment points at several recordings sharing one allocator. The author is preparing a new version with one allocator per recording. None of the posted in-game passes covers ray tracing, so none of them clears this.

Review notes (host/recorders.rs, list.rs):

  • Pooling allocators is the right direction for the memory win.
  • D3D12 requires that a command allocator is not reset while any list recorded from it is still executing, and that only one list records into it at a time. Sharing one allocator across recordings that finish and submit on different schedules makes that bookkeeping fragile. That fits the hang the author measured. The planned "one recording per allocator, released after its submission's fence" matches the API's contract.

Verdict: defects (device removals with ray tracing, confirmed by the author). Wait for the new head and re-run the gate with -RayTracing.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7353884997 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7353884997). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:02:26Z. --- **Not built (Windows-only `leonida-gpu`). Not ready: the author has asked for it not to be merged.** - Head: `a47b86855`, merge base `229d352ee`, 188 behind current `main` `45dc41f95`. A trial merge is clean. CI on the head: all 6 checks pass. - Evidence on this head: - lixonik: -3.4 GB peak private bytes in game. - tillo88: +4.4% fps on a replay bench. - enlight3d (17:07): batch gate PASS, but without `-RayTracing`. - Kal0s-design: the debug-layer failures were traced to the PR's own test and fixed in `1d6777868`. **Blocking finding, from the author (Krashgamer, 11:24 and 15:54):** with `-RayTracing`, the default `LEONIDA_ALLOCATOR_RING=1` caused 3 of 6 device removals, against 0 of 6 on `main` and 0 of 2 with the ring off. They were hangs with 21 unfinished submissions, 100 to 220 s into the world. A switch-only experiment points at several recordings sharing one allocator. The author is preparing a new version with one allocator per recording. None of the posted in-game passes covers ray tracing, so none of them clears this. **Review notes (`host/recorders.rs`, `list.rs`):** - Pooling allocators is the right direction for the memory win. - D3D12 requires that a command allocator is not reset while any list recorded from it is still executing, and that only one list records into it at a time. Sharing one allocator across recordings that finish and submit on different schedules makes that bookkeeping fragile. That fits the hang the author measured. The planned "one recording per allocator, released after its submission's fence" matches the API's contract. Verdict: **defects** (device removals with ray tracing, confirmed by the author). Wait for the new head and re-run the gate with `-RayTracing`. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
Krashgamer commented 2026-12-02 19:32:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-02T19:32:42Z.


@MoonEyes the new head is up: 8df1bfce7 (one recording per pooled allocator), rebased on main 5b1fff821, which merges cleanly into today's main. Gate runs of this head:

  • Head / base: 8df1bfce7 on main 5b1fff821, built diagnostics,mimalloc (build-nvidia.ps1).
  • Machine: RTX 3080 10 GB, driver 32.0.16.1088 (610.88), Windows 11 Pro 26200, i7-10700K, 32 GB RAM. Series X, 2560x1440, the same save each run.
-RayTracing (where the first version hung) world device lost / crashes fps median private bytes at most
run 1 306 s 0 / 0 14.4 31,402 MB
run 2 304 s 0 / 0 15.1 30,761 MB
run 3 306 s 0 / 0 12.6 31,434 MB
run 4 305 s 0 / 0 11.6 31,337 MB

All four PASS. With the 8 runs of the earlier equivalent build, 0 of 12 hung, against 5 of 15 with the shared version. (main with -RayTracing on this PC: 11.5-14.8 fps, 32.6 GB private.)

Against main 5b1fff821, alternating, all PASS, no device loss:

main this head
ray tracing off: private at most 27,574 / 27,569 MB 26,187 / 25,965 MB
ray tracing off: fps median 24.5 / 24.1 24.7 / 24.2
-HardwareRT (one complete run each): private / fps 27,926 MB / 21.1 26,967 MB / 21.3

The description is updated with the design change, these numbers and the review fixes.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7356342708 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7356342708). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-02T19:32:42Z. --- @MoonEyes the new head is up: `8df1bfce7` (one recording per pooled allocator), rebased on `main` `5b1fff821`, which merges cleanly into today's `main`. Gate runs of this head: - **Head / base:** `8df1bfce7` on `main` `5b1fff821`, built `diagnostics,mimalloc` (`build-nvidia.ps1`). - **Machine:** RTX 3080 10 GB, driver 32.0.16.1088 (610.88), Windows 11 Pro 26200, i7-10700K, 32 GB RAM. Series X, 2560x1440, the same save each run. | `-RayTracing` (where the first version hung) | world | device lost / crashes | fps median | private bytes at most | |---|---|---|---|---| | run 1 | 306 s | 0 / 0 | 14.4 | 31,402 MB | | run 2 | 304 s | 0 / 0 | 15.1 | 30,761 MB | | run 3 | 306 s | 0 / 0 | 12.6 | 31,434 MB | | run 4 | 305 s | 0 / 0 | 11.6 | 31,337 MB | All four PASS. With the 8 runs of the earlier equivalent build, 0 of 12 hung, against 5 of 15 with the shared version. (`main` with `-RayTracing` on this PC: 11.5-14.8 fps, 32.6 GB private.) Against `main` `5b1fff821`, alternating, all PASS, no device loss: | | main | this head | |---|---|---| | ray tracing off: private at most | 27,574 / 27,569 MB | 26,187 / 25,965 MB | | ray tracing off: fps median | 24.5 / 24.1 | 24.7 / 24.2 | | `-HardwareRT` (one complete run each): private / fps | 27,926 MB / 21.1 | 26,967 MB / 21.3 | The description is updated with the design change, these numbers and the review fixes. AI-assisted (Claude Code, Claude Opus 5.5).
icdmkg2 commented 2026-12-02 20:22:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by icdmkg2 on 2026-12-02T20:22:12Z.


Third-party Windows verification of #3031 (D3D12-COMMAND-ALLOCATOR-RING) on head 8df1bfce7

  • Head / base: 8df1bfce714bdfd21f9a8ddcc3231d7dfa2357c0 merged cleanly (git merge --no-ff) onto origin/main b41763227.
  • Machine: NVIDIA GeForce RTX 5060 Laptop GPU (8 GB, Profile M laptop), driver 621.24 (32.0.16.2124), AMD Ryzen 7 H 260 w/ Radeon 780M, 32 GB RAM, Windows 11 10.0.26300.9974, rustc 1.98.1.
  • Scope: synthetic / D3D12 hardware + debug-layer + WARP + replay tests (no retail title run).

Results (MEASURED)

Check Result
python -I scripts/check_no_game_data.py (all 5 touched files) exit 0
python -I tools/d3d12_switches.py --check d3d12/docs/switches.md exit 0
python -I tests/test_d3d12_switches.py 20/20 OK
python -I scripts/red_green.py 3031 --mutate green: 767 passed, 0 failed in leonida-gpu; red: red does not build (cannot find module or crate recorders, expected for new host/recorders.rs)
LEONIDA_ADAPTER=5060 cargo test -p leonida-gpu --features diagnostics --locked --lib -- recorders:: lists_record --nocapture 6 passed, 0 failed (200 lists recorded in turn: private bytes grew 71 MB)
LEONIDA_ADAPTER=5060 + LEONIDA_D3D12_DEBUG=1 (same filter, --features diagnostics) 6 passed, 0 failed (200 lists recorded in turn: private bytes grew 71 MB)
LEONIDA_ADAPTER=5060 + LEONIDA_ALLOCATOR_RING=0 cargo test -p leonida-gpu --features diagnostics --locked --lib -- host::tests:: --skip depth_bounds_pipeline_loads_and_filters_draws 68 passed, 0 failed, 1 ignored (fallback home-slot path)
LEONIDA_D3D12_WARP=1 + LEONIDA_D3D12_DEBUG=1 (same recorders:: lists_record filter, --features diagnostics) 6 passed, 0 failed (200 lists recorded in turn: private bytes grew 6 MB)
LEONIDA_ADAPTER=5060 cargo test -p leonida-gpu --features diagnostics --test replay --locked 1 passed, 0 failed

Code review notes (READ IN CODE)

  • host/recorders.rs: one recording per pooled allocator (!slot.used assertion in begin_in), ID3D12CommandAllocator::Reset and forgotten allocator drops execute outside the RING mutex while slot.resetting guards the slot.
  • host.rs Drop for HostList: closes any still-open recording before retiring recordings behind in-flight submissions and forgetting home slots.

AI-assisted: Gemini 4 Neon (High) via Antigravity (test execution, diff review, and write-up).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7357627632 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7357627632). Originally posted by [icdmkg2](https://github.com/icdmkg2) on 2026-12-02T20:22:12Z. --- **Third-party Windows verification of #3031 (`D3D12-COMMAND-ALLOCATOR-RING`) on head `8df1bfce7`** - **Head / base:** `8df1bfce714bdfd21f9a8ddcc3231d7dfa2357c0` merged cleanly (`git merge --no-ff`) onto `origin/main` `b41763227`. - **Machine:** NVIDIA GeForce RTX 5060 Laptop GPU (8 GB, Profile M laptop), driver `621.24` (`32.0.16.2124`), AMD Ryzen 7 H 260 w/ Radeon 780M, 32 GB RAM, Windows 11 `10.0.26300.9974`, `rustc 1.98.1`. - **Scope:** synthetic / D3D12 hardware + debug-layer + WARP + replay tests (no retail title run). ### Results (MEASURED) | Check | Result | |---|---| | `python -I scripts/check_no_game_data.py` (all 5 touched files) | exit `0` | | `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` | exit `0` | | `python -I tests/test_d3d12_switches.py` | `20/20` OK | | `python -I scripts/red_green.py 3031 --mutate` | green: `767` passed, `0` failed in `leonida-gpu`; red: `red does not build` (`cannot find module or crate recorders`, expected for new `host/recorders.rs`) | | `LEONIDA_ADAPTER=5060` `cargo test -p leonida-gpu --features diagnostics --locked --lib -- recorders:: lists_record --nocapture` | `6 passed, 0 failed` (`200 lists recorded in turn: private bytes grew 71 MB`) | | `LEONIDA_ADAPTER=5060` + `LEONIDA_D3D12_DEBUG=1` (same filter, `--features diagnostics`) | `6 passed, 0 failed` (`200 lists recorded in turn: private bytes grew 71 MB`) | | `LEONIDA_ADAPTER=5060` + `LEONIDA_ALLOCATOR_RING=0` `cargo test -p leonida-gpu --features diagnostics --locked --lib -- host::tests:: --skip depth_bounds_pipeline_loads_and_filters_draws` | `68 passed, 0 failed, 1 ignored` (fallback home-slot path) | | `LEONIDA_D3D12_WARP=1` + `LEONIDA_D3D12_DEBUG=1` (same `recorders:: lists_record` filter, `--features diagnostics`) | `6 passed, 0 failed` (`200 lists recorded in turn: private bytes grew 6 MB`) | | `LEONIDA_ADAPTER=5060` `cargo test -p leonida-gpu --features diagnostics --test replay --locked` | `1 passed, 0 failed` | ### Code review notes (READ IN CODE) - `host/recorders.rs`: one recording per pooled allocator (`!slot.used` assertion in `begin_in`), `ID3D12CommandAllocator::Reset` and forgotten allocator drops execute outside the `RING` mutex while `slot.resetting` guards the slot. - `host.rs` `Drop for HostList`: closes any still-open recording before retiring `recordings` behind in-flight submissions and forgetting home slots. AI-assisted: Gemini 4 Neon (High) via Antigravity (test execution, diff review, and write-up).
EdenBendheim commented 2026-12-02 21:02:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-12-02T21:02:32Z.


RUN (in-game RTX 3090 300 s stress gate, 14-PR combined batch) — PASS covering exact head 8df1bfce714bdfd21f9a8ddcc3231d7dfa2357c0.

  • Base & build: Merged cleanly via git merge --no-ff onto main b41763227 (diagnostics,dlss,mimalloc, exe_sha16 = c47eeb717f761d9d; changed-file clean-room scan exit 0; standalone build exe_sha16 = 7b41ce21b88a6c45 also compiled and passed targeted checks cleanly). Allocator pooling was active by default (LEONIDA_ALLOCATOR_RING on).
  • Batch heads (14 PRs): #3200 d1a91afd1, #3198 80a627bb1, #3191 93b47ac9d, #3189 c182fc392, #3176 ae0075d9a, #3168 337388052, #3164 1065952da, #3146 ebc0253ff, #3124 64600ef0c, #3069 311d33a40, #3031 8df1bfce7, #3029 e49404808, #3054 ff53fd8b9, #3010 d645712a3.
  • Hardware & setup: Windows 11, Ryzen 9 5900X (32 GB RAM), NVIDIA GeForce RTX 3090 24 GB, driver 610.88, Series X profile, 2560x1440, -NoFrameGen, scripts/game-gate.ps1 (301.3 s in world) with downtown street-level teleport + 8-leg dynamic sprint/turn/strafe stress mod (GATE CONTROL moved=2.51 m, max_from_ctrl=5,053.9 m).
Metric 14-PR Batch (c47eeb717f761d9d) main b41763227 baseline (cf499737bf684f6a)
Gate verdict / exit PASS (clean, 0 reasons, 0 warnings) PASS (clean, 0 reasons, 0 warnings)
World time 301.3 s (4,504 frames) 305.6 s
Device lost / crashes / missed pipeline waits 0 / 0 / 0 0 / 0 / 0
Rendered FPS (median) / p95 frame time 20.10 FPS / 69.76 ms 19.13 FPS / 74.01 ms
Median draws/frame / longest present gap 8,048 / 5.222 s 7,983 / 2.358 s

Verdict: PASS for the 300 s in-game stability gate on 8df1bfce7. (Single combined-batch stability check, not an isolated LEONIDA_ALLOCATOR_RING=1 vs 0 FPS gain measurement.)

(AI-assisted verification: gemini-4-neon + gpt-6.2-astra.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7358703703 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7358703703). Originally posted by [EdenBendheim](https://github.com/EdenBendheim) on 2026-12-02T21:02:32Z. --- **RUN (in-game RTX 3090 300 s stress gate, 14-PR combined batch)** — **PASS** covering exact head `8df1bfce714bdfd21f9a8ddcc3231d7dfa2357c0`. - **Base & build:** Merged cleanly via `git merge --no-ff` onto `main` `b41763227` (`diagnostics,dlss,mimalloc`, `exe_sha16 = c47eeb717f761d9d`; changed-file clean-room scan exit `0`; standalone build `exe_sha16 = 7b41ce21b88a6c45` also compiled and passed targeted checks cleanly). Allocator pooling was active by default (`LEONIDA_ALLOCATOR_RING` on). - **Batch heads (`14` PRs):** `#3200` `d1a91afd1`, `#3198` `80a627bb1`, `#3191` `93b47ac9d`, `#3189` `c182fc392`, `#3176` `ae0075d9a`, `#3168` `337388052`, `#3164` `1065952da`, `#3146` `ebc0253ff`, `#3124` `64600ef0c`, `#3069` `311d33a40`, `#3031` `8df1bfce7`, `#3029` `e49404808`, `#3054` `ff53fd8b9`, `#3010` `d645712a3`. - **Hardware & setup:** Windows 11, Ryzen 9 5900X (32 GB RAM), NVIDIA GeForce RTX 3090 24 GB, driver `610.88`, Series X profile, `2560x1440`, `-NoFrameGen`, `scripts/game-gate.ps1` (`301.3 s` in world) with downtown street-level teleport + 8-leg dynamic sprint/turn/strafe stress mod (`GATE CONTROL moved=2.51 m`, `max_from_ctrl=5,053.9 m`). | Metric | 14-PR Batch (`c47eeb717f761d9d`) | `main` `b41763227` baseline (`cf499737bf684f6a`) | |---|---:|---:| | Gate verdict / exit | **PASS** (`clean`, `0` reasons, `0` warnings) | **PASS** (`clean`, `0` reasons, `0` warnings) | | World time | `301.3 s` (`4,504` frames) | `305.6 s` | | Device lost / crashes / missed pipeline waits | `0` / `0` / `0` | `0` / `0` / `0` | | Rendered FPS (median) / p95 frame time | `20.10 FPS` / `69.76 ms` | `19.13 FPS` / `74.01 ms` | | Median draws/frame / longest present gap | `8,048` / `5.222 s` | `7,983` / `2.358 s` | **Verdict:** **PASS** for the 300 s in-game stability gate on `8df1bfce7`. *(Single combined-batch stability check, not an isolated `LEONIDA_ALLOCATOR_RING=1` vs `0` FPS gain measurement.)* *(AI-assisted verification: `gemini-4-neon` + `gpt-6.2-astra`.)*
fiestorra commented 2026-12-02 22:23:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T22:23:15Z.


VERIFY-3031 — Windows nativo: las cuatro pruebas de las grabaciones pasan, y el control muerde

Head (this PR)
Merge base 5b1fff821 (behind main b41763227)
Merged onto main — merge-tree clean, git merge --no-ff clean (auto-merged findings.md and switches.md)

Ran

cargo test -p leonida-gpu --lib recorders     4 passed; 0 failed
  host::recorders::tests::a_recording_has_its_allocator_to_itself_until_it_is_over ... ok
  host::recorders::tests::a_slot_being_reset_is_nobody_elses ... ok
  host::recorders::tests::a_home_slot_is_nobody_elses_and_goes_with_its_owner ... ok
  host::recorders::tests::a_recording_still_open_keeps_its_allocator_from_a_reset ... ok

Negative control (synthetic): I put a resetting slot back into the free list (self.empty.push(at) right after slot.resetting = true), rebuilt and ran:

FAILED: a_slot_being_reset_is_nobody_elses
FAILED: a_home_slot_is_nobody_elses_and_goes_with_its_owner
assertion failed: !slot.recording && !slot.resetting && (slot.home || !slot.used)

Two of the four bite, and the second one trips the debug_assert in begin_in rather than an assertion of the test — the invariant is defended twice, which is the right shape for state shared between the title's thread and the runtime's.

What the change is, from the new module: host/recorders.rs gives each recording a pooled command allocator of its own until it is over, takes a slot out of circulation while it resets, keeps a home slot with its owner, and refuses to hand a still-open recording's allocator to a reset. The 601 changed lines in host.rs are the wiring I did not review line by line — I read the module and its tests, not that diff.

What I could not test

  • The amplification under the title: the whole point is allocator pressure in long sessions, and no game run was made.
  • The host.rs rework: merged and compiled, not reviewed.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7360622290 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7360622290). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-02T22:23:15Z. --- ## VERIFY-3031 — Windows nativo: las cuatro pruebas de las grabaciones pasan, y el control muerde | | | |---|---| | Head | `(this PR)` | | Merge base | `5b1fff821` (behind `main` `b41763227`) | | Merged onto | `main` — `merge-tree` clean, `git merge --no-ff` clean (auto-merged `findings.md` and `switches.md`) | **Ran** ``` cargo test -p leonida-gpu --lib recorders 4 passed; 0 failed host::recorders::tests::a_recording_has_its_allocator_to_itself_until_it_is_over ... ok host::recorders::tests::a_slot_being_reset_is_nobody_elses ... ok host::recorders::tests::a_home_slot_is_nobody_elses_and_goes_with_its_owner ... ok host::recorders::tests::a_recording_still_open_keeps_its_allocator_from_a_reset ... ok ``` **Negative control (synthetic)**: I put a resetting slot back into the free list (`self.empty.push(at)` right after `slot.resetting = true`), rebuilt and ran: ``` FAILED: a_slot_being_reset_is_nobody_elses FAILED: a_home_slot_is_nobody_elses_and_goes_with_its_owner assertion failed: !slot.recording && !slot.resetting && (slot.home || !slot.used) ``` **Two of the four bite**, and the second one trips the `debug_assert` in `begin_in` rather than an assertion of the test — the invariant is defended twice, which is the right shape for state shared between the title's thread and the runtime's. **What the change is, from the new module**: `host/recorders.rs` gives each recording **a pooled command allocator of its own** until it is over, takes a slot out of circulation while it resets, keeps a home slot with its owner, and refuses to hand a still-open recording's allocator to a reset. **The 601 changed lines in `host.rs` are the wiring I did not review line by line** — I read the module and its tests, not that diff. ## What I could not test - **The amplification under the title**: the whole point is allocator pressure in long sessions, and no game run was made. - **The `host.rs` rework**: merged and compiled, not reviewed. Written with an AI assistant.
MoonEyes commented 2026-12-03 03:43:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T03:43:38Z.


RUN (in game, batch of three pull requests), each head merged with git merge --no-ff onto main 516c9eaab, in one build: #3031 4e59d46e8, #3284 f9c588760, #3286 8c56cb6b9. 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.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 17.1, mean 17.1
Rendered fps, last 120 s median 16.8
Time under 5 fps in the world 0 %

For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are 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.

Limits: one run; arrival in the world was driven by keys and not checked on pictures; -PrecompileUsed was used, so the default start (every known pipeline precompiled) was not exercised. #3031 was in an earlier batch on another head; this run covers its current head. #3284 changes what is written to the pipeline book; whether a later start reuses it was not checked. #3286's card selection only matters when the PC has more than one card to pick from, and its build-script change was not exercised: this run covers the default path on one dedicated card.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7366870168 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7366870168). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T03:43:38Z. --- RUN (in game, batch of three pull requests), each head merged with `git merge --no-ff` onto main `516c9eaab`, in one build: #3031 `4e59d46e8`, #3284 `f9c588760`, #3286 `8c56cb6b9`. 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. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 17.1, mean 17.1 | | Rendered fps, last 120 s | median 16.8 | | Time under 5 fps in the world | 0 % | For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are 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. Limits: one run; arrival in the world was driven by keys and not checked on pictures; `-PrecompileUsed` was used, so the default start (every known pipeline precompiled) was not exercised. #3031 was in an earlier batch on another head; this run covers its current head. #3284 changes what is written to the pipeline book; whether a later start reuses it was not checked. #3286's card selection only matters when the PC has more than one card to pick from, and its build-script change was not exercised: this run covers the default path on one dedicated card. AI-assisted (Claude Code).
OtavMacedo commented 2026-12-03 12:39:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OtavMacedo on 2026-12-03T12:39:38Z.


In-game two-build ABBA of this pull request on profile M: 8 GB card, 16 GB PC. One variable: head 4e59d46e8 (its merge base is 516c9eaab) on top of the same base, against the base alone. Numbers recomputed from summary.json/memory.csv by a separate agent.

RUN verify-3031-m | 2026-12-03 11:14-12:45 UTC | OtavMacedo | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        A = 0c3f53ae3 (main 516c9eaab + #3258) | B = A + #3031 4e59d46e8 (a9450cb65) | build diagnostics,dlss,mimalloc, separate checkouts and data folders
MACHINE:     NVIDIA GeForce RTX 3070 8 GB, desktop | 621.24 | Windows 11 | 16 GB RAM, 24 GB fixed page file
RECIPE:      scripts/game-abba.ps1 (#3305) two-build mode + game gate, Series X, -Resolution 1080, -NoFrameGen, standing (gate_driver idle), 300 s in the world, 4 pairs, launcher default LEONIDA_WINDOWS_BAR_MB=3072 | gate -StopPrivateMB 27000 -StopOverBudgetSeconds 0 | prologue save
OS/DRIVER:   Developer Mode on
TARGET:      private bytes, memory left to commit, world median frame time | PREDICTED: B private 1-3 GB lower, frame time no clear difference
MEASURED:    see below | 12 gate runs, all PASS, 301-307 s in the world
END:         time limit in all 12; no device loss, no 0x8007000E
CACHES:      warm in both data folders (83,557 pipelines made before, 7 to make per run); 2 warm-ups + 2 discarded runs first
INSTRUMENTS: none beyond the gate's memory sampling
VERDICT:     direction held, size missed (about 0.75 GB, not 1-3); frame time held (no clear difference)

Paired, B−A (MEASURED, 4 pairs, all 4 the same sign for the memory rows):

Mean effect 95 % interval
Private bytes at most −752 MB (−3.0 %) −1,232 to −271
Private bytes 240 s into the world −764 MB (−3.1 %) −926 to −601
Least memory left to commit +718 MB +343 to +1,093
World median frame time +0.49 ms (+1.1 %) −5.02 to +6.01: no clear difference

Ranges over the 8 measured runs, A / B:

  • Private at most: 24,680–24,912 / 23,691–24,425 MB.
  • Least left to commit: 837–980 / 1,365–1,925 MB. On this PC that is the line runs end on, so B nearly doubles the headroom.
  • Fps median: 21.68–23.45 / 20.71–24.08.

One thing to watch, not a finding:

  • Longest present gap per run: A 1.00–1.82 s; B 1.35–4.62 s. The two larger B values are both in the last two B runs. Those runs, and the last A run, are also the slowest; the slowdown starts at run 9 in both arms, so it may be drift.
  • A first attempt stopped at its discarded B run on a 10.2 s gap 49 s into the world. Its A warm-up had 8.2 s, so gaps near arrival happen in both arms, and the rerun's discarded B run had 1.7 s.
  • With n this small I don't read the gaps as caused by this change. If someone sees hitches on arrival with it, this is where to look.

AI-assisted: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7378647676 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7378647676). Originally posted by [OtavMacedo](https://github.com/OtavMacedo) on 2026-12-03T12:39:38Z. --- In-game two-build ABBA of this pull request on profile M: 8 GB card, 16 GB PC. One variable: head `4e59d46e8` (its merge base is `516c9eaab`) on top of the same base, against the base alone. Numbers recomputed from `summary.json`/`memory.csv` by a separate agent. ``` RUN verify-3031-m | 2026-12-03 11:14-12:45 UTC | OtavMacedo | AI-assisted: Claude Code (Claude Opus 5.5) BASE: A = 0c3f53ae3 (main 516c9eaab + #3258) | B = A + #3031 4e59d46e8 (a9450cb65) | build diagnostics,dlss,mimalloc, separate checkouts and data folders MACHINE: NVIDIA GeForce RTX 3070 8 GB, desktop | 621.24 | Windows 11 | 16 GB RAM, 24 GB fixed page file RECIPE: scripts/game-abba.ps1 (#3305) two-build mode + game gate, Series X, -Resolution 1080, -NoFrameGen, standing (gate_driver idle), 300 s in the world, 4 pairs, launcher default LEONIDA_WINDOWS_BAR_MB=3072 | gate -StopPrivateMB 27000 -StopOverBudgetSeconds 0 | prologue save OS/DRIVER: Developer Mode on TARGET: private bytes, memory left to commit, world median frame time | PREDICTED: B private 1-3 GB lower, frame time no clear difference MEASURED: see below | 12 gate runs, all PASS, 301-307 s in the world END: time limit in all 12; no device loss, no 0x8007000E CACHES: warm in both data folders (83,557 pipelines made before, 7 to make per run); 2 warm-ups + 2 discarded runs first INSTRUMENTS: none beyond the gate's memory sampling VERDICT: direction held, size missed (about 0.75 GB, not 1-3); frame time held (no clear difference) ``` Paired, B−A (MEASURED, 4 pairs, all 4 the same sign for the memory rows): | | Mean effect | 95 % interval | |---|---|---| | Private bytes at most | −752 MB (−3.0 %) | −1,232 to −271 | | Private bytes 240 s into the world | −764 MB (−3.1 %) | −926 to −601 | | Least memory left to commit | +718 MB | +343 to +1,093 | | World median frame time | +0.49 ms (+1.1 %) | −5.02 to +6.01: no clear difference | Ranges over the 8 measured runs, A / B: - **Private at most:** 24,680–24,912 / 23,691–24,425 MB. - **Least left to commit:** 837–980 / 1,365–1,925 MB. On this PC that is the line runs end on, so B nearly doubles the headroom. - **Fps median:** 21.68–23.45 / 20.71–24.08. One thing to watch, not a finding: - **Longest present gap per run:** A 1.00–1.82 s; B 1.35–4.62 s. The two larger B values are both in the last two B runs. Those runs, and the last A run, are also the slowest; the slowdown starts at run 9 in both arms, so it may be drift. - **A first attempt stopped at its discarded B run** on a 10.2 s gap 49 s into the world. Its A warm-up had 8.2 s, so gaps near arrival happen in both arms, and the rerun's discarded B run had 1.7 s. - With n this small I don't read the gaps as caused by this change. If someone sees hitches on arrival with it, this is where to look. AI-assisted: Claude Code (Claude Opus 5.5).
Krashgamer commented 2026-12-03 12:55:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-03T12:55:01Z.


@OtavMacedo thank you, that is the size of PC and card I could not measure, and a cleaner comparison than mine. I have added it to the description. About the gaps near arrival: I will compare the longest gaps of my own runs with and without it and post them if they say anything, since both arms of yours have them.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7379035945 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7379035945). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-03T12:55:01Z. --- @OtavMacedo thank you, that is the size of PC and card I could not measure, and a cleaner comparison than mine. I have added it to the description. About the gaps near arrival: I will compare the longest gaps of my own runs with and without it and post them if they say anything, since both arms of yours have them. AI-assisted (Claude Code, Claude Opus 5.5).
merzleckeier commented 2026-12-03 13:43:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T13:43:40Z.


I checked the pending-submission case on 149231a4 merged onto b053a181. A synthetic test queued eight copy lists behind a private D3D12 fence via Host::execute_late, then opened a ninth list while the fence was held. Its allocator differed from all eight pending allocators. After releasing the fence, all eight GPU readbacks matched.

After the normal reaper returned the lists, the next batch used all eight original allocator slots with LEONIDA_ALLOCATOR_RING=1. The per-list control (0) reused zero. All 12 runs passed (three per mode per adapter, AMD Raphael/RADV and RTX 4070 SUPER, Wine 11.22 / VKD3D-Proton 3.1.0). I used LEONIDA_LATE_WAIT=3 and LEONIDA_BURY_LAG=0. The test waits for the pool to return the slots after the fence because recycling runs asynchronously. The four existing recorder unit tests also passed.

AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7380283549 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7380283549). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T13:43:40Z. --- I checked the pending-submission case on `149231a4` merged onto `b053a181`. A synthetic test queued eight copy lists behind a private D3D12 fence via `Host::execute_late`, then opened a ninth list while the fence was held. Its allocator differed from all eight pending allocators. After releasing the fence, all eight GPU readbacks matched. After the normal reaper returned the lists, the next batch used all eight original allocator slots with `LEONIDA_ALLOCATOR_RING=1`. The per-list control (`0`) reused zero. All 12 runs passed (three per mode per adapter, AMD Raphael/RADV and RTX 4070 SUPER, Wine 11.22 / VKD3D-Proton 3.1.0). I used `LEONIDA_LATE_WAIT=3` and `LEONIDA_BURY_LAG=0`. The test waits for the pool to return the slots after the fence because recycling runs asynchronously. The four existing recorder unit tests also passed. AI-assisted (Codex).
Krashgamer commented 2026-12-03 13:55:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Krashgamer on 2026-12-03T13:55:27Z.


@merzleckeier thank you. That covers the case I worry about most (a list that is not over yet keeps its allocator to itself) on two more adapters, and the 0 against 8 reuse shows that the switch does what it says. Nothing to change on my side.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7380605104 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3031#issuecomment-7380605104). Originally posted by [Krashgamer](https://github.com/Krashgamer) on 2026-12-03T13:55:27Z. --- @merzleckeier thank you. That covers the case I worry about most (a list that is not over yet keeps its allocator to itself) on two more adapters, and the 0 against 8 reuse shows that the switch does what it says. Nothing to change on my side. AI-assisted (Claude Code, Claude Opus 5.5).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3031:upstream-pr/3031'
git switch 'upstream-pr/3031'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3031'
git switch 'upstream-pr/3031'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3031'
git switch 'upstream-pr/3031'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3031'
git switch 'main'
git merge --squash 'upstream-pr/3031'
git switch 'main'
git merge --ff-only 'upstream-pr/3031'
git switch 'main'
git merge 'upstream-pr/3031'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
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!3031
No description provided.