d3d12: host lists record into pooled command allocators (D3D12-COMMAND-ALLOCATOR-RING) #3031
Open
github-bot
wants to merge 5 commits from
github-bot/gh-3031 into main
AGit
pull from: github-bot/gh-3031
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!3031
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3031"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Krashgamer on GitHub · 2026-12-02 02:43 UTC · original
Krashgamer:d3d12-command-allocator-ring→main· +865 −234 · 5 files · 5 commits · openClaimed in the coordination issue as: D3D12-COMMAND-ALLOCATOR-RING (#2570)
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 whyLEONIDA_ALLOCATOR_TRIM=1measured 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):
CopyBufferRegion, each on its own allocatorResetof every allocatorThe allocators hold the memory.
This change:
CreateCommandList1).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.-RayTracingthat 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 withLEONIDA_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.LEONIDA_ALLOCATOR_RING=0gives each list and each prelude an allocator of its own again ("home" slots), as before.LEONIDA_ALLOCATOR_TRIMkeeps only its idle-list part; the allocator replacement is gone (it did nothing).Tested
Game gate, Series X, 300 s in the world, the same save, RTX 3080 10 GB, 32 GB RAM. Main
5b1fff821against this change on it, alternating, two runs each. This change was measured at9903ba336, 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):-HardwareRT(one complete run each)* With
-HardwareRTboth 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 (
4e59d46e8on 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 (#3031).Other results:
-RayTracing, 4 pairs), so not part of this change.Without the game:
cargo test -p leonida-gpu --features diagnostics --libon WARP with the debug layer (LEONIDA_D3D12_WARP=1 LEONIDA_D3D12_DEBUG=1): 789 passed.check_no_game_data.py: 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: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_runchecks that recordings alive at once have allocators of their own. The recorder module has unit tests for the bookkeeping:The change was reviewed by independent reviewer agents before this pull request and before this update. Findings fixed in the update:
HostList::retirecloses a list still recording before its allocator can reset (it only asserted in debug builds).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
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
@Kal0s-design on GitHub · 2026-12-02 06:15 UTC · original
Windows 11, MSVC toolchain 1.98.1. Head
1ac80bcd3merged into currentmain0ae5a2664: the merge is clean. Unit tests only, no game.cargo test -p leonida-gpu --features diagnostics --lib:mainLEONIDA_D3D12_WARP=1)LEONIDA_ALLOCATOR_RING=0descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync; two reruns were clean, so I'd call it flaky)LEONIDA_D3D12_DEBUG=1LEONIDA_D3D12_DEBUG=1LEONIDA_ALLOCATOR_RING=0--test-threads=1indirect::andhost::card_stepsSo 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_recordedhost::card_steps::tests::the_card_gathers_what_is_recordedindirect::tests::a_record_written_behind_a_batchs_pass_is_clamped_behind_its_writerindirect::tests::host_list_batchesindirect::tests::host_list_budget_starts_empty_at_each_submissionindirect::tests::host_list_reuses_and_grows_scratch_across_submissionsindirect::tests::host_list_window_executions_need_no_barrier_of_their_ownEach 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:
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:RINGis one process-wide ring, andRing::takelends 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 on GitHub · 2026-12-02 06:35 UTC · original
@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_allocatorscopieda -> bandb -> ain turn inside one list, with no barrier. The first read promotesatoCOPY_SOURCEfor 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 checkshost.log_messages()on that device picked them up. That's why the failures needed the whole lib in parallel, and why they went away withLEONIDA_ALLOCATOR_RING=0: the test returns early when the switch is off. I bisected it with your filters:indirect:: host::batchreproduced it, andindirect::withhost::minusbatch_scratch_testsdidn'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).LEONIDA_D3D12_DEBUG=1, wholeleonida-gpu --features diagnostics --libin parallel: 745 passed, twice. Before the fix, the same command failed 4–7.On the devices: every allocator in the ring comes from
host().device(the four call sites arebegin/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 intakewould never fire, so I left it out.AI-assisted (Claude Code).
@lixonik on GitHub · 2026-12-02 06:59 UTC · original
RUN
Independent verification of
#3031(1ac80bcd3) merged cleanly ontomain(f37c4a87d) on Windows 10 Pro 22H2 (build 19045), AMD Ryzen 9 5950X, 64 GiB RAM, NVIDIA GeForce RTX 5070 12 GB (driver621.40), MSVC toolchain (1.98.1).In-game Series X comparison (
LEONIDA_MEMORY_MAP=1,-NoFrameGen, same binary1ac80bcd3+f37c4a87d, same save, 90 s in world each)LEONIDA_ALLOCATOR_RING=0LEONIDA_ALLOCATOR_RING=1(PR default)copystat)residency)15,678 MBphys free)18,066 MBphys free)1024 MBprivate regions (last map)32 MBwrite-combined regions (last map)Allocator census at end of
RING=1run: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.RING=1): 754 passed, 0 failed (host::recorders::tests::*5/5 andlists_recorded_in_turn_share_allocators1/1 PASS).LEONIDA_D3D12_DEBUG=1+--test-threads=1(RING=1): 754 passed, 0 failed (0 debug-layer errors).LEONIDA_D3D12_DEBUG=1parallel (RING=0): 753 passed, 1 failed (only the known pre-existing parallel racedescriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync; 0 debug-layer errors).LEONIDA_D3D12_DEBUG=1parallel (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 5indirect::tests::*tests.Code note supporting
@Kal0s-design's observation:static RING: Mutex<Ring>ind3d12/crates/leonida-gpu/src/host/recorders.rs:94does not tagSlotwith the owningID3D12Devicepointer (Ring::takeat:146-158andRecording::beginat:237-249hand out any open/empty slot regardless of device). Scoping ring slots by device identity (or owning the ring perHost) 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 parallelLEONIDA_D3D12_DEBUG=1test failure reproduces deterministically.AI-assisted: yes (Antigravity).
@Kal0s-design on GitHub · 2026-12-02 07:12 UTC · original
Thanks, and sorry for pointing at the devices. The cause was the test, as you found. I checked
1d6777868the same way, on top of currentmain229d352ee. Onlyd3d12/docs/switches.mdconflicts in that merge, so the Rust side is what's tested here:LEONIDA_D3D12_DEBUG=1, wholeleonida-gpu --features diagnostics --libin parallel: 778 passed, 0 failed, twice. At1ac80bcd3the same command failed 7.The
switches.mdconflict with the newmainwill need a rebase, though GitHub already shows it as conflicting.GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
1d6777868ctoa47b868553@Krashgamer on GitHub · 2026-12-02 07:28 UTC · original
Rebased onto
main229d352ee. The only conflict wasd3d12/docs/switches.md, regenerated withtools/d3d12_switches.py; the code is unchanged. Head is nowa47b86855. WARP +LEONIDA_D3D12_DEBUG=1, wholeleonida-gpu --features diagnostics --libin 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 on GitHub · 2026-12-02 11:24 UTC · original
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:LEONIDA_ALLOCATOR_RING=0Without ray tracing nothing changes from the numbers above in this thread: 0 removals in all runs.
AI-assisted (Claude Code).
@MoonEyes on GitHub · 2026-12-02 12:38 UTC · original
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
@tillo88 on GitHub · 2026-12-02 15:49 UTC · original
In-game numbers for this PR (head
a47b86855) merged ontomainat229d352, on a replay bench with no frame cap, against 12 runs of plainmainat the same commit. All 4 PR runs (two jobs, about four hours apart, with base runs between them) were faster than every base run:main229d352Setup: 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 withplay-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 on GitHub · 2026-12-02 15:54 UTC · original
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 on GitHub · 2026-12-02 17:07 UTC · original
RUN (in game, gate-style, as asked by MoonEyes): head
a47b86855tested in a batch with #2643 (2cea6871c), #3031 (a47b86855), #2789 (4bd128a8c) and #2661 (1b3f3dee0), all merged withgit merge --no-ffontomain23a51c494(no conflict; the only file the four share isd3d12/docs/switches.md). Built withdiagnostics,mimalloc, targetx86_64-pc-windows-msvc. RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300).Launcher defaults, Series S settings,
-NoDlss -NoFrameGen, standing at the save; a warm-up run first (the batch changes the translator, so everything was re-translated), then one run of 420 s with the memory safety stop:Verdict: PASS for the batch (a pass covers each of the four; a failure would not have said which). Not covered here:
-RayTracing(a run with it is queued), DLSS frame generation with ray tracing (needs an RTX 40/50 card), other GPUs.AI-assisted: Claude Code (Claude Opus 5.5)
@MoonEyes on GitHub · 2026-12-02 18:02 UTC · original
Not built (Windows-only
leonida-gpu). Not ready: the author has asked for it not to be merged.a47b86855, merge base229d352ee, 188 behind currentmain45dc41f95. A trial merge is clean. CI on the head: all 6 checks pass.-RayTracing.1d6777868.Blocking finding, from the author (Krashgamer, 11:24 and 15:54): with
-RayTracing, the defaultLEONIDA_ALLOCATOR_RING=1caused 3 of 6 device removals, against 0 of 6 onmainand 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):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
@Krashgamer on GitHub · 2026-12-02 19:32 UTC · original
@MoonEyes the new head is up:
8df1bfce7(one recording per pooled allocator), rebased onmain5b1fff821, which merges cleanly into today'smain. Gate runs of this head:8df1bfce7onmain5b1fff821, builtdiagnostics,mimalloc(build-nvidia.ps1).-RayTracing(where the first version hung)All four PASS. With the 8 runs of the earlier equivalent build, 0 of 12 hung, against 5 of 15 with the shared version. (
mainwith-RayTracingon this PC: 11.5-14.8 fps, 32.6 GB private.)Against
main5b1fff821, alternating, all PASS, no device loss:-HardwareRT(one complete run each): private / fpsThe description is updated with the design change, these numbers and the review fixes.
AI-assisted (Claude Code, Claude Opus 5.5).
d3d12: host lists record into shared command allocators (D3D12-COMMAND-ALLOCATOR-RING)to d3d12: host lists record into pooled command allocators (D3D12-COMMAND-ALLOCATOR-RING)a47b868553to8df1bfce71@icdmkg2 on GitHub · 2026-12-02 20:22 UTC · original
Third-party Windows verification of #3031 (
D3D12-COMMAND-ALLOCATOR-RING) on head8df1bfce78df1bfce714bdfd21f9a8ddcc3231d7dfa2357c0merged cleanly (git merge --no-ff) ontoorigin/mainb41763227.621.24(32.0.16.2124), AMD Ryzen 7 H 260 w/ Radeon 780M, 32 GB RAM, Windows 1110.0.26300.9974,rustc 1.98.1.Results (MEASURED)
python -I scripts/check_no_game_data.py(all 5 touched files)0python -I tools/d3d12_switches.py --check d3d12/docs/switches.md0python -I tests/test_d3d12_switches.py20/20OKpython -I scripts/red_green.py 3031 --mutate767passed,0failed inleonida-gpu; red:red does not build(cannot find module or crate recorders, expected for newhost/recorders.rs)LEONIDA_ADAPTER=5060cargo test -p leonida-gpu --features diagnostics --locked --lib -- recorders:: lists_record --nocapture6 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=0cargo test -p leonida-gpu --features diagnostics --locked --lib -- host::tests:: --skip depth_bounds_pipeline_loads_and_filters_draws68 passed, 0 failed, 1 ignored(fallback home-slot path)LEONIDA_D3D12_WARP=1+LEONIDA_D3D12_DEBUG=1(samerecorders:: lists_recordfilter,--features diagnostics)6 passed, 0 failed(200 lists recorded in turn: private bytes grew 6 MB)LEONIDA_ADAPTER=5060cargo test -p leonida-gpu --features diagnostics --test replay --locked1 passed, 0 failedCode review notes (READ IN CODE)
host/recorders.rs: one recording per pooled allocator (!slot.usedassertion inbegin_in),ID3D12CommandAllocator::Resetand forgotten allocator drops execute outside theRINGmutex whileslot.resettingguards the slot.host.rsDrop for HostList: closes any still-open recording before retiringrecordingsbehind in-flight submissions and forgetting home slots.AI-assisted: Gemini 4 Neon (High) via Antigravity (test execution, diff review, and write-up).
@EdenBendheim on GitHub · 2026-12-02 21:02 UTC · original
RUN (in-game RTX 3090 300 s stress gate, 14-PR combined batch) — PASS covering exact head
8df1bfce714bdfd21f9a8ddcc3231d7dfa2357c0.git merge --no-ffontomainb41763227(diagnostics,dlss,mimalloc,exe_sha16 = c47eeb717f761d9d; changed-file clean-room scan exit0; standalone buildexe_sha16 = 7b41ce21b88a6c45also compiled and passed targeted checks cleanly). Allocator pooling was active by default (LEONIDA_ALLOCATOR_RINGon).14PRs):#3200d1a91afd1,#319880a627bb1,#319193b47ac9d,#3189c182fc392,#3176ae0075d9a,#3168337388052,#31641065952da,#3146ebc0253ff,#312464600ef0c,#3069311d33a40,#30318df1bfce7,#3029e49404808,#3054ff53fd8b9,#3010d645712a3.610.88, Series X profile,2560x1440,-NoFrameGen,scripts/game-gate.ps1(301.3 sin 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).c47eeb717f761d9d)mainb41763227baseline (cf499737bf684f6a)clean,0reasons,0warnings)clean,0reasons,0warnings)301.3 s(4,504frames)305.6 s0/0/00/0/020.10 FPS/69.76 ms19.13 FPS/74.01 ms8,048/5.222 s7,983/2.358 sVerdict: PASS for the 300 s in-game stability gate on
8df1bfce7. (Single combined-batch stability check, not an isolatedLEONIDA_ALLOCATOR_RING=1vs0FPS gain measurement.)(AI-assisted verification:
gemini-4-neon+gpt-6.2-astra.)@fiestorra on GitHub · 2026-12-02 22:23 UTC · original
VERIFY-3031 — Windows nativo: las cuatro pruebas de las grabaciones pasan, y el control muerde
(this PR)5b1fff821(behindmainb41763227)main—merge-treeclean,git merge --no-ffclean (auto-mergedfindings.mdandswitches.md)Ran
Negative control (synthetic): I put a resetting slot back into the free list (
self.empty.push(at)right afterslot.resetting = true), rebuilt and ran:Two of the four bite, and the second one trips the
debug_assertinbegin_inrather 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.rsgives 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 inhost.rsare the wiring I did not review line by line — I read the module and its tests, not that diff.What I could not test
host.rsrework: merged and compiled, not reviewed.Written with an AI assistant.
@MoonEyes on GitHub · 2026-12-03 03:43 UTC · original
RUN (in game, batch of three pull requests), each head merged with
git merge --no-ffonto main516c9eaab, in one build: #30314e59d46e8, #3284f9c588760, #32868c56cb6b9. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.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;
-PrecompileUsedwas 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 on GitHub · 2026-12-03 12:39 UTC · original
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 is516c9eaab) on top of the same base, against the base alone. Numbers recomputed fromsummary.json/memory.csvby a separate agent.Paired, B−A (MEASURED, 4 pairs, all 4 the same sign for the memory rows):
Ranges over the 8 measured runs, A / B:
One thing to watch, not a finding:
AI-assisted: Claude Code (Claude Opus 5.5).
@Krashgamer on GitHub · 2026-12-03 12:55 UTC · original
@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 on GitHub · 2026-12-03 13:43 UTC · original
I checked the pending-submission case on
149231a4merged ontob053a181. A synthetic test queued eight copy lists behind a private D3D12 fence viaHost::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 usedLEONIDA_LATE_WAIT=3andLEONIDA_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 on GitHub · 2026-12-03 13:55 UTC · original
@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).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.