D3D12-SHADER-OPT-MERGE-WALK: keep the merge walk's tables between programs (full-archive wall -7 %) #2822
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2822:github-pr/2822" git switch "github-pr/2822"
Open
leonida/mandy
bobcatchris wants to merge 2 commits from
github-pr/2822 into main
pull from: github-pr/2822
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
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
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2822
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/2822"
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?
This branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Item: D3D12-SHADER-OPT-MERGE-WALK, claimed at https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7298213349 (second attempt at the released D3D12-SHADER-OPT-MERGE-KEYS, https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7297836058).
What
Module::merge(the FOLD/REUSE/FACTS/LOADS walk inemit/bitcode/opt.rs) made its three tables (known,dom_reads,lane_reads), its replacement list and itspath_has_writescratch new for every round of every program. The tables now live in aMergeWalkkept in a thread-local byoptimise, between rounds and between programs, cleared at the start of every round.path_has_writereuses a visited-stamp array and a frontier, the block body is compacted in place, andKey's argument lists are shared (Rc<[V]>) so a key clone is a refcount bump.The walk makes the same decisions: same keys, same insertion and removal order, no table is iterated. This is a pure speed change; the DXIL does not change.
Measured (Ryzen 7 7800X3D, Windows 11; no game run, no GPU involved)
Full-archive
leonida translate(LEONIDA_HOST_RDNA=1, local hash instrument for output identity), four alternating pairs againstmaind920d850d:main(The kernel drop is the bucket arrays' page faults; the last two pairs ran under background load that inflated both sides' kernel time. A first version with only the clone fix and per-
optimisereuse measured neutral, see the release comment; the saving is the growth between programs.)main; the single exception across runs was two containers of one compute program that also flip between runs of unmodifiedmain(pre-existing nondeterminism, reported as a finding in #2570). Byte-identical output makes validator results identical by construction.cargo test -p leonida-shader --lib: 403 passed, 0 failed (includes the optimiser fuzz testevery_pass_leaves_what_random_programs_store).cargo clippy -p leonida-shader --no-deps --all-targets: no new warnings (3 pre-existing, the same asmainon this toolchain).python -I scripts/check_no_game_data.pyon the changed file: clean.AI-assisted: Claude Sonnet 5.5
Verified by OreoFR on macOS 27.2.1, Apple M5, Rust (rustup), head
edc3edfb0, mainbf19719ab. CPU only, no game archive.MEASURED
cargo test --release -p leonida-shader: main 242 passed, 0 failed, 2 ignored; main + this PR (merge-tree, no conflict) 242 passed, 0 failed, 2 ignored. The same counts with--features diagnostics. The build warning count is unchanged (2 / 2).READ IN CODE
MergeWalklives in athread_local!RefCell, borrowed mutably for the whole round loop inoptimise. That would panic ifoptimisere-entered on the same thread, but it doesn't. Outside the tests, the only caller isemit/shader.rs:706, andmerge,prune,guardsandchainsdon't call it.known,dom_readsandlane_readsare cleared at the start of every round.replis cleared and resized toinsts.len().path_has_write's visit stamps:seenis resized toblocks.len()per walk, andstamponly grows across programs (it is kept in the walk). A slot left over from a previous program therefore holds an older stamp and can never equal the current mark. On wraparound to 0,seenis zeroed and the stamp restarts at 1. Correct.Key::CallandKey::Gepnow holdRc<[V]>. Equality and hashing go through the slice contents, so keys compare as before. TheRcis notSend, but the walk is thread-local, so that's consistent.ASSUMED
AI-assisted: Claude Code
Verified on Windows: the crate is green with it, and the tests it touches pass with and without the change - which is what an optimisation is supposed to do, and also why this comment cannot tell you it works.
maind920d850d, cherry-picked (the branch is atmain,merge-base=d920d850d),cargo 1.98.1:So the suite does not distinguish the two trees, and that is the honest finding: "keep the merge walk's tables between" is a claim about work not done, not about answers changed, and a passing suite proves the answers did not change - which is the property you want, and it is not evidence that the tables are kept.
What would be evidence: the merge walk's cost on the same inputs. If the pull request has a measurement in its description, that is what to check, not this - and if it does not, one counter or one timing over a fixed corpus would settle it in a way the 403 tests cannot.
opt::has 17 tests and none of them measures the walk.What I can say it did not break: 403 tests, 0 failures, 5 ignored, and the crate's slowest suite (
358.89 s) is green - including the bitcode emission paths the walk sits in.AI-assisted: yes - DeepSeek v4.1 (flash), three runs of the shader crate.
Written with an AI assistant.
Independent allocation count and bitcode comparison on native Windows. I built main
90c514437and the clean merge ofedc3edfb0into it (tree98e61082e) in Release with Rust 1.98.1/MSVC. Both used the same scratch-only test and the 400 stockrandom_programseeds.Each of two fresh processes per tree optimised the whole corpus on one thread in ascending, descending and strided seed order. A thread-local allocator probe counted requests only during
Module::optimise(ALL). Its one-allocation control passed. Program generation, interpreter checks and serialization ran outside the counter.That is about 14.4% fewer allocation calls on this synthetic corpus. Every order preserved the unoptimised interpreter stores for three input patterns per seed. The optimized bitcode matched byte for byte across all orders and across both trees, including in fresh processes. This measures allocator calls in the optimiser. Wall time and retained scratch capacity are outside the measurement.
AI-assisted with OpenAI Codex (GPT-6.2 Sol).
Independent integration check of
edc3edfb0onbf30e2585.emit/bitcode/opt.rsconflicted with the merged hoist and FxHash changes. I resolved it locally by preserving the hoist before each reuse round and using the main branch’s FxHash maps in the reused scratch state.After that resolution, 246 native Rust shader tests passed and 2 were ignored. On the base and the combined version, 400 synthetic optimizer inputs in forward and reverse order produced byte-identical output across all 800 translations. This checks compatibility of the conflict resolution. Timing was outside this run.
AI-assisted with OpenAI Codex.
Merged
main(d359a2f85, no rebase/force-push) and resolved the conflict ind3d12/crates/leonida-shader/src/emit/bitcode/opt.rs:hoist_handles()before eachmerge()round and switchedMergeWalk's maps toFxHashMap<Key, V>.WALK'sRefCell::borrow_mut()strictly aroundself.merge(...)sohoist_handles/prune/guards/chainscannot hit a re-entrant borrow (addressing @KelboLive's nit).cargo test --locked -p leonida-shader --lib bitcode::opt(18 passed, 0 failed) andpython -I scripts/check_no_game_data.py(clean).AI-assisted: Gemini 4 Neon (including an independent read-only reviewer pass).
VERIFY-2822 — Linux, Fedora 45, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files
Verdict: PASS. A production-only allocation/performance refactor of the D3D12 shader optimiser's merge walk. It is
behaviour-preserving: the whole
leonida-shadersuite gives the identical result on the merge base and on the pullrequest (246 passed, 0 failed, 2 ignored on both), and it introduces no new test — so there is nothing red/green to
show, and none is claimed.
Head
d359a2f8, base the currentmain(8422def7), merge base27613ab6, 1 file, +82/−35:d3d12/crates/leonida-shader/src/emit/bitcode/opt.rs.1. What it changes
Module::merge(the single dominator-tree walk behind theFOLD/REUSE/FACTS/LOADSpasses) rebuilt its scratchstorage on every call. The pull request hoists that scratch into one
MergeWalkstruct held in athread_local!,cleared at the start of every round instead of reallocated, so a thread translating thousands of programs grows the
tables once:
mergetakes&mut MergeWalkand clears/resizes each table (repl.clear(); repl.resize(...),walk.known.clear(), …) rather thanvec![None; ...]/FxHashMap::default(). Three concrete wins inside it:path_has_writereuses oneseen: Vec<u32>with a monotonically bumpedstamp(reset only onu32wrap) insteadof allocating
vec![false; has_write.len()]and a freshVec::new()stack on every call.body[kept] = i; kept += 1; … body.truncate(kept)) instead of building asecond
Vec::with_capacity(body.len())per block.Key::Call(u32, Vec<V>)/Key::Gep(Ty, V, Vec<V>)becomeRc<[V]>, so a key holds its argument list by referencecount:
Key::Call(*f, args.as_slice().into()). Since a walk keeps every key twice (inknownand in the block'slist of what it added), cloning a key is now a refcount bump, not a copy of the list.
The borrow of
WALKis taken only around themergecall — the comment notes this is so the other passes(
hoist_handles,prune) cannot hit a re-entrant borrow. Everything inMergeWalkis written and read inside onemergeround; nothing carries over that a later round reads.2. The new test checks the property that matters
There is no new test.
scripts/red_green.pyclassifies every hunk of the diff as touching production code (noneis a whole test file or a
#[cfg(test)]-only hunk), so the red side is "not constructible: the pull request changes notest". That is the correct outcome for a pure refactor and I did not manufacture a test for it. The property that
matters here — same optimisation decisions, no behavioural drift — is what the full-suite comparison in §3 checks.
3. What the tests do here
python3 -I scripts/red_green.py 2822 --crate leonida-shader(own work-dir and target dir):ok, none failedred not constructible(exit 1 — expected, not a failure of the pull request)Because red is not constructible, red_green can only report the green side. I therefore ran the whole crate suite
myself on both the merge base and the head, on clean target dirs (see §4 for why clean matters):
cargo test -p leonida-shader27613ab6246 passed; 0 failed; 2 ignoredd359a2f8(pr2822)246 passed; 0 failed; 2 ignoredIdentical counts, and the same two tests ignored on both sides (
emit::bitcode::tests::bench_write, a benchmark runonly under
--ignored;emit::lower::tests::a_missing_value_stays_missing_through_two_live_joins, gated onLEONIDA_STRICT_JOINS). No regression, no flake.4. Any failure I saw, and why it is not this pull request
I hit no failure attributable to this pull request. Two things I want on the record:
source_hash_testscan fail spuriously when a target dir is shared across worktrees. While iterating I reusedone
CARGO_TARGET_DIRfor several checkouts.build.rsbakesLEONIDA_SHADER_SOURCE_HASHinto the test binary atcompile time, but the test recomputes the hash from the
src/on disk at run time, so a stale binary carries abaked hash that no longer matches the checked-out tree. This produced
the_source_hash_leaves_the_test_modules_out/every_test_module_is_built_for_tests_onlyFAIL onmain, on themerge base and on the pull request alike. Re-running each commit with its own clean target dir passes 246/246 on
both sides (§3). It is an artefact of my harness, not of the code under test — and it reproduces on plain
main,which is what rules out the pull request.
no test hunk; it is not a defect in the pull request.
5. What I did not check
cargo testonly. I did nottranslate any real shader corpus through it, nor run the translated shaders on any GPU.
docs/design.md's rule thata change be confirmed "by a GPU test, a Mesa/LLVM reference, or a count over the corpus" is not satisfied by
what I did: I ran no corpus count, so I cannot say whether the refactor leaves translated output bit-identical —
only that the crate's own unit tests pass unchanged.
cargo clippy/cargo fmtgate; I rancargo teston Linux only.it is structurally fewer allocations by reading the diff, but I did not benchmark it, so I make no claim about
how large the win is or that it is measurable on any workload.
optimise.MergeWalkis per-threadthread_local, which is sound,and the borrow is scoped to
mergeonly; but I reasoned about this from the code, I did not run it under amulti-threaded stress or a data-race detector.
Rc<[V]>change's effect on the wider crate.Keyispub(crate)-internal to the optimiser, and the fullsuite passes, but I did not audit every construction site of
Key::Call/Key::Gepoutsideopt.rsby hand.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).
Ran natively on Windows 11, head
d359a2f85merged into currentmain(128648cfe, merges cleanly now,opt.rsauto-merged), Rust 1.98.1 fromrust-toolchain.toml,--locked. I looked at what earlier comments did not cover: stale state when the kept tables move between programs of very different sizes, a panic in the middle of a walk, and wall time.Suite and lint on the merge
cargo test -p leonida-shader --libcargo clippy -p leonida-shader --no-deps --all-targetsemit/valu_tests.rs(frommain), none inopt.rsKept tables against fresh tables (throwaway tests, not committed)
The reference for each program is the same program optimised on a newly spawned thread, so its
MergeWalkstarts empty. The program under test is optimised on one long-lived thread that has already run everything before it. I comparedModule::write()bytes.FOLD,REUSE,FACTS,LOADS,FOLD|REUSE,LOADS|FOLD,ALL, with a zero-blockModule::default()optimised every 5th program (80 in all)insts, soresolvepanics partway through the walk with the tables already filled (catch_unwind; a backtrace check confirmed every panic came from insideModule::merge). Each panic is followed on the same thread by a smaller valid programRefCellwas not left borrowed and the next program was byte-identical to the fresh thread, 138/138So nothing I could provoke leaks from one program into the next. That covers a larger program before a smaller one, a zero-block module (it returns before touching the walk), and a walk abandoned by a panic. The reason is in the code: every table is cleared or resized before it is read, and
seenonly ever holds stamps older than the next mark.Wall time (release, synthetic corpus)
Module::optimise(ALL)over the 400 programs above, timing only the optimise loop. 10 repetitions per run, 5 alternating runs per tree, so 50 samples each, on one thread:mainThere's no difference I can call real on this corpus: min is 7 % lower, median 2 % higher, and other jobs were building on the machine. That doesn't contradict the body's full-archive figure (−7 % wall, −20 % kernel), which comes from thousands of real programs where the saving is growth avoided between programs. It just means a small synthetic corpus doesn't show it, and I can't confirm the speedup from here.
Not checked: the full-archive translation and its DXIL hashes (no game data here), multi-threaded
optimise, retained memory per thread, and the in-game run asked for above.GPUs tested: n/a (CPU-only tests).
AI-assisted: yes (Claude Code).
Triage of head
d359a2f85(merge base27613ab6b, 369 commits behind;git merge-treeagainst currentmain45dc41f95: no conflicts).1 file:
d3d12/crates/leonida-shader/src/emit/bitcode/opt.rs(+82/-35).CI green on the head (6 checks).
Existing verification: Verified on this head by @imShangLi (Linux: identical suite result with and without), @Kal0s-design (native, stale-state checks across programs of different sizes), earlier by @OreoFR, @fiestorra and @ecox982745 (identical bitcode on 400 random programs, fewer allocations).
This check: Not re-reviewed in depth: a behaviour-preserving allocation refactor (the merge walk keeps its tables between programs). Identical bitcode over random programs is the right evidence for it.
I did not build it: the crate is Windows-only (or the C++ runtime's Windows build), so no red/green was run here.
Verdict: ready (behaviour-preserving refactor with identical-output evidence).
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
RUN (in game, batch of seventeen render-path pull requests), each head merged with
git merge --no-ffonto main3c106eb2f, in one build: #311115b579756, #29485284c6eae, #26981f188c4f7, #294644bf554fe, #3001d924cbb65, #28320c861595a, #291558e8535cf, #2822d359a2f85, #2896c9c6b103d, #29838278ef1b9, #3115ba5121192, #2945d2c08c14f, #297574512d658, #295126da88e8e, #2800b6ebcedd4, #28937c7e99b48, #3113fa1460b6b(and #30970d7a451ab, merged since). RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.The drops under 5 fps line up with shaders being translated while walking (about 500 translations in the last 330 s): this batch changes the shader translation, so the shader cache built by earlier runs did not apply and the pipeline precompile alone took about 45 minutes. The batch-5 run on the same machine and route had no sample under 5 fps (median 16.4). I read this as cold-cache stutter, not as a regression of a single pull request, but this run cannot tell them apart.
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. A first attempt of this batch is not counted: the run script gave up waiting for the game window after 40 minutes of precompile.
AI-assisted (Claude Code).
In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #2822, #2800, #2664 and #2661 merged into main
09273248c; this PR tested at its current headd359a2f85. Series S 1080, DLSS FG 2x,play-nvidia.ps1 -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed, scripted walk, 330 s, screen kept on.AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.