d3d12: batch placed-texture lookups on page writes (D3D12-DESCRIPTOR-WRITE-RANGE-BATCH) #3191
Open
lgtlgt0015-code wants to merge 3 commits from
upstream-pr/3191 into main
pull from: upstream-pr/3191
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!3191
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3191"
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 lgtlgt0015-code on 2026-12-02T17:48:54Z.
Claimed in the coordination issue as: D3D12-DESCRIPTOR-WRITE-RANGE-BATCH
What and why
Physical-page writes and one-shot bakes find placed textures while holding the descriptor span lock. The previous lookup seeks through the span map several times and collects a separate vector for every write.
Tested
u64::MAX. It compares the selected slot set with the old lookup.compact()implementation made the capacity assertion fail (capacity 160 became 1). The patch passes.leonida-gpulibrary suite on Windows: 705 passed, 0 failed, 61 ignored, no test filter. Command:cargo test -p leonida-gpu --lib --locked -- --test-threads=1.Release benchmark with synthetic ranges
Ryzen 7 5700X, Windows build 22631, Rust 1.98.1. Median of 14 rounds with 96 operations per round. The two paths run in alternating order with identical input and compare outputs outside timing.
From
d3d12/:GPUs tested: The benchmark is CPU-only. Library tests ran on a Windows host with an NVIDIA GeForce RTX 5070 Ti (driver 610.62). In-game frame time still needs measurement.
Concurrent write benchmark
The follow-up exercises the descriptor span mutex with a synthetic reader and writer. The reader looks up 5,000 writes against 24,000 spans while the writer signals that it is about to acquire the same lock. The writer alternates a mip end across a queried address. Each update changes the next slot set, and every old/new result matches exactly. The runs interleave the two implementations and collect 640 samples per version on the same Windows host.
The lookup measurement excludes the rendezvous and the output sort. The writer interval includes scheduling between its signal and the lock acquisition. In-game frame time still needs measurement.
From
d3d12/The PR diff against
mainat45dc41f9covers onlydescriptor/host.rs. A comparison with5b1fff82includes the nine files from the upstream precompile change (#3172).AI-assisted: yes. Implementation, benchmarks, and follow-up edits used OpenAI Codex with GPT-6.2 Sol. A separate GPT-6.2 Sol agent independently reviewed the diffs and regressions read-only.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T18:01:26Z.
Verified here: it applies on the current
main, and both tests it adds pass. The one failure in the module is this machine's, and it is already documented.The one failure is
descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, the byte-comparison test that fails because main's device tests still make their device withD3D12CreateDevice(None, ..)and this machine'sNoneis the integrated Radeon (#2995 fixes that; #3188 documents the verdict it produces inred_green.py). 59 of the module's 60 pass, and the two new ones are among them.What the change does, and the property its tests pin: physical-page writes and one-shot bakes find placed textures while holding the descriptor span lock, and the batched form has to find the same slots the pairwise one did - that is what
batched_writes_find_the_same_texture_slotsasserts, and it is the right test for a lookup rewrite (the risk is not speed, it is a texture landing in the wrong slot).compact_reuses_the_range_buffer...pins the other half: the buffer is reused and the widening still matches pairwise.Not covered: the contention it removes. Holding a lock less is only visible under concurrent writers and a title driving them; the tests establish that the answer did not change, not that the time did.
For the merge: the branch carries drift (10 files for a
+190/-26change in one file).AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:04:30Z.
Third-party verification of #3191 (D3D12-DESCRIPTOR-WRITE-RANGE-BATCH)
b071a0a7a2338467b9abebd2c478feef5ee5016e, merge base45dc41f95(= currentorigin/main).git merge-tree --write-tree origin/main pr/3191merges cleanly. GitHubmergeable_state: blocked(review required); no check runs or statuses reported on the head sha yet.claiming: D3D12-DESCRIPTOR-WRITE-RANGE-BATCHby the author in #2570 (comment 7353537441),done: ... -> #3191(7353671082). Claimed: yes.Not built:
leonida-gpuis Windows-only (D3D12). I did a code review only on Linux; none of the tests or the benchmark were run here.Review of
d3d12/crates/leonida-gpu/src/descriptor/host.rsSpans::slots_holding_ranges(host.rs:1176): the reverse walk overby_start.range(..end)takes every span starting in[start, end), then the first key<= start. It includes that key ifat == start(old: inrange(start..end)) or ifspan_end > start(old: thebeforepredecessor), and stops there. So the old exact-start rule (a span atstarthides its predecessor) still holds. Thereaches(slot, start)filter is unchanged. Equivalent to the old per-range lookup. Both callers (host.rs:3171, 3194) still sort and dedup.compact_joined(host.rs:1437):while len > most/2 && len > 1with pairwisechunks(2)produces aligned groups of2^koriginal ranges. The smallest k withceil(len/2^k) <= max(most/2, 1)isnext_power_of_two(ceil(len/limit)), which is what it computes. The in-place write is safe: write indexwis below the read indexw*grouponcegroup >= 2, andgroup == 1returns early.retain_bake_writes(host.rs:1465) calls it right afterjoin, so skipping the secondjoinis correct.batched_writes_find_the_same_texture_slotschecks an exhaustive 122x124 grid includingu64::MAX, andcompact_reuses_the_range_buffer_and_matches_pairwise_wideningchecks 129 lengths x 11 caps. That is good evidence of equivalence.Red/green: this is a CPU-time refactor with no behaviour change, so the slot test is green on both sides by design. Only the capacity assertion is red on
main(the author reports capacity 160 -> 1 with the oldcompact). I did not reproduce either side (Windows-only).Defects / nits
compact_reuses_...andbench_descriptor_write_ranges. The benchmark closures (host.rs:7252-7282) are not rustfmt-shaped.cargo fmt --checkis not enforced ford3d12/, so this is cosmetic.Verdict: defects. The code looks correct and the equivalence tests are thorough. Before merge, the author should add the AI/model disclosure (or state no AI was used), and a Windows maintainer should run
cargo test -p leonida-gpu --lib --locked.AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T20:23:49Z.
Ran natively on Windows 11, head
93b47ac9dmerged into currentmain(b41763227, clean merge).The two earlier comments were on
b071a0a7a. The head now also has the lock-contention benchmark and a fmt commit, and the body has the AI disclosure MoonEyes asked for.Suite (measured,
cargo test -p leonida-gpu --lib --locked -- --test-threads=4)The difference is exactly the two new tests and the two new ignored benchmarks. With
--features diagnostics,descriptor::hostalso passes on WARP (LEONIDA_D3D12_WARP=1) and with the debug layer (LEONIDA_D3D12_DEBUG=1), 60 passed and 7 ignored both times. A throwaway probe confirmed the device was WARP in one run and had the debug layer in the other.The new tests call
slots_holding_ranges, so they can't compile on main. To get a red I put back only the oldcompactbody on the merge.compact_reuses_the_range_buffer...then fails atlen=2 most=0with capacity 160 -> 1, as the body says. The slot test is green both ways by design (measured).clippy
--all-targetsonleonida-gpugives 0 warnings on main and 0 on the merge.No new switch (read).
page_writtenis fed on every page write and on finished reads with the defaultLEONIDA_PAGE_WRITES(1|2|8), so the batched lookup inslots_written_underruns by default whatever bit 2 says. Bit 2 only decides whether slots are made due or the ranges are kept for the bake. With the default, the bake list stays empty, soretain_bake_writesonly matters with bit 2 off. The in-placecompactalso runs by default, but only when a heap'sPAGE_WRITTENlist hits 2^18 ranges.Lookup equivalence (measured, throwaway tests, not pushed)
I wrote a randomized differential test against the old per-range
slots_holding, copied from main. It ran 200k cases. Half were built with directby_startinserts and half throughnote()under all threeRules, with randomforget. Addresses come from a small pool (small values, page boundaries +-1, theu64::MAXneighbourhood) so the edges really collide. The cases include zero-size spans, spans tou64::MAX, page-straddling spans, randomshowsmip ends including ones at or before the write start, and empty or inverted writes. I compared per range (sorted, no dedup) and per batch (multiset, and sorted plus dedup). Everything matched, and about 216k of the single-range lookups returned something.compactmatched the old pairwise loop over 3,000 random cases (unsorted input, touching and non-touching ranges, caps from 0 up to2*BAKE_MOST).retain_bake_writesmatched the old version over 400 cases of 16k to 64k ranges, and its compaction branch was taken in 380 of them. So dropping the secondjointhere is fine.To check that the harness catches mistakes, I ran it against one mutation at a time.
at >= start->at > start*span_end > start->>=at <= start->at < start(the break)range(..end)->range(..=end)compact_joinedgroup +1 before roundingcompactandretainchecksConcurrency. Both callers still do the whole batch under one
placedlock, as before (read). What a write sees is unchanged and only the hold time is shorter. I also ran two writer threads doingnote/forget/showswhile a reader computed old and new under the same guard, and all 200k lookups matched (measured). That only shows they agree on whatever state is there. It isn't a race detector.Timing (measured, one release run)
With wide random writes the gain is smaller (1.4x), since those walk many spans either way. It is still faster.
Conflicts (measured,
git merge-treeagainst every open PR whose file list includesdescriptor/host.rs)descriptor/host.rs. Both add tests at the top ofmod tests, so keeping both sides fixes it. #3016 alone merges cleanly on main.src/host.rs,switches.md), not because of this PR.Not checked: in-game frame time, the full suite under WARP or the debug layer (only
descriptor::host), debug-layer message output (only pass/fail), Loom-style interleavings, Linux.GPUs tested: one NVIDIA desktop card + WARP
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by x2Tweek on 2026-12-02T20:46:04Z.
Game run, standing still: the median frame looks shorter, but with longer worst frames. Not conclusive yet.
Setup: RTX 5090 32 GB, driver 621.40, i9-14900KS, 64 GB DDR5, Windows 11 (26300). Base: upstream main
0d7a451abplus #3113, #3182 and #3204, diag build. Candidate: the same plus this PR at93b47ac9d. Series Xprofile, 3840x2160 output, render scale 0.6667, hardware ray tracing (
-HardwareRT -SmoothMotion -PrecompileAll -Log), fullscreen.Tests:
cargo test -p leonida-gpu --lib descriptorgives 96 passed, 0 failed and 8 ignored.Method: four automated runs in the order base, PR, base, PR. Each one loads the same save with scripted Enter
presses, then stands still with no input. The figures cover 90 s from 30 s after the world is drawn, taken from the
frame log's 5 s lines.
the write trackers also doubled (
copystat's "waits for the write trackers' locks").two base runs differ by 10 %. So these four runs cannot tell the PR's effect from the title's own state. A longer
A/B inside one run would settle it, if the batching could sit behind a switch.
AI-assisted: the build, the automated runs, the log reading and the write-up were done with Claude Opus 5.5
(Claude Code); the numbers are the runtime's own log lines from the runs above.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T20:59:38Z.
VERIFY-3191 — Windows nativo: los dos tests nuevos muerden, y la suite no se rompe
(this PR)45dc41f95(behindmainb41763227)main—merge-treeclean,git merge --no-ffcleanRan
The failure is this machine's, unchanged all day:
views_are_made_beside_the_heap_and_copied_infails identically on cleanmain(the iGPU artefact ofD3D12CreateDevice(None, ..)that #2995 addresses). The two new benchmarks are correctly#[ignore]d, so they do not run in the suite.The PR ships its tests in the same file, so the red side was built synthetically: I made
slots_holding_rangesreturn an empty vector under a test variable, rebuilt and ran →FAILED: batched_writes_find_the_same_texture_slots,assertion left == right failed: 0..0. The test bites.The oracle is the right one:
batched_writes_find_the_same_texture_slotscompares the new batched lookup against the pairwise answer the old code produced over the same spans, andcompact_reuses_the_range_buffer_and_matches_pairwise_wideningdoes the same for the compacted ranges. A batching change that agrees with the old path on a fixture of real slot ranges is exactly what can be checked without a GPU.What I could not test
bench_descriptor_write_rangesis#[ignore]d and I did not run it.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-12-02T21:01:18Z.
RUN (in-game RTX 3090 300 s stress gate, 14-PR combined batch) — PASS covering exact head
93b47ac9d715396491a7da023fe53faa7be1e9af.git merge --no-ffontomainb41763227(diagnostics,dlss,mimalloc,exe_sha16 = c47eeb717f761d9d; changed-file clean-room scan exit0; workspace test targets compiled). Standaloneleonida-gpubuild (exe_sha16 = bd5e08c6aab43fe8) also compiled and passed targeted crate checks cleanly.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 s35,619 MB/15,251 MB37,803 MB/16,220 MBVerdict: PASS for the 300 s in-game stability gate on
93b47ac9d. (Single combined-batch stability check, not an isolated single-PR FPS gain measurement; if the head changes, this run no longer covers it.)(AI-assisted verification:
gemini-4-neon+gpt-6.2-astra.)Imported from ubiquitarianism/leonida. Originally posted by Lanworm on 2026-12-03T12:10:48Z.
RUN (in game, 8 alternating runs A B B A A B B A): no clear difference in the median frame time on a 6-core desktop.
maind9b618f1. B is the samemainwith this PR's head93b47ac9dmerged (git merge --no-ff, clean). Both arediagbuilds (diagnostics,dlss) made byd3d12/scripts/build-nvidia.ps1.d3d12/scripts/play-nvidia.ps1 -NoFrameGenwith the F1 menu's saved choices: Series X, the title's own upscaler from a render scale of 0.6667 (no DLSS), a 60 fps cap no run reached. The same save was loaded each time. The player stood still with the title's idle camera going round its views, for 330 s in the world per run.LEONIDA_KEYS_FILE, and each run ended withWM_SYSCOMMAND/SC_CLOSE, asscripts/game-gate.ps1does. Every run reached the world and ended cleanly.python -I tools/d3d12_ab_compare.py abba, world median frame time:What this does and does not say:
Only numbers are quoted here: no logs, captures or game data.
AI-assisted: yes (Claude Code, Claude Opus 5.5). The runs were driven and analysed by the assistant on the submitter's machine.
Edited 2026-12-03: the setup corrected. Every run's settings line shows the F1 menu's saved Series X (render scale 0.6667, the title's own upscaler, no DLSS) and its 60 fps cap, which no run reached; not the script's Series S defaults as first written. Both sides ran the same; the numbers are unchanged.
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.