d3d12: eliminate quadratic Refresh scans and allocations in card_steps (D3D12-CARD-STEPS-PLAN-SCRATCH) #3069
Open
piyonchu wants to merge 2 commits from
upstream-pr/3069 into main
pull from: upstream-pr/3069
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!3069
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3069"
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 piyonchu on 2026-12-02T08:26:34Z.
Claimed in the coordination issue as: D3D12-CARD-STEPS-PLAN-SCRATCH (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7338836162)
What and why
Relates to #2940 (
"title bytes under flights' writes"/"steps on the card"submitting-thread CPU overhead).This replaces quadratic per-submission scans and per-frame heap allocations in
host::card_stepsand itsblocked_by/copied_readgate inhost.rswith zero-behavior-change algorithmic improvements:blocked_by_intoacrossruns(host.rs,card_steps.rs): Fusesblocked_byandcopied_readinto one walk overrunsacrossHost::card_steps,late_blocked, andrelay_wait(preserving exactWHY_RUN/WHY_READanddiagnosticsblameprecedence while stopping as soon as needed).Does::Refreshfiltering (does_of_into,plan_indices): RoutesStep::Refreshentries straight toRefreshIndexinstead of appending ~20,000Does::Refreshitems todoes, so seeding, dependency wave propagation,Placedbarrier checks, and CPU-reader conflict checks only inspect active copy/fill/read/placed entries (O(W * |active|)instead ofO(W * N)). ReplacesBox<dyn Iterator>heap allocations and indirect indexing in level assignment with directout_rw/copy_writesreverse scan andmax_copy_levelearly break (preserving zero-lengthDoes::Copyoverlap checks). Also makeshost::join_rangescompact in-place instead of allocating a freshVecper merge.elsewhere(RefreshIndex): Stays linear for small spans/early queries (queries < 16 || spans.len() < 128) and lazily sorts, deduplicates, and builds an in-place midpointmax_tointerval tree whenelsewhereis queried heavily underLEONIDA_CARD_STEPS=2(including when a 174 MiB heap refresh spans sub-allocations).FillToexpansion (CardStepsScratch,ScratchGuard,RecordScratch): Reuses persistentdoes,active,run_steps,list_ptrs,RefreshIndex,PlanScratch,writers,ops,places,held,room,spans,op_buckets(O(ops)bucketed level recording), andRecordScratchacrosscut_forandtake_steps_with_scratchwhileclear_retained()drops allArc/ID3D12Resourcehandles and borrowed transition barriers immediately on every return or unwind. ResolvesFillTodirectly by(run_idx, step_idx)inO(1)without linear pointer searches or intermediateVec<To>allocations.Tested
All commands run on
perf/d3d12-card-steps-plan-scratch(aef892880) ind:\GTAVI\Leonida\d3d12(with no game files):python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/host.rs d3d12/crates/leonida-gpu/src/host/card_steps.rs— passed (exit 0)cargo check --lib -p leonida-gpu --locked— passed (0 warnings in touched files)cargo check --lib -p leonida-gpu --features diagnostics --locked— passed (0 warnings in touched files)cargo clippy -p leonida-gpu --lib --tests --locked— passed (0 warnings in touched files)cargo test --locked -j 4 -p leonida-gpu --lib -- --skip depth_bounds_pipeline_loads_and_filters_draws --test-threads=1—693 passed; 0 failed; 61 ignored; 1 filtered out(includes new equivalence testsrefresh_index_matches_linear_elsewhere,plan_scratch_and_active_filter_match_reference, andsingle_pass_blocked_by_into_matches_legacy_precedence)LEONIDA_RELAY=2 LEONIDA_CARD_STEPS=2 cargo test --locked -p leonida-gpu --lib -- a_copy_behind_a_flight_reads_what_the_flight_wrote --ignored --nocapture --test-threads=1—1 passed; 0 failed(48 of 48 copies were done on the card, 0 submissions waited)cargo test -p leonida-gpu --features diagnostics --test replay --locked—1 passed; 0 failed(a_frame_is_recorded_and_replayed)cargo test --release --locked -j 4 -p leonida-gpu --lib -- bench_card_steps --ignored --nocapture --test-threads=1(2 passed; 0 failed):card_steps elsewhere: 4 queries / 20k refreshesbefore=27.6 us/iter, after=28.9 us/iter (0.96x); 120 queries / 20k refreshesbefore=813.2 us/iter, after=594.0 us/iter (1.37x)card_steps plan(20k refreshes + 4k fills + 118 copies):before=289.9 us/iter, after=134.4 us/iter (2.16x)GPUs tested: NVIDIA GeForce RTX 4060 Laptop GPU (driver
32.0.16.1656) / Intel(R) UHD Graphics (driver32.0.101.6790), Microsoft Windows NT10.0.26200.0(unit,replay, andLEONIDA_RELAY=2 LEONIDA_CARD_STEPS=2card-steps tests ran; no retail game data).AI-assisted: yes (Antigravity + independent read-only reviewer subagent audited the diff against
cont/mainbefore committing and verified review fixes).Checklist
main(a917c54d6) and merges cleanly.host::card_stepsplanning/scratch and single-passblocked_by_into); follow-up work goes in a new pull request.docs/design.mdnot applicable).Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T08:33:03Z.
Windows 11, MSVC toolchain 1.98.1, head
aef892880(onmaina917c54d6). These are the configurations the description didn't run: the lib in parallel, withdiagnostics, on WARP and with the debug layer.cargo test -p leonida-gpu --lib, in parallel: 694 passed, 0 failed, 61 ignored.cargo test -p leonida-gpu --features diagnostics --lib, in parallel:LEONIDA_D3D12_WARP=1)LEONIDA_D3D12_DEBUG=1descriptor::tests::records_copied_as_bytes_are_made_at_the_next_sync. I've seen that test fail once before on WARP on another branch that doesn't touchcard_steps, so I take it for a flake outside this change.a_copy_behind_a_flight_reads_what_the_flight_wrote(ignored), withLEONIDA_RELAY=2 LEONIDA_CARD_STEPS=2: "48 of 48 copies were done on the card, 0 submissions waited". It passed on hardware, on WARP, and on hardware with the debug layer.--features diagnostics --test replay: 1 passed.cargo clippy -p leonida-gpu --features diagnostics --lib --tests: no warning in the changed lines. The one hit inhost.rs(mem_replace_with_defaultat theBLAMEDtake) is on a line this PR doesn't change.Not run: the release bench, and the game.
GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-02T08:40:57Z.
CPU-only source review at
aef892880. One diagnostics change in the relay path is worth separating from the preserved wait decisions. On main, therelay_waitpredicate callscopied_readwheneverblocked_by(..., false)finds no remaining shader-write blocker.copied_readstill records its matching range viablame. If the initial shader-write blocker lands first and a card-copy destination still has a reader,blamedat the end of the wait reports that copy reader and its range.The new predicate passes
count=falsetoblocked_by_intoinhost.rs:8194. That drops the copy hit's metadata and can leave the initial shader-write attribution in the frame line even when the copy reader kept the wait going. The boolean settle decision is the same. It would help the #2940 measurements to preserve the copy-only attribution on relay polls, or describe the change explicitly. The new boolean equivalence test does not checkBLAMED.AI-assisted static review. No game files or GPU use.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-02T10:02:27Z.
Live in-game 4-leg ABBA verification on Windows 10 22H2 + NVIDIA GeForce RTX 5070 12 GB (driver
621.40, 16C/32T desktop CPU), PR headaef892880merged ontomaina917c54d6(diagbuild,diagnostics,dlss,mimalloc, Series S,-NoFrameGen -NoPrecompile, same save snapshot restored before every leg, 85 s in-world per leg):cargo test -p leonida-gpu --locked --lib card_steps-- 15 passed, 0 failed, 3 ignored.python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/host.rs d3d12/crates/leonida-gpu/src/host/card_steps.rs-- exit0.ERRORlines across all 4 legs;card_stepsactive throughout (513-562card-step log lines per leg).A = main a917c54d6,B = #3069 aef892880):main)#3069)#3069)main)Both ABBA half-pairs (
Leg 2 vs Leg 1andLeg 3 vs Leg 4) favor#3069in the steady-world slice (+0.75 fps/-1.20 msand+1.60 fps/-3.05 ms, compensating for run-order drift across legs 1->4).Result: PASS on live gameplay stability and performance (no regression; small positive steady-world margin).
@ecox982745's diagnosticsBLAMEDattribution note onhost.rsremains a separate diagnostics-only point.AI-assisted: yes (Antigravity).
Imported from ubiquitarianism/leonida. Originally posted by piyonchu on 2026-12-02T11:44:46Z.
Thanks @ecox982745 for catching the diagnostics attribution difference, and @Kal0s-design / @lixonik for the WARP, debug-layer, and live 4-leg ABBA testing.
Updated in
311d33a40:blame_copied: booltoblocked_by_into(host.rs) so bothrelay_wait(count=false, blame_copied=true) andlate_blocked(count=true, blame_copied=true) preserve legacycopied_readBLAMEDattribution under--features diagnosticswhenever no shader-write blocker takes precedence, while keeping release builds zero-cost (cfg!(feature = "diagnostics")).single_pass_blocked_by_into_matches_legacy_precedence(card_steps.rs) to assert exactBLAMEDparity against legacyblocked_by+copied_readunder--features diagnostics.python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/host.rs d3d12/crates/leonida-gpu/src/host/card_steps.rs— exit0cargo check --lib -p leonida-gpu --locked&cargo clippy -p leonida-gpu --features diagnostics --lib --tests --locked— passed (0warnings in touched files)cargo test --locked -j 4 -p leonida-gpu --features diagnostics --lib -- card_steps --test-threads=1—15 passed; 0 failed; 3 ignoredcargo test --locked -j 4 -p leonida-gpu --lib -- --skip depth_bounds_pipeline_loads_and_filters_draws --test-threads=1—693 passed; 0 failed; 61 ignored; 1 filtered outcargo test -p leonida-gpu --features diagnostics --test replay --locked—1 passed; 0 failedImported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:02:22Z.
Code review of the new commit only, not built (Windows-only
leonida-gpu). Ready, with one note on the in-game evidence.311d33a40, merge basea917c54d6, 184 behind currentmain45dc41f95. A trial merge is clean. CI on the head: all 6 checks pass.aef892880:main).311d33a40came after both. The author reportscard_steps15/15 under--features diagnostics, the whole lib 693 passed, and the replay test.Review of
aef892880..311d33a40(host.rs,host/card_steps.rs):blame_copiedflag restores thecopied_readBLAMED attribution that ecox982745 found missing forrelay_waitandlate_blocked.record_copied_blame = cfg!(feature = "diagnostics") && blame_copiedkeeps the early return!need_copied_if_blocked && !count && !record_copied_blameidentical to before in release builds. Release behaviour of this commit is therefore unchanged, and the in-game ABBA onaef892880still describes what ships.emit_copied_blameruns only whenblocked.is_none(), which matches the legacy precedence where a shader-write blocker wins.single_pass_blocked_by_into_matches_legacy_precedencecompares(blk, copied, BLAMED)against the legacy pair under diagnostics. That is the right oracle.BLAMEDmutex. Under a parallelcargo test --features diagnostics --lib, any other test that callsblamecan interleave and flake it. The author ran with--test-threads=1. It would be worth one parallel run, or reading the attribution through a returned value instead of the global.Verdict: ready. The render-path in-game gate was met on
aef892880, and the follow-up is diagnostics-only.AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by icdmkg2 on 2026-12-02T20:22:14Z.
Third-party Windows verification of #3069 (
D3D12-CARD-STEPS-PLAN-SCRATCH) on head311d33a40Follow-up Windows build/test verification for the post-review commit
311d33a40(blame_copied/BLAMEDattribution parity under--features diagnostics).311d33a4038a95af56c34925e32bace4f9d5849dmerged 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(host.rs,host/card_steps.rs)0python -I scripts/red_green.py 3069 --mutate(LEONIDA_ADAPTER=5060)767passed,0failed inleonida-gpu; red:red does not build(cannot find function copied_read in module card_steps, expected for refactored internal helpers)LEONIDA_ADAPTER=5060cargo test -p leonida-gpu --features diagnostics --locked --lib -- card_steps --test-threads=115 passed, 0 failed, 3 ignored(includessingle_pass_blocked_by_into_matches_legacy_precedencewithBLAMEDparity)LEONIDA_D3D12_WARP=1+LEONIDA_D3D12_DEBUG=1(samecard_stepscommand,--features diagnostics)15 passed, 0 failed, 3 ignoredLEONIDA_ADAPTER=5060cargo test -p leonida-gpu --features diagnostics --test replay --locked1 passed, 0 failedbench_card_steps(--ignored, unoptimized debug build, Ryzen 7 H 260)plan:3963.5 -> 1092.7 us/iter(3.63x);elsewhere(4 queries):357.4 -> 291.9 us/iter(1.22x);elsewhere(120 queries):10849.4 -> 10926.8 us/iter(0.99xin debug)AI-assisted: Gemini 4 Neon (High) via Antigravity (test execution, diff review, and write-up).
Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-12-02T21:02:29Z.
RUN (in-game RTX 3090 300 s stress gate, 14-PR combined batch) — PASS covering exact head
311d33a4038a95af56c34925e32bace4f9d5849d.git merge --no-ffontomainb41763227(diagnostics,dlss,mimalloc,exe_sha16 = c47eeb717f761d9d; changed-file clean-room scan exit0; standalone Windows red/green unit tests also passed694default /775diagnostics inleonida-gpu --lib, with compile-time red onRefreshSpan).14PRs):#3200d1a91afd1,#319880a627bb1,#319193b47ac9d,#3189c182fc392,#3176ae0075d9a,#3168337388052,#31641065952da,#3146ebc0253ff,#312464600ef0c,#3069311d33a40,#30318df1bfce7,#3029e49404808,#3054ff53fd8b9,#3010d645712a3.610.88, Series X profile,2560x1440,-NoFrameGen,LEONIDA_RELAY=2,LEONIDA_CARD_STEPS=2(card-step planning active),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
311d33a40(withLEONIDA_RELAY=2&LEONIDA_CARD_STEPS=2active). (Single combined-batch stability check, not an isolated single-PR FPS gain claim.)(AI-assisted verification:
gemini-4-neon+gpt-6.2-astra.)Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T22:39:38Z.
VERIFY-3069 — Windows nativo: 15 pruebas del planificador de pasos pasan y el control muerde la compartición
(this PR)a917c54d6(behindmainb41763227)main—merge-treeclean,git merge --no-ffclean (auto-mergedhost.rs)Ran
Negative control (synthetic): a fill with several slots should point every one at its bytes; I made it take only the first (
take(1)), rebuilt and ran:Two bite.
What the change is: the step planner's
Refreshbecomes linear — a fill that several slots show is remembered and every one of them is pointed at its bytes once, instead of each slot re-scanning; a single slot expands in order only when its fill is shared. The comment keeps the measurement that motivates it (3,100–11,600 fills a frame, nearly all out of one host copy of the title's 174 MB heap, each aCopyBufferRegionthe card runs serially).Three ignored tests, named so nobody wonders: two benchmarks (
bench_card_steps_elsewhere_before_vs_after,bench_card_steps_plan_before_vs_after) and one that wantsLEONIDA_RELAXED…set.What I could not test
FillTo::Slots; the 3,100–11,600 a frame are quoted.card_steps.rs: read around the tests and the changed function, not line by line.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by x2Tweek on 2026-12-03T12:01:31Z.
RUN (in game, RTX 5090 32 GB, hardware RT on): PASS, 0 device losses. No frame-rate or submitting-thread change I can measure in this scenario.
311d33a40, merged--no-ffonto mainba9e65cec. Base: mainba9e65cecalone, built the same way.build-nvidia.ps1).-HardwareRT -SmoothMotion -PrecompileAll -Dlss quality, Series X profile, 4K output, the same save each run. A key driver presses Enter only while the log shows the menu. In the world the character walks and the camera turns all the time (look keys, 20 s each way). 330 s in the world per run. Order: PR, main, PR, main.LEONIDA_D3D12_DRED=1.AI-assisted: runs, key driver and log reading done with Claude Opus 5.5 (Claude Code); the numbers are the runtime's own log lines.
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.