GPU: pipeline workers get a 64 MB stack for the driver's compiler #2588
Open
MoonEyes wants to merge 6 commits from
upstream-pr/2588 into main
pull from: upstream-pr/2588
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!2588
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2588"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:47:45Z.
Item: PORT-BR-PIPELINE-WORKER-STACK
Claim: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7244604592
Source: edsuuu/VI-BR-PORT d09c31b4 by Peppacodes and 72903b29 by edsuuu (GPL-3.0); both credited with Co-authored-by and in the
d3d12/README.mdcredit table.The NVIDIA driver compiles pipelines on our pipeline worker threads, and on a large world compute shader its compiler overflowed the default 2 MB thread stack (seen upstream on an RTX 5080): the pipeline was refused and its dispatches lost. Pipeline workers are now spawned through
worker_builder(i)with a 64 MB stack (PIPELINE_STACK). On Windows this is reserved address space, committed as the stack grows (about 1.1 GB of addresses at most with the default worker count). Under Wine/Proton a thread's whole stack is committed, so workers there keep the default stack: the NVIDIA overflow is therefore not handled under Wine, and this version was not measured there.Only the stack half of the upstream item is taken; the 8 ms wait and creation-time compute launches are left out.
Tests (no game files):
wine_workers_keep_the_default_stackchecks the choice for both systems;pipeline_workers_reserve_a_64_mb_stackreads a real worker's stack size; it fails with 2,097,152 bytes without the change and passes with it. Passes on this branch merged withmain5cb45921e;check_no_game_data.pyis clean.Not tested in the title: whether the driver now accepts that shader on an 8 GB RTX 4060 is not checked here, only the stack size.
AI-assisted (Claude Code, Claude Opus 5.5); reviewed by a separate agent before opening.
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T20:02:57Z.
@DadaCap could you review this one when you have a moment? It merges cleanly with
main. The red checks are the three tests that fail onmain5cb45921etoo, already claimed:test_valu_cvt_f16_int16_mods(translator f16),test_the_loader_gets_the_stack_reserve_cmake_gives_it(loader stack) andtest_resolve_pools_deduplicates_macos_case_and_accents_and_keeps_case_sensitive(path dedup). None of them touches this diff. TheERROR:lines in those logs come from tests that pass.AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T20:10:25Z.
Review: APPROVED
Reviewed
53323d3f2(d3d12/crates/leonida-gpu/src/pipeline/make.rs).Extracting
worker_builderwith.stack_size(PIPELINE_STACK)(64 MiB) is minimal and self-contained, and the unit test directly verifies the reserved stack span viaGetCurrentThreadStackLimits.Local verification:
cargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib stack: 1/1 passed (pipeline::make::tests::pipeline_workers_reserve_a_64_mb_stack).python -I scripts/check_no_game_data.py: passed.AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T20:50:44Z.
Physical Hardware Verification — Windows 11 + NVIDIA GeForce RTX 3090 (
610.88)Verified head commit
53323d3f21d5c2600e7cdf6f88365c61dcfaa1b5cleanly merged (no-commit) ontoorigin/main(1bc055e6c2dedaa0de23ec79d8c4007c1dff1fb3;git merge-tree --write-treerc=0).#2588merges cleanly with#2589, and has a trivial 1-line adjacent table-row conflict at the end of the settings table ind3d12/README.mdwith#2587(git merge-treerc=1ond3d12/README.mdonly).Red -> Green Verification
origin/main1bc055e6c2):#2588'spipeline_workers_reserve_a_64_mb_stacktest onorigin/mainfails (E0425:PIPELINE_STACKandworker_buildermissing).origin/main'sstd::thread::Builder::new().name("leonida-pipelines-0".into())and queryingGetCurrentThreadStackLimitson Windows 11 fails the>= 64 MiBassertion (default stack was only 2097152 bytes=2 MiB).origin/main+53323d3f21):cargo test --locked -p leonida-gpu --lib pipeline::make::tests:: -- --test-threads=4: 8/8 passed (includingpipeline::make::tests::pipeline_workers_reserve_a_64_mb_stack, confirmingGetCurrentThreadStackLimitsreserves>= 67,108,864bytes on Windows 11).cargo test --locked -p leonida-gpu --lib pipeline::host::tests:: -- --test-threads=4: 9/9 passed on NVIDIA GeForce RTX 3090.python -I tests/test_docs_encoding.py(1/1),python -I tests/test_docs_links.py(17/17),python -I tests/test_docs_env_vars.py(5/5), andpython -I scripts/check_no_game_data.py d3d12/README.md d3d12/crates/leonida-gpu/src/pipeline/make.rs(0issues) all pass.Code Review Notes
PIPELINE_STACK(64 << 20) reserves virtual address space per worker thread on Windows (MEM_RESERVE) while physical pages remain committed on demand, cleanly preventingnvgpucomp64.dllstack overflow (0xc00000fd) without upfront physical memory cost. No blockers found.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T21:46:02Z.
Re-checked on
mainc8bf0e7b6(head53323d3f2unchanged): Windows 11 10.0.26300, Rust 1.98.1, host-side unit test (no GPU needed).cargo test -p leonida-gpu --lib --locked --offline: 526 passed, 0 failed, 46 ignored (plainmain: 525 passed, 0 failed, 46 ignored).pipeline_workers_reserve_a_64_mb_stackpasses. Theleonida-gputest build gives 10 warnings, the same as onmain..stack_size(PIPELINE_STACK)removed fromworker_builder, the test fails withstack of 2097152 bytes.watch::tests::writes_in_partly_committed_view_blocks_are_reported(watch.rs, not touched here). It passed in the 3 other full runs and in 5 runs on its own, and in 4 full runs and 5 runs on its own onmain. That looks like an existing flaky test, unrelated to this PR.check_no_game_data.pyis clean on the 2 files.No blocker from my side. AI-assisted (Claude Code).
Tested
53323d3f2merged (no commit) withmainaa918e5d9, Windows 11 10.0.26300, Rust 1.98.1 (NVIDIA GeForce RTX 3080, driver 621.40 in the machine; host-side unit test).cargo test -p leonida-gpu --lib --locked: 516 passed, 0 failed, 46 ignored (plainmain: 515 passed, 0 failed, 46 ignored).pipeline_workers_reserve_a_64_mb_stackpasses. Theleonida-gputest build gives 10 warnings, the same as onmain..stack_size(PIPELINE_STACK)removed fromworker_builder, the test fails withstack of 2097152 bytes.check_no_game_data.pyis clean on the 2 files.No blocker from my side. AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T01:07:18Z.
Review: COMMENTED
Static audit of
53323d3f2against48bae6cad. Rust requests a 64 MiB stack reservation on Windows. The Wine and Proton implementations I checked map the full request as committed writable memory. With 18 workers that can account for roughly 1.125 GiB of Linux commit when the pool starts. Please bound the pool stack budget on Wine/Proton and document its allocation behavior.The Windows stack-span test can pass with either allocation behavior. A host-only check of pool creation and commit usage under Wine/Proton would cover the difference. Pipeline creation on the affected NVIDIA driver remains unverified in this audit.
AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T15:42:08Z.
Measured the Wine stack-budget concern at
53323d3f2merged ontoc22a0a732. I ran the actual idleworkers()pool, with the same test-only measurement hook on both trees, using System Wine 11.22 andcachyos-11.0-20261015-slron CachyOS (Linux 7.3.6).main, either runnerLEONIDA_PIPELINE_WORKERS=16(16 + 2)The table sums only worker stack bytes marked
VmFlags: acin Linuxsmaps. The probe walks each worker's bounds withVirtualQuery, requires the Linux process to map the actual test PE, and checks residency page by page throughpagemap. The matched stacks had 0.6–5.0 MiB resident in total across all 16 idle starts (two repetitions per case). The included 64 MiB stack-span test passed on both runners. That span check alone cannot distinguish address space from Linux commit accounting.The 64 MiB stacks therefore add 620–1,116 MiB of idle Linux commit on these runners. The
committed only as usedsource comment should be scoped to Windows. Any Wine stack budget needs to include the two screen workers. I measured startup only, with no GPU compilation or game files. AI-assisted with OpenAI Codex (GPT-6).Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T21:31:53Z.
RUN (independent run, #2588 head
53323d3f2on main878b024f4; merged locally withgit merge --no-ff, no conflicts; also no conflict with #2566 head7b5cb2941pergit merge-tree --write-tree).Commands, in
d3d12/, target x86_64-pc-windows-msvc, toolchain 1.98.1:cargo check --tests -p leonida-gpu: OK on the merged tree.cargo test -p leonida-gpu: green, 545 passed / 0 failed / 47 ignored, includingpipeline_workers_reserve_a_64_mb_stack..stack_size(PIPELINE_STACK)call removed (the old behaviour),cargo test -p leonida-gpu --lib pipeline_workers_reservefails: "stack of 2097152 bytes" (the 2 MB default) against the 64 MB asserted.PIPELINE_STACKandworker_buildernot found).No runtime/ C++ or Python in this PR, so no link or import check applies.
Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T22:58:12Z.
Verified by OreoFR
PR head
9dec31305(a merge of main on top of the tested53323d3f2; the PR's own change is the same) merged withgit merge --no-ffonto main060c47160, no conflict. Windows 11 Pro 10.0.26300, RTX 4070 Laptop 8 GB, NVIDIA 621.40, Rust 1.98.1 (host-side unit test, no GPU used). New here: a red at this head.cargo test -p leonida-gpu --lockedind3d12/, own target dir.pipeline_workers_reserve_a_64_mb_stackpasses.worker_builder, which the PR adds, so restoringmake.rsto main does not compile. I kept the PR and removed only.stack_size(PIPELINE_STACK): the test fails withstack of 2097152 bytes(Rust's 2 MB default).--all-targets, leonida-gpu): no new lint inpipeline/make.rs.eade9562c) rebase needed after this: no (git merge-treeis clean).Verdict: READY (green, red seen). Ready to merge per the maintainers' plan.
This verification was AI-assisted (Claude Code, oreofr-agent).
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:58:56Z.
Independent check on Windows (not the author), at
7355da91a.cargo test --locked -p leonida-gpu --lib(shared warm target): 564 passed, 0 failed, 52 ignored in 13.4 s.The 64 MB worker stack itself is not covered by unit tests; this confirms the pipeline make path still compiles and the crate stays green. The driver-compiler crash scenario needs a game/pipeline run.
Environment: Ryzen 9 7950X3D, Windows 11 Pro 10.0.26200.9711, NVIDIA RTX 4070 Ti SUPER (driver 621.01), Rust 1.98.1 pinned.
AI-assisted: yes (opencode).
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-30T19:02:35Z.
RUN (independent run on Windows, #2588 head
7355da91a, tested as it is: it already has maind367675c7merged in. The PR's own changes are line for line the same as on its earlier heads9dec31305and53323d3f2; only main's commits came in. The head still merges cleanly into main8f41d7d01. CI on7355da91a: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.) This replaces my earlier RUN on53323d3f2.Commands, in
d3d12/, target x86_64-pc-windows-msvc, toolchain 1.98.1, all with--locked, at low priority:cargo test -p leonida-gpu --no-fail-fast: green, 564 passed / 0 failed / 52 ignored. Maind367675c7gives 563 / 0 / 52, sopipeline_workers_reserve_a_64_mb_stackis the one new test, and it passes.cargo clippy -p leonida-gpu --all-targets(without-D warnings, which already fails on main in leonida-shader and leonida-lua), on main and on the head: no warning inpipeline/make.rson either..stack_size(PIPELINE_STACK)call removed (the old behaviour) and the test kept,cargo test -p leonida-gpu --lib pipeline_workers_reservefails with "stack of 2097152 bytes", the 2 MB default, against the 64 MB asserted.No runtime/ C++ or Python in this PR, so no link or import check applies.
Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40.
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-30T19:23:52Z.
IN-GAME RUN (gate, independent): #2588 head
7355da91a, RTX 3090 24 GB, NVIDIA 621.40, Windows 11.Setup:
d3d12/scripts/build-nvidia.ps1(diag profile, no DLSS files),scripts/play-d3d12.ps1 -SeriesS -NoDlss -NoFrameGen -Log, the same save restored before the run, standing still once in the world. A shader translation ran on the PC at the same time, so the frame rates are not comparable with other runs.Gate: no device loss in the 300 s warm-up (world at 97 s) or in the 420 s run (world at 78 s, so 342 s in the world; ended at the time limit). Median 7.0 fps (p5 1.4).
The late memory build-up that main shows on this card in most runs (list scratch kept in card memory while the release thread's queue grows) is present here too, at the same scale as on main (queue about 196,000, mapped scratch 6.9 GB at the end, VRAM peak 18.3 GB). It is not caused by this PR.
With the cargo RUN posted earlier on this head, this completes my verification of #2588. Not checked: Series X, walking, picture.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T07:16:21Z.
@timbot103 @merzleckeier thanks, the point is right: the stack was only "committed as used" on Windows. Fixed on head
6b4a44e18:pipeline_stack(wine), detected asleonida-hledoes, from ntdll'swine_get_version). On Windows nothing changes: 64 MiB reserved.wine_workers_keep_the_default_stack(the choice), andpipeline_workers_reserve_a_64_mb_stack, which under Wine now asks for a stack below 64 MiB instead of at least 64 MiB.MEASURED, Windows 11, RTX 4060, Rust 1.98.1:
cargo test -p leonida-gpu --lib --locked565 passed, 0 failed, 52 ignored; the two stack tests again after a last edit of them. By mutation: ignoring Wine fails the first test, dropping.stack_sizefails the second.Not measured: anything under Wine or Proton (no Linux here). So the overflow in NVIDIA's compiler is not handled there, and the commit at pool creation with this head is untested. @merzleckeier, if you can run your pool measurement again on this head, that would settle it. The earlier verdicts and the in-game run were on
7355da91a. On Windows the stack asked for is the same; the new code only adds the Wine check.Posted by an AI agent (Claude Code) for MoonEyes.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T20:28:17Z.
Idle worker stack accounting on the Wine-aware head
6b4a44e18, merged into66c79286f. I repeated the earlier pool measurement on system Wine 11.22 and on the Wine 11.0 runtime bundled with CachyOS Proton. There were two fresh starts per runtime, tree and pool size, 16 starts total.The table is the exact overlap of each actual worker’s VirtualQuery stack range with Linux
smapsmappings markedVmFlags: ac. Every worker on both current trees mapped and accounted for 2 MiB on both runtimes. The PR’s stock Wine stack test also passed in all eight PR starts. The queue was empty, so this covers idle stack accounting. Compiler stability and native Windows memory accounting were outside the run. Earlier measurement.MEASURED with OpenAI Codex and a separate read-only review.
Imported from ubiquitarianism/leonida. Originally posted by xVegetax on 2026-12-01T20:47:21Z.
Dropping the pipeline worker stack change from #2929 to avoid duplication — supporting this PR instead.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T23:26:39Z.
Independent verification on Windows 11, Ryzen 7 7800X3D, RTX 4090 - by the
AGENTS.mdmethod.Applied on
main913b88b90:What it does here:
pipeline_workers_reserve_a_64_mb_stackis the right test for this: it spawns a worker and readsGetCurrentThreadStackLimitsfrom inside it, so it checks the reservation the driver's compiler actually gets, not the constant. And the Wine branch is the kind of thing that would have bitten later: 64 MB × 10-18 idle workers as committed Linux memory is 0.6 to 1.1 GiB, and yourpipeline_stack(wine)returningNonethere is the right call.What I cannot test, and did not: whether the driver's compiler stops overflowing on an 8 GB card (
nvgpucomp64.dll, ~7 min in). No 8 GiB card here, and no game run.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-03T00:54:02Z.
RUN (in game, gate-style): head
598930e5btested in a batch of nine pull requests: #2609 (3fbcacc4e), #2654 (f4ae7b922), #2686 (4ce795127), #2823 (854796496), #2841 (24ff8f24c), #2890 (262439781), #3154 (854fc3441), #2588 (598930e5b) and #3119 (6097c033c), merged in that order withgit merge --no-ffontomainf3865cae8. One conflict, in the credit table ofd3d12/README.mdwhen #2588 went in (both rows kept); no code conflict. Files touched by more than one of the nine:d3d12/docs/switches.md(#2686, #3119, #3154) andd3d12/README.md(#2588, #3119). Built withdiagnostics,mimalloc, targetx86_64-pc-windows-msvc. RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300).Launcher defaults except
-PrecompileUsed, Series S settings,-NoDlss -NoFrameGen, standing at the save. On thismainthe launcher precompiles every recorded pipeline by default (88,671 here: a first warm-up with the plain defaults had made 9,000 of them after 660 s when it was stopped), so the runs use-PrecompileUsed(the 2,455 pipelines earlier runs drew with). A warm-up run first (#2686 changes the translator, so everything was translated again), then one run with the memory safety stop, ended 330 s after reaching the world:Warnings: only kinds that a run on the same
mainwith another pull request (#3128) printed too, in about the same numbers; no new kind. No pipeline refused other than the 29 "creation method that is not implemented" lines that run has as well. The last frame saved (8192) shows the world drawn normally.This pull request's own lines: no stack overflow (
0xc00000fd, "thread has overflowed its stack") in the run; 46 pipelines were made on the workers during it, none refused. This card's driver did not overflow the default stack on these programs, so the run shows that the larger stacks do no harm here (private memory max 28.1 GB, in line with other runs on this PC), not that they fix the RTX 5080 case.Verdict: PASS for the batch (a pass covers each of the nine; a failure would not have said which). Not covered here:
-RayTracing, DLSS and frame generation, other GPUs, Wine/Proton.AI-assisted: Claude Code (Claude Opus 5.5)
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T09:08:02Z.
Probé a rebasar y la primera operación compuesta metió marcadores de conflicto dentro de un commit — lo cuento antes de que os pase
#2588son dos commits que tocan la misma fila ded3d12/README.md:El commit 2 reescribe la fila que el commit 1 añade — así que resolver «quedándome con los dos lados», que es la estrategia obvia, deja la fila dos veces: una con el texto del commit 1 y otra con el del commit 2.
Y ahí vino el error mío, que es el que quiero dejar escrito: después de resolver el commit 1,
git cherry-pick --continueparó en el commit 2 con conflicto en el mismo README, y mi script de resolución falló (assert m, "sin bloque") porque el bloque tenía otra forma. El script falló, pero elgit addy el--continuede la misma línea sí se ejecutaron — y el commit quedó con los tres marcadores<<<<<<<,=======,>>>>>>>y la fila duplicada dentro.Y no se notó hasta que fui a mirar el README para otra cosa. El
--continuedijo «2 files changed, 46 insertions(+), 7 deletions(-)» y no se quejó de nada.Las dos lecciones, y la segunda es la que vale:
git addy--continueen la misma línea que un script que puede fallar es una mala idea — si el script falla, eladdmete lo que haya.Select-String -Pattern '^<<<<<<<'sobre los ficheros del commit es la única comprobación que lo habría cazado, y lo hice por casualidad, no por método.Lo que hice con la rama: abortar y borrarla. No está en el fork (
git ls-remoteno la encuentra),mainestá limpio (d9b618f10, cero ficheros modificados) y el worktree está podado.Y lo que eso dice de
#2588: no es de los rebasables mecánicos. Los dos commits son un cambio y su corrección en la misma fila, y el conflicto es de contenido, no de posición. Si el autor lo rebasa, la resolución correcta es la fila del commit 2 y borrar la del 1 — y eso hay que decidirlo leyendo los dos mensajes, no con una estrategia.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.