d3d12: read and detile only the written levels of a write-watched texture (D3D12-TEXTURE-DIRTY-MIP-DETILE) #3072
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/3072:github-pr/3072" git switch "github-pr/3072"
Open
leonida/mandy
zmasi wants to merge 5 commits from
github-pr/3072 into main
pull from: github-pr/3072
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/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/2822
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!3072
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/3072"
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.Claimed in the coordination issue as:
D3D12-TEXTURE-DIRTY-MIP-DETILE(https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7331141228)What and why
Previously, a write observed by the write watch anywhere inside a staged texture caused
Staging::refresh_timedto copy the entire texture out of title memory (copy_mapped) and CPU-detile every mip level of every array layer (texture.rs's module comment notedshortcut: a change detiles the whole texture, not the pages written).This change maps the written pages to the texture parts (
(mip, slice)subresources, with packed tail mips in a slice sharing their block) that overlap them, reads each contiguous run of dirty parts into its exact offset in the thread's scratch read buffer (read_runs/read_written), and CPU-detiles only those dirty parts into the persistent staging buffer (Staging::detile_parts) while leaving untouched levels intact:LEONIDA_PARTIAL_DETILE(on by default;=0restores whole-texture copy + detile;LEONIDA_AB-toggleable viacrate::toggled!, documented ind3d12/docs/switches.md). Turning it off clears the sparing budget so toggling0 -> 1mid-run always re-seeds from a full read first.refresh_timed(never on hash/guard turns, bakes,on_demandresidency textures,LEONIDA_INPLACE, copy-timing modes, 3D/MSAA textures,>64parts, or all-shared-page layouts), on hosts where first touch of a newly committed write-watched page is noted, after a full read verified every page resident as private memory in a single write-watched allocation, while preceding spared gaps remain resident private pages validated in forward address order before each run copy (all_private) with no unasked kernel writes (GetWriteWatchwithout reset) and an even, unchangedwatch::changes()epoch, bounded to at most 16 consecutive sparing refreshes (SPARING = 16) before a full refresh. Any failed check falls back cleanly to the existing fullcopy_mapped+ full detile path.d3d12/crates/leonida-gpu/src/texture.rs(384 KiBvs640 KiBcap) +d3d12/docs/switches.mdare the only files touched (merge-clean with #2841).monte-alt/vesper3cf0c18(GPL-3.0), "Limit trusted dirty-mip reads to the selected texture span", extended here to per-run disjoint reads without holding the title-memory read lock and guarded by kernel working-set / non-resettingGetWriteWatchvalidation and bounded sparing.Measured (release build, synthetic
1024x10242-layer 10-mip2.8 MBBC7 texture, 11 runs on Ryzen 9 5950X)64 KiBlevel31–40 us(43–60 uscold)54–66 us(70–90 uscold)385–496 us(~7–12x faster)256 KiBlevel47–55 us67–79 us377–455 us(~5–7x faster)1 MiBlevel165–187 us(211 usonce)179–207 us(235 usonce)396–427 us(~2.2x faster)419–485 us397–447 us(+13–38 uspage-validation overhead)(Synthetic host benchmark only; no retail title was run.)
Tested
cargo test --target x86_64-pc-windows-msvc -p leonida-gpu --lib -- dirty_mip_detile written_parts --nocapture(with and without--features diagnostics, and underRUST_TEST_THREADS=1): 14 checks covering poisoned scratch buffers (0xAA/0x55), packed tail mips, multi-slice 2D arrays,on_demandresidency flips, short-read / decommitted /PAGE_NOACCESSforward-order gap validation, concurrent mapping-epoch changes, competing write-watch askers, 16-refresh lost-note self-repair, excluded layouts, andLEONIDA_PARTIAL_DETILE=0parity (gracefully printsSKIPwhen no D3D12 host or qualifying write-watch is available).python -I scripts/red_green.py: red on base (9/10 switch-on checks fail, e.g.2,883,584bytes read where65,536are due), green on HEAD.cargo test --workspace --exclude xtask --locked --no-fail-fast -- --skip depth_bounds_pipeline_loads_and_filters_draws: all 32 workspace test binaries green (695 passed, 0 failedinleonida-gpuon currentmain).cargo clippy --target x86_64-pc-windows-msvc -p leonida-gpu --lib --tests --no-deps(0warnings intexture.rs),python -I tools/d3d12_switches.py --check d3d12/docs/switches.md(rc=0), andpython -I scripts/check_no_game_data.py(rc=0).GPUs tested: NVIDIA GeForce RTX 3090, driver 32.0.16.1088 (610.88), Windows 11 Pro 10.0.26200 (synthetic D3D12 unit-test host only; no game files).
AI-assisted: yes — authored with Claude Fable 5.2, design & diff audited across 9 rounds by GPT-6.2 Astra (
xhighread-only Codex CLI + rubric), and independently reviewed by a separate read-only Claude Opus 5.5 reviewer agent.Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a — no shader translator rule changed)Windows 11, MSVC toolchain 1.98.1. Head
06998df00merged into currentmaina917c54d6: the merge is clean. Unit tests only, no game.The tests ran for real here, not as a skip. With
--nocapture, thedirty_mip_detileandwritten_partstests printed noSKIPon the hardware device or on WARP, so this host qualifies.partial_detile()answer false.the_levels_written_are_read_alone_and_all_of_a_texture_as_beforethen fails with 7 of its checks:a_written_page_has_its_level_read_and_detiled_alone,levels_written_apart_are_read_apart,a_texture_read_from_a_later_level_has_its_written_level_read_alone,a_written_level_that_cannot_all_be_read_has_the_whole_texture_read,a_level_taken_anew_is_read_again_with_the_next_write,a_texture_with_levels_on_demand_is_read_wholeanda_write_the_write_watch_lost_is_read_with_the_whole_texture_in_its_turn. With the change: 4 passed, 1 ignored.cargo test -p leonida-gpu --lib, in parallel: 695 passed, 0 failed, 60 ignored.cargo test -p leonida-gpu --features diagnostics --lib, in parallel:LEONIDA_D3D12_WARP=1)LEONIDA_D3D12_DEBUG=1LEONIDA_PARTIAL_DETILE=0cargo clippy -p leonida-gpu --features diagnostics --lib --tests: no warning intexture.rs.python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: exit 0.Not checked: the release bench, and the game.
GPUs tested: one NVIDIA desktop card + WARP.
AI-assisted: yes (Claude Code).
Verified locally on Windows 10 22H2 + NVIDIA GeForce RTX 5070 12 GB (driver
621.40, 16C/32T desktop CPU), PR head06998df00merged cleanly ontomaina252854a2:cargo test -p leonida-gpu --locked --lib texture::-- exit0(28 passed, 0 failed, 5 ignored measurement benchmarks).python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/texture.rs d3d12/docs/switches.md-- exit0.diagbuilddiagnostics,dlss,mimalloc, Series S,-NoFrameGen -NoPrecompile,LEONIDA_AB=8,LEONIDA_PARTIAL_DETILE, 8 s turns, standing in-world, ~4,420 draws/frame):ERRORlines across 49 A/B phases (397 s total, 260 s in-world; overall 3000-4999 draws median 26.4 fps, texture refresh0.5 ms/2.3 MBper frame).Result: PASS -- unit tests pass, 0 runtime errors, and clean non-regression standing in-world (where per-frame texture detile load is only ~0.5 ms; larger gains are expected during heavy streaming/driving).
AI-assisted: yes (Antigravity).
Checked #3072: the switches registry passes merged onto current
main(Linux); the Rust was reviewed at the level of its design, not built (Windows-only). The code is careful and tested, but it adds about 2,000 lines to a hot path, on by default, and the only in-game A/B shows no frame-time change.06998df00emain45dc41f95c(clean merge treebbeb07c30f; merge basea917c54d6a, 184 commits behind)d3d12/crates/leonida-gpu/src/texture.rs+2,015 / -42,d3d12/docs/switches.md+11 / -10partial_detile()false: 7 checks fail; crate green on hardware, WARP, WARP + debug layer), lixonik (RTX 5070 / 621.40: unit tests, plus an in-run A/B withLEONIDA_AB=8,LEONIDA_PARTIAL_DETILE)Ran (Linux, on an export of the merge tree with its own
git init)Review
LEONIDA_INPLACE, copy-timing modes, 3D/MSAA, more than 64 parts, or a mapping change in flight (oddwatch::changes()). Any failed check falls back to the old whole copy and detile, and at mostSPARING = 16sparing refreshes run in a row before a whole one.detile_partsstill reports a failed detile, and the refresh then counts zero sparing. The switch is A/B-able, and=0restores the old path.Concern (engineering bar, not a bug). AGENTS.md asks for simple code on hot paths and for measured gains (
docs/measuring_fps.md). This is about 2,000 lines of subtle invariants (working-set queries, non-resettingGetWriteWatch, epoch parity) whose failure mode is a stale texture level, on by default, without a measured frame-time gain. Before merging, I would ask for one of:docs/measuring_fps.md, that shows a gain; orLEONIDA_PARTIAL_DETILE=1to opt in) until such a run exists.The
monte-alt/vesper3cf0c18(GPL-3.0) attribution is compatible withd3d12/(GPL-3.0-or-later).Verdict: defects (needs a measured gain, or default off). No correctness defect found in what I read.
AI-assisted: Claude Opus 5.5 (Claude Code), review only.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Thanks @MoonEyes — makes complete sense on the hot-path bar. Implemented Option 2 in
192640e94f(merged with currentorigin/main):partial_detile()fromtoggled!toasked!("LEONIDA_PARTIAL_DETILE"), so partial write-watched mip detiling is now off by default (default path 100% unchanged;LEONIDA_PARTIAL_DETILE=1opts in, andLEONIDA_AB=<s,>LEONIDA_PARTIAL_DETILEstill toggles it live for driving/streaming A/B runs).dirty_mip_detile_tests/written_parts_testschild-process harness to testLEONIDA_PARTIAL_DETILE=1alongside both unset (default-off) and=0, and regeneratedd3d12/docs/switches.md.Verified on
192640e94f:cargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib texture::->28 passed; 0 failed(and--features diagnostics texture::dirty_mip_detile_tests-> passed)python -I tools/d3d12_switches.py --check d3d12/docs/switches.md&python -I tests/test_d3d12_switches.py->20/20OK.Third-party Windows verification of #3072 (
D3D12-TEXTURE-DIRTY-MIP-DETILE) on opt-in head192640e94Follow-up Windows verification of the new opt-in head (
LEONIDA_PARTIAL_DETILEswitched toasked!, off by default).192640e94faf050434da3889344774cbd609d17amerged 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 d3d12/crates/leonida-gpu/src/texture.rs d3d12/docs/switches.md0python -I tools/d3d12_switches.py --check d3d12/docs/switches.md0python -I tests/test_d3d12_switches.py20/20OKLEONIDA_ADAPTER=5060cargo test -p leonida-gpu --features diagnostics --locked --lib -- texture::28 passed, 0 failed, 6 ignored(exercisesLEONIDA_PARTIAL_DETILE=1, unset default-off, and=0)LEONIDA_ADAPTER=5060+LEONIDA_D3D12_DEBUG=1cargo test -p leonida-gpu --features diagnostics --locked --lib -- texture::dirty_mip_detile_tests1 passed, 0 failed, 1 ignoredLEONIDA_D3D12_WARP=1+LEONIDA_D3D12_DEBUG=1(samedirty_mip_detile_testscommand,--features diagnostics)1 passed, 0 failed, 1 ignoredCode note (READ IN CODE)
partial_detile()now usescrate::asked!("LEONIDA_PARTIAL_DETILE"), keeping the default path unchanged unless explicitly opted in or toggled viaLEONIDA_AB.AI-assisted: Gemini 4 Neon (High) via Antigravity (test execution, diff review, and write-up).
RUN (standalone RTX 3090 300 s stress gate + Windows red/green unit tests) — PASS covering exact head
192640e94faf050434da3889344774cbd609d17a.80910637f(diagnostics,dlss,mimalloc,exe_sha16 = 7e7b83c6c34f6399; changed-file clean-room scan exit0).80910637f): focused dirty-mip test read2,883,584bytes where it expected65,536.cargo test -p leonida-gpu --lib --locked -- --test-threads=1passed707default /788with--features diagnostics.610.88, Series X profile,2560x1440,-NoFrameGen,LEONIDA_PARTIAL_DETILE=1,scripts/game-gate.ps1(301.9 sin world) with downtown street-level teleport + 8-leg dynamic sprint/turn/strafe stress mod (GATE CONTROL moved=1.10 m,max_from_ctrl=5,073.6 m).#3072(LEONIDA_PARTIAL_DETILE=1,7e7b83c6c34f6399)mainb41763227baseline (cf499737bf684f6a)clean,0reasons,0warnings)clean,0reasons,0warnings)301.9 s305.6 s0/0/00/0/020.45 FPS/68.68 ms19.13 FPS/74.01 ms7,812/6.885 s7,983/2.358 s38,148 MB/15,560 MB37,803 MB/16,220 MBVerdict: PASS for the 300 s standalone in-game gate on
192640e94withLEONIDA_PARTIAL_DETILE=1active. (Single-run stability gate; we also plan an in-processLEONIDA_AB=4,LEONIDA_PARTIAL_DETILEmeasurement next.)(AI-assisted verification:
gemini-4-neon+gpt-6.2-astra.)VERIFY-3072 — Windows nativo:
red then greenen el interruptor192640e94—texture.rs(+48/−…),docs/switches.md(4 lines)Ran at the head
Negative control (synthetic): I made
partial_detile()returntrueunconditionally — the switch forced on, the opposite of what the pull request makes it — and rebuilt:It bites, and the failing test's name says exactly what was broken: with the switch off, the whole texture must be read, and my mutation made "off" impossible.
What the change is:
LEONIDA_PARTIAL_DETILEbecomes opt-in by default — the switch is nowcrate::asked!(...), so unset means the old whole-texture read — anddocs/switches.mdsays so. Turning a default off is the kind of change that needs a test on the unset path, and this one has it: the failing name is the unset path.What I could not test: the detiling itself on a title's texture — the tests drive the parts/pages bookkeeping, and the run numbers quoted in the comments (72, 73) are the author's.
Written with an AI assistant.
Follow-up RTX 3090 paired performance verification on unchanged head
192640e94faf050434da3889344774cbd609d17a: two additional sequential in-game runs completed, one idle and one with sustained traversal. Both passed a 300 s world gate and exited cleanly with 0 crashes/device losses. This extends the stability report above; it does not establish an FPS gain.Windows 11 Home build 26200, Ryzen 9 5900X, 32 GiB RAM, RTX 3090 24 GB, NVIDIA 610.88. Series X title upscaler, 2560x1440 output, no frame generation, warm cache, same restored save template, no concurrent build/test suite.
LEONIDA_AB=4,LEONIDA_PARTIAL_DETILE; these are within-run neighboring off/on phase comparisons, not separate-run ABBA.Traversal was verified from 25 post-teleport warm position samples over 240.7 s: at least 171.4 m traveled, with movement in every third of the analysis window. All 13 accepted pairs were bracketed by movement. The on-phases still averaged 269 ± 103 more draws/frame, so residual scene variation limits attribution. Idle submitting-thread work fell 1.10 ± 0.50 ms/frame; traversal work changed +0.41 ± 0.47 ms/frame.
Verdict: five-minute stability PASS in both runs; frame-time improvement inconclusive (both intervals include zero). One session per condition, no visual-correctness verdict and no isolated RAM-saving claim.
Provenance: historical staged source head above, recorded base
80910637f14f212553135e06907cae81ade1b46d, executable SHA-2567e7b83c6c34f63992d855441fec119b9b9dbd51dc86a46ac6a99ab5b598fa244, featuresdiagnostics,dlss,mimalloc. Launcher checkoutb41763227; this is not a fresh integration test against today's main. Raw logs/captures remain private.AI-assisted: GPT-6.2 Astra ran and analyzed the captures; GPT-6 Astra inspected the sanitized report and posted this follow-up.
Merged
origin/main(516c9eaabf) into98a5322491strictly to regenerated3d12/docs/switches.md(needs rebase);d3d12/crates/leonida-gpu/src/texture.rshas a byte-identical diff againstorigin/maincompared to192640e94f(verified by @EdenBendheim and @fiestorra above).AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
RUN (in game, batch of two pull requests), each head merged with
git merge --no-ffonto main516c9eaab, in one build: #2789b511f5c93, #307298a532249. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. Both were in earlier batches on other heads; this run covers their current heads. #2789's discard of stale pipeline libraries only acts after a driver update; the driver did not change here, so that path was not exercised.AI-assisted (Claude Code).
Integration check on
98a532249with #3291 ata643d5ae. Git reports one conflict in the generatedd3d12/docs/switches.md. I regenerated it from the paired sources, then ran the stricter checker from #3270 and all 21 catalog tests successfully.The combined tree builds the
leonida-gputest binary forx86_64-pc-windows-msvc. Under Wine, all five frame-time tests and the two CPU dirty-part tests run and pass. The kernel write-watch case printedSKIPbecause this host does not qualify, and the staging cases printedSKIPbecause no D3D12 host was available. This covers the paired source build, catalog, and CPU checks. AI-assisted with OpenAI Codex.Merged
origin/main(6e97990505,#3318) into0f1e26355estrictly to regenerated3d12/docs/switches.md(needs rebase);d3d12/crates/leonida-gpu/src/texture.rshas a byte-identical diff againstorigin/maincompared to98a5322491.AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
RUN (in game, third party, batch of five pull requests), each head merged with
git merge --no-ffonto mainb053a1813, in one build: #2686c5269801b, #26432e0b23a00, #27894cd9d71f8, #30720f1e26355, #299991537d2af. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.6 fps on other runs today: a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #2834 was left out of the batch (it conflicts with the others).
Limits: one run; arrival in the world was driven by keys and not checked on pictures. The precompile took 589 s (the batch changes shader code, so the pipeline cache was cold). Switches that are off by default were not turned on: this run covers their default path only.
AI-assisted (Claude Code, Claude Opus 5.5).