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

Closed
leonida/mandy
Krashgamer wants to merge 5 commits from github-pr/3031 into main

Pull request closed

Please reopen this pull request to perform a merge.

Krashgamer commented 2026-12-02 02:43:30 +00:00

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

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

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).

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

@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).

@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

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).

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

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).

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

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).

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

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).

**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

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).

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

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.

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

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).

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

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)

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

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

**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

@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).

@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

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).

**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

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.)

**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

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.

## 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

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).

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

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).

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

@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).

@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

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).

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

@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).

@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).
First-time contributor

TAKEN | Otavmacedo | ETA 2026-12-04 11:00 UTC | AI-assisted: Claude Code (Claude Opus 5.5)

Asked on #3434 (comment 25388): this PR on the save where the story scene gets stuck on an 8 GB card. NVIDIA RTX 3070 8 GB desktop, driver 621.47, Ryzen 7 5700X, 16 GB RAM, fixed 24 GB page file, Windows 11.

  • BUILD: same executable for A and B: current main 863694e28 + this PR's head 0edc09ac2 (clean merge), diagnostics,dlss,mimalloc.
  • RECIPE: d3d12/docs/windows-memory.md's 8 GB profile (-SeriesS -Resolution 540 -NoFrameGen -NoSmoothMotion, LEONIDA_FPS_CAP=30); gate runs from one save, mods/gate_driver idle, 600 s in the world (the transition of #3434 comes at about 6 minutes), memory stops widened.
  • VARIABLE: LEONIDA_ALLOCATOR_RING | A = 0 (one allocator per list, as before) | B = unset (the PR's default, pooled). A discarded warm-up, then A B B A B A (three a side: on this PC about 1 run in 3 of 600 s loses the device on any build, #2821).
  • SEND BACK: per run, private and in-memory peaks, least commit left, video memory over budget, fps median and p5, device kept or not, and whether the scene after the transition started (the #3434 signature).
TAKEN | Otavmacedo | ETA 2026-12-04 11:00 UTC | AI-assisted: Claude Code (Claude Opus 5.5) Asked on #3434 (comment 25388): this PR on the save where the story scene gets stuck on an 8 GB card. NVIDIA RTX 3070 8 GB desktop, driver 621.47, Ryzen 7 5700X, 16 GB RAM, fixed 24 GB page file, Windows 11. - BUILD: same executable for A and B: current `main` 863694e28 + this PR's head 0edc09ac2 (clean merge), `diagnostics,dlss,mimalloc`. - RECIPE: d3d12/docs/windows-memory.md's 8 GB profile (`-SeriesS -Resolution 540 -NoFrameGen -NoSmoothMotion`, `LEONIDA_FPS_CAP=30`); gate runs from one save, `mods/gate_driver` idle, 600 s in the world (the transition of #3434 comes at about 6 minutes), memory stops widened. - VARIABLE: `LEONIDA_ALLOCATOR_RING` | A = 0 (one allocator per list, as before) | B = unset (the PR's default, pooled). A discarded warm-up, then A B B A B A (three a side: on this PC about 1 run in 3 of 600 s loses the device on any build, #2821). - SEND BACK: per run, private and in-memory peaks, least commit left, video memory over budget, fps median and p5, device kept or not, and whether the scene after the transition started (the #3434 signature).
First-time contributor

DONE | the A/B taken above | AI-assisted: Claude Code (Claude Opus 5.5)

Short: on this 16 GB / 8 GB PC the pooled allocators lowered the private peak by about 1 GB (22.1 against 23.1 GB, means of three) and left about 0.9 GB more to commit, at the same frame rate; all six runs kept the device; and the stuck story scene of #3434 happened in all six, with and without it. PROVISIONAL (n=3 per arm).

  • BUILD: same executable for A and B: current main 863694e28 + this PR's head 0edc09ac2 (clean merge), diagnostics,dlss,mimalloc.
  • WHERE: built in a worktree, run from my main checkout's folder (the executable copied there for these runs, the gate's exe_sha16 the same in all seven; their run.commit reads 4d9e4d05d, the checkout the gate ran from, not the build's): on this PC the device loss depends on the folder the executable runs from (#2821, comment 25546), and that folder is where it held.
  • MACHINE: NVIDIA GeForce RTX 3070 8 GB desktop, driver 621.47, Windows 11 Pro 26200, Ryzen 7 5700X, 16 GB RAM, fixed 24 GB page file. Profile M.
  • RECIPE: -SeriesS -Resolution 540 -NoFrameGen -NoSmoothMotion, LEONIDA_FPS_CAP=30; gate runs from one save, mods/gate_driver idle, 600 s in the world, memory stops widened. A discarded warm-up (B, 300 s), then A B B A B A.
  • The switch, as the logs show it: in every B run the line command allocators lists record into (LEONIDA_ALLOCATOR_RING): … (B1's last: 1239 pooled, 371 empty, 868 with a recording not over, of them 396 begun over 60 s ago; 1239 made since the start); in no A run.
Run LEONIDA_ALLOCATOR_RING End In the world fps median / p5 Frame p95 Longest gap Private peak In-memory peak Least commit left Video memory peak / budget Over budget Scene
warm-up unset target (300 s), PASS 302 s 28.8 / 12.6 79.7 ms 1.2 s 22,758 MB 13,912 MB 5,488 MB 7,495 / 7,159 MB 15.7 s n/a
A1 0 target, PASS 608 s 25.5 / 14.4 69.4 ms 1.0 s 23,010 MB 13,231 MB 5,248 MB 7,378 / 7,206 MB 322.7 s stuck
B1 unset target, PASS 602 s 25.9 / 14.8 67.5 ms 1.5 s 22,151 MB 11,879 MB 5,978 MB 7,317 / 7,176 MB 81.9 s stuck
B2 unset target, PASS 606 s 25.7 / 14.4 69.3 ms 1.9 s 21,827 MB 13,147 MB 6,303 MB 7,171 / 7,168 MB 16.2 s stuck
A2 0 target, PASS 608 s 25.6 / 14.1 71.0 ms 1.5 s 23,201 MB 13,248 MB 4,992 MB 7,386 / 7,195 MB 317.9 s stuck
B3 unset target, PASS 602 s 25.8 / 14.4 69.6 ms 0.8 s 22,357 MB 13,089 MB 5,816 MB 7,383 / 7,195 MB 312.8 s stuck
A3 0 target, PASS 603 s 25.1 / 14.1 71.2 ms 0.8 s 23,042 MB 12,936 MB 5,142 MB 7,376 / 7,195 MB 313.4 s stuck

(fps from presents after 60 s in the world, as summary.json gives them. "Scene": #3434's signature, from the gate driver's positions: stuck = the player stays at the same point about 1,400 m from control to the end.)

What the runs say, each tagged:

  • MEASURED (n=3 per arm): private peak 22,151 / 21,827 / 22,357 MB with the pool against 23,010 / 23,201 / 23,042 MB without (means 22,112 against 23,084, 973 MB less); least commit left 5,978 / 6,303 / 5,816 against 5,248 / 4,992 / 5,142 MB. #3434 mentioned about 2 GB less private memory; the PR's own measurements are on Series X (READ in host/recorders.rs's module notes); here, on Series S at 540, it is about 1 GB.
  • MEASURED: frame rate and pauses do not separate (median 25.7-25.9 against 25.1-25.6 fps, p5 14.4-14.8 against 14.1-14.4, longest gap 0.8-1.9 s on both sides).
  • MEASURED: video memory over-budget time does not separate either (B 82, 16 and 313 s; A 323, 318 and 313 s), nor the video memory peak (7.2-7.4 GB on both sides).
  • MEASURED (n=6): the device held in all six, and the warm-up.
  • MEASURED (n=6): the story scene after the transition did not start in any run, A or B. So on this PC about 1 GB less private memory does not unstick #3434's scene.

Not watched: the screen (the scene is classed by its signature).

GPUs tested: NVIDIA GeForce RTX 3070 8 GB, 621.47, Windows 11, profile M.

The figures were recomputed from the run records by a separate read-only agent before posting.

DONE | the A/B taken above | AI-assisted: Claude Code (Claude Opus 5.5) **Short: on this 16 GB / 8 GB PC the pooled allocators lowered the private peak by about 1 GB (22.1 against 23.1 GB, means of three) and left about 0.9 GB more to commit, at the same frame rate; all six runs kept the device; and the stuck story scene of #3434 happened in all six, with and without it.** PROVISIONAL (n=3 per arm). - BUILD: same executable for A and B: current `main` 863694e28 + this PR's head 0edc09ac2 (clean merge), `diagnostics,dlss,mimalloc`. - WHERE: built in a worktree, run from my main checkout's folder (the executable copied there for these runs, the gate's `exe_sha16` the same in all seven; their `run.commit` reads 4d9e4d05d, the checkout the gate ran from, not the build's): on this PC the device loss depends on the folder the executable runs from (#2821, comment 25546), and that folder is where it held. - MACHINE: NVIDIA GeForce RTX 3070 8 GB desktop, driver 621.47, Windows 11 Pro 26200, Ryzen 7 5700X, 16 GB RAM, fixed 24 GB page file. Profile M. - RECIPE: `-SeriesS -Resolution 540 -NoFrameGen -NoSmoothMotion`, `LEONIDA_FPS_CAP=30`; gate runs from one save, `mods/gate_driver` idle, 600 s in the world, memory stops widened. A discarded warm-up (B, 300 s), then A B B A B A. - The switch, as the logs show it: in every B run the line `command allocators lists record into (LEONIDA_ALLOCATOR_RING): …` (B1's last: 1239 pooled, 371 empty, 868 with a recording not over, of them 396 begun over 60 s ago; 1239 made since the start); in no A run. | Run | `LEONIDA_ALLOCATOR_RING` | End | In the world | fps median / p5 | Frame p95 | Longest gap | Private peak | In-memory peak | Least commit left | Video memory peak / budget | Over budget | Scene | |---|---|---|---|---|---|---|---|---|---|---|---|---| | warm-up | unset | target (300 s), PASS | 302 s | 28.8 / 12.6 | 79.7 ms | 1.2 s | 22,758 MB | 13,912 MB | 5,488 MB | 7,495 / 7,159 MB | 15.7 s | n/a | | A1 | 0 | target, PASS | 608 s | 25.5 / 14.4 | 69.4 ms | 1.0 s | 23,010 MB | 13,231 MB | 5,248 MB | 7,378 / 7,206 MB | 322.7 s | stuck | | B1 | unset | target, PASS | 602 s | 25.9 / 14.8 | 67.5 ms | 1.5 s | 22,151 MB | 11,879 MB | 5,978 MB | 7,317 / 7,176 MB | 81.9 s | stuck | | B2 | unset | target, PASS | 606 s | 25.7 / 14.4 | 69.3 ms | 1.9 s | 21,827 MB | 13,147 MB | 6,303 MB | 7,171 / 7,168 MB | 16.2 s | stuck | | A2 | 0 | target, PASS | 608 s | 25.6 / 14.1 | 71.0 ms | 1.5 s | 23,201 MB | 13,248 MB | 4,992 MB | 7,386 / 7,195 MB | 317.9 s | stuck | | B3 | unset | target, PASS | 602 s | 25.8 / 14.4 | 69.6 ms | 0.8 s | 22,357 MB | 13,089 MB | 5,816 MB | 7,383 / 7,195 MB | 312.8 s | stuck | | A3 | 0 | target, PASS | 603 s | 25.1 / 14.1 | 71.2 ms | 0.8 s | 23,042 MB | 12,936 MB | 5,142 MB | 7,376 / 7,195 MB | 313.4 s | stuck | (fps from presents after 60 s in the world, as `summary.json` gives them. "Scene": #3434's signature, from the gate driver's positions: stuck = the player stays at the same point about 1,400 m from control to the end.) What the runs say, each tagged: - MEASURED (n=3 per arm): private peak 22,151 / 21,827 / 22,357 MB with the pool against 23,010 / 23,201 / 23,042 MB without (means 22,112 against 23,084, 973 MB less); least commit left 5,978 / 6,303 / 5,816 against 5,248 / 4,992 / 5,142 MB. #3434 mentioned about 2 GB less private memory; the PR's own measurements are on Series X (READ in `host/recorders.rs`'s module notes); here, on Series S at 540, it is about 1 GB. - MEASURED: frame rate and pauses do not separate (median 25.7-25.9 against 25.1-25.6 fps, p5 14.4-14.8 against 14.1-14.4, longest gap 0.8-1.9 s on both sides). - MEASURED: video memory over-budget time does not separate either (B 82, 16 and 313 s; A 323, 318 and 313 s), nor the video memory peak (7.2-7.4 GB on both sides). - MEASURED (n=6): the device held in all six, and the warm-up. - MEASURED (n=6): the story scene after the transition did not start in any run, A or B. So on this PC about 1 GB less private memory does not unstick #3434's scene. Not watched: the screen (the scene is classed by its signature). GPUs tested: NVIDIA GeForce RTX 3070 8 GB, 621.47, Windows 11, profile M. The figures were recomputed from the run records by a separate read-only agent before posting.
Member

RUN: PASS on RTX 4070 Laptop 8 GB (driver 621.40, Windows 11), ABBA with LEONIDA_HW_RT=1.

  • A = main f70caeea4, B = main + this PR (head 0edc09ac2, merged with --no-ff).
  • Profile: Series X, -NoDlss -NoFrameGen -PrecompileUsed, LEONIDA_WINDOWS_BAR_MB=0, LEONIDA_TEXTURE_BUDGET_MB=1024.
  • Each run walked 300 s in the world (W plus J/L turns). The process's private bytes (commit) were sampled every 15 s.
run private bytes, max fps, median of the window title
A1 (main) 27.86 GB 18
B1 (PR) 26.49 GB 19
B2 (PR) 25.93 GB 19
A2 (main) 27.46 GB 19
  • Commit: -1.45 GB on average with the PR (27.66 vs 26.21 GB; MEASURED, n=2 per arm). That is the direction and size the PR claims (about 2 GB on its author's PC).
  • Frame rate: no cost; the medians are 18/19 vs 19/19.
  • Stability: 0 device lost and 0 crash across the 4 runs. Each log has one line that mentions 0x887A0005: it is #3437's "background shader work stays on" notice, not a loss.
  • Not measured: whether the pool keeps growing over a longer session. The judge noted the pool has no cap; 300 s doesn't show long-run growth.
**RUN: PASS** on RTX 4070 Laptop 8 GB (driver 621.40, Windows 11), ABBA with `LEONIDA_HW_RT=1`. - A = main `f70caeea4`, B = main + this PR (head `0edc09ac2`, merged with `--no-ff`). - Profile: Series X, `-NoDlss -NoFrameGen -PrecompileUsed`, `LEONIDA_WINDOWS_BAR_MB=0`, `LEONIDA_TEXTURE_BUDGET_MB=1024`. - Each run walked 300 s in the world (W plus J/L turns). The process's private bytes (commit) were sampled every 15 s. | run | private bytes, max | fps, median of the window title | |---|---|---| | A1 (main) | 27.86 GB | 18 | | B1 (PR) | 26.49 GB | 19 | | B2 (PR) | 25.93 GB | 19 | | A2 (main) | 27.46 GB | 19 | - **Commit:** -1.45 GB on average with the PR (27.66 vs 26.21 GB; MEASURED, n=2 per arm). That is the direction and size the PR claims (about 2 GB on its author's PC). - **Frame rate:** no cost; the medians are 18/19 vs 19/19. - **Stability:** 0 device lost and 0 crash across the 4 runs. Each log has one line that mentions 0x887A0005: it is #3437's "background shader work stays on" notice, not a loss. - Not measured: whether the pool keeps growing over a longer session. The judge noted the pool has no cap; 300 s doesn't show long-run growth.
First-time contributor

TAKEN | quentinop | ETA 2026-12-04 15:30 UTC | AI-assisted: write-up with Claude Opus 5.5 (High)

Whether this PR changes the device loss at world entry on an RDNA 2 card with the default LEONIDA_THIN=1 (#3264). AMD Radeon RX 6800 XT 16 GB desktop, driver 32.0.21045.29003, Ryzen 5 9600X, 32 GB RAM, Windows 11. Profile M.

  • BUILD: this PR's head 0edc09ac2 as is, built with d3d12/scripts/build-nvidia.ps1.
  • RECIPE: game gate (docs/game_gate.md) with -SeriesS, 300 s in the world, from one save, played by hand on the same route in both runs (Jason's first mission, boat to plane).
  • VARIABLE: LEONIDA_THIN | A = unset (the default, 1) | B = 0. One run each, A then B.
  • PREDICTED: A FAIL with device_lost a few seconds after the world first draws, as on main 68427be7e; B PASS at about main's frame rate (19.9 fps mean there).
  • SEND BACK: per run, verdict, time in the world, fps median / p5 and frame p95, device kept or lost (and when), with the gate's run files.
TAKEN | quentinop | ETA 2026-12-04 15:30 UTC | AI-assisted: write-up with Claude Opus 5.5 (High) Whether this PR changes the device loss at world entry on an RDNA 2 card with the default `LEONIDA_THIN=1` (#3264). AMD Radeon RX 6800 XT 16 GB desktop, driver 32.0.21045.29003, Ryzen 5 9600X, 32 GB RAM, Windows 11. Profile M. - BUILD: this PR's head `0edc09ac2` as is, built with `d3d12/scripts/build-nvidia.ps1`. - RECIPE: game gate (`docs/game_gate.md`) with `-SeriesS`, 300 s in the world, from one save, played by hand on the same route in both runs (Jason's first mission, boat to plane). - VARIABLE: `LEONIDA_THIN` | A = unset (the default, 1) | B = 0. One run each, A then B. - PREDICTED: A FAIL with `device_lost` a few seconds after the world first draws, as on main `68427be7e`; B PASS at about main's frame rate (19.9 fps mean there). - SEND BACK: per run, verdict, time in the world, fps median / p5 and frame p95, device kept or lost (and when), with the gate's run files.
First-time contributor

DONE | the runs taken above

Short: on this RDNA 2 card the pooled allocators keep the device with the default LEONIDA_THIN=1. With the PR's default, a 300 s gate run passed at 25.1 fps mean. The same executable with LEONIDA_ALLOCATOR_RING=0 lost the device as soon as the world first drew, which is what main does on this card (#3264). PROVISIONAL (n=1 per arm).

  • BUILD: this PR's head 0edc09ac2 as is (not merged onto current main), diagnostics,mimalloc. The same executable in all three runs (same exe_sha16).
  • MACHINE: AMD Radeon RX 6800 XT 16 GB desktop, driver 32.0.21045.29003, Windows 11 Pro 26300, Ryzen 5 9600X, 32 GB RAM. Profile M.
  • RECIPE: game gate with -SeriesS, 300 s in the world, LEONIDA_RELAY=2, LEONIDA_THIN_THREADS=6. One save, played by hand on the same route each time (Jason's first mission, boat to plane). Shader cache already warm.
  • DEVIATIONS: one run added that the TAKEN did not announce, run C (THIN=1 with the pool off). It is the control that separates this PR's switch from the rest of its head. Its prediction was written before it ran.
Run LEONIDA_THIN LEONIDA_ALLOCATOR_RING End In the world fps mean fps median / p5 Frame p95 Longest gap Private peak Device
A unset (1) unset (pooled) target, PASS 303 s 25.1 25.1 / 19.0 52.8 ms 0.17 s 24,322 MB kept
B 0 unset (pooled) target, PASS 302 s 21.2 20.9 / 16.7 60.0 ms 0.37 s 23,619 MB kept
C unset (1) 0 device_lost, FAIL 0 s (not reached) – – – – 19,493 MB lost at 64 s

(fps from presents after 60 s in the world; mean = frames / (world time − 60 s).)

What the runs say:

  • MEASURED (n=1 per arm): with the pool on, THIN=1 held 303 s and exited clean. With the pool off, the same executable lost the device (0x887A0007 removed reason, exit 0x887A0005, device-removed data: none) right after the world's first frames, before the gate counted the world as reached. That is the same end as the three THIN=1 gate runs earlier today on main 68427be7e, #3439 and #3443 (3 of 3, same build options).
  • MEASURED: the pool was active in A and B. At the end there were 1,274 pooled allocators in A and 870 in B; none in C.
  • MEASURED: THIN=0 with this PR, 21.2 fps mean, against 19.9 on main 68427be7e the same day. With one run each, I would not read a gain into it.
  • MEASURED: THIN=1 with the pool is the fastest setting I have had on this card, 25.1 fps mean against 21.2 with THIN=0 on the same build.
  • READ IN CODE (d3d12/crates/leonida-gpu/src/host/recorders.rs:38): the pool is on unless LEONIDA_ALLOCATOR_RING=0.
  • ASSUMED: #2670 (closed, not merged) described this same loss on an RX 6800 XT and blamed command buffers filling the card's 2 GB aperture segment. Fewer allocators would fit that, but I did not measure the segment.
  • PREDICTED before the runs: A FAIL, B PASS. A was wrong. Predicted before C: FAIL. C was right.

Limits: one run per arm, played by hand rather than with the gate driver.

mandy-pr3031-rx6800xt.zip: summary.json, run.json, events.jsonl, memory.csv and leonida.log for each run, user and PC names replaced.

AI-assisted: log analysis and write-up with Claude Opus 5.5 (High).

DONE | the runs taken above **Short: on this RDNA 2 card the pooled allocators keep the device with the default `LEONIDA_THIN=1`.** With the PR's default, a 300 s gate run passed at 25.1 fps mean. The same executable with `LEONIDA_ALLOCATOR_RING=0` lost the device as soon as the world first drew, which is what main does on this card (#3264). PROVISIONAL (n=1 per arm). - BUILD: this PR's head `0edc09ac2` as is (not merged onto current main), `diagnostics,mimalloc`. The same executable in all three runs (same `exe_sha16`). - MACHINE: AMD Radeon RX 6800 XT 16 GB desktop, driver 32.0.21045.29003, Windows 11 Pro 26300, Ryzen 5 9600X, 32 GB RAM. Profile M. - RECIPE: game gate with `-SeriesS`, 300 s in the world, `LEONIDA_RELAY=2`, `LEONIDA_THIN_THREADS=6`. One save, played by hand on the same route each time (Jason's first mission, boat to plane). Shader cache already warm. - DEVIATIONS: one run added that the TAKEN did not announce, run C (`THIN=1` with the pool off). It is the control that separates this PR's switch from the rest of its head. Its prediction was written before it ran. | Run | `LEONIDA_THIN` | `LEONIDA_ALLOCATOR_RING` | End | In the world | fps mean | fps median / p5 | Frame p95 | Longest gap | Private peak | Device | |---|---|---|---|---|---|---|---|---|---|---| | A | unset (1) | unset (pooled) | target, PASS | 303 s | 25.1 | 25.1 / 19.0 | 52.8 ms | 0.17 s | 24,322 MB | kept | | B | 0 | unset (pooled) | target, PASS | 302 s | 21.2 | 20.9 / 16.7 | 60.0 ms | 0.37 s | 23,619 MB | kept | | C | unset (1) | 0 | `device_lost`, FAIL | 0 s (not reached) | – | – | – | – | 19,493 MB | lost at 64 s | (fps from presents after 60 s in the world; mean = frames / (world time − 60 s).) What the runs say: - MEASURED (n=1 per arm): with the pool on, `THIN=1` held 303 s and exited clean. With the pool off, the same executable lost the device (`0x887A0007` removed reason, exit `0x887A0005`, device-removed data: none) right after the world's first frames, before the gate counted the world as reached. That is the same end as the three `THIN=1` gate runs earlier today on main `68427be7e`, #3439 and #3443 (3 of 3, same build options). - MEASURED: the pool was active in A and B. At the end there were 1,274 pooled allocators in A and 870 in B; none in C. - MEASURED: `THIN=0` with this PR, 21.2 fps mean, against 19.9 on main `68427be7e` the same day. With one run each, I would not read a gain into it. - MEASURED: `THIN=1` with the pool is the fastest setting I have had on this card, 25.1 fps mean against 21.2 with `THIN=0` on the same build. - READ IN CODE (`d3d12/crates/leonida-gpu/src/host/recorders.rs:38`): the pool is on unless `LEONIDA_ALLOCATOR_RING=0`. - ASSUMED: #2670 (closed, not merged) described this same loss on an RX 6800 XT and blamed command buffers filling the card's 2 GB aperture segment. Fewer allocators would fit that, but I did not measure the segment. - PREDICTED before the runs: A FAIL, B PASS. A was wrong. Predicted before C: FAIL. C was right. Limits: one run per arm, played by hand rather than with the gate driver. `mandy-pr3031-rx6800xt.zip`: `summary.json`, `run.json`, `events.jsonl`, `memory.csv` and `leonida.log` for each run, user and PC names replaced. AI-assisted: log analysis and write-up with Claude Opus 5.5 (High).
First-time contributor

Opened again as #3495: this pull request came over from GitHub under the name Ghost, and I can no longer push to it. #3495 has the same code (head 0edc09ac2), so the results here still apply to it; new results and reviews please on #3495. A maintainer can close this one. @Otavmacedo, @OreoFR and @quentinop, thank you for the runs since the move; they were on this same head.

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

Opened again as #3495: this pull request came over from GitHub under the name Ghost, and I can no longer push to it. #3495 has the same code (head `0edc09ac2`), so the results here still apply to it; new results and reviews please on #3495. A maintainer can close this one. @Otavmacedo, @OreoFR and @quentinop, thank you for the runs since the move; they were on this same head. AI-assisted (Claude Code, Claude Opus 5.5).
Member

Closing as a duplicate of #3495, which is the same change re-posted by the same author on this forge: same five files, 30 changed lines differ out of ~1,100 (rebase drift). Review and merge happen on #3495.

Closed by Moon's agent during PR triage, on Moon's written authorization.

Closing as a duplicate of #3495, which is the same change re-posted by the same author on this forge: same five files, 30 changed lines differ out of ~1,100 (rebase drift). Review and merge happen on #3495. Closed by Moon's agent during PR triage, on Moon's written authorization.
MoonEyes closed this pull request 2026-12-04 22:53:58 +00:00
Sign in to join this conversation.
No description provided.