d3d12 gpu: VirtualQuery walks the write watch stood behind while walking (D3D12-HWRT-REGION-WALK-STALLS) #3113
Open
github-bot
wants to merge 8 commits from
github-bot/gh-3113 into main
AGit
pull from: github-bot/gh-3113
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
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
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!3113
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3113"
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?
@rockcabbage on GitHub · 2026-12-02 11:26 UTC · original
rockcabbage:gpu-stalls-behind-region-walks→main· +168 −14 · 5 files · 8 commits · openClaimed in the coordination issue as:
D3D12-HWRT-REGION-WALK-STALLSWhat
Two callers of
VirtualQueryheld up frames while walking with hardware ray tracing on.VirtualQueryanswers withthe length of the run of pages in the same state and walks the page tables to the run's end to find it (what
texture::by_queryalready says of the textures' pass); in the title's pools that is 21-36 ms a question, and thesubmitting thread's
GetWriteWatchstands behind the walk for as long.hwrt.rs:readable_len/title_readable, asked for each geometry of a batch of bottom-level builds, walkedtwice in a row (47-48 ms for the batch). They now ask page by page through
texture::readable_bytes(
QueryWorkingSetEx, 256 pages a call).LEONIDA_HW_RT_REGION_QUERY=1asksVirtualQueryas before, andLEONIDA_ABcan switch it.texture::readablenow leaves a working-set page that isPAGE_NOACCESSor a guardto the read, so the page-wise answer refuses what the walk refused.
copystat.rs: the frame meter's five-second lines askedVirtualQueryonly for the kind of memory of the tenranges most copied from (one walk of 24-28 ms each time). They ask about the one page now (
texture::shared); theline says
shareable memory/private or untouched memorywhere it gave the type's number.Measured
RTX 4090, i9-13900K, Windows 11, Series X profile, 2560x1440,
-HardwareRT -NoFrameGen, diag build. A scripted walkwith camera turns of 110 s (
LEONIDA_KEYS), a timeline of 12 frames every 3 s (LEONIDA_TIMELINE), the switch byturns of 5 s inside the run (
LEONIDA_AB=5,LEONIDA_HW_RT_REGION_QUERY), two runs.hwrt.rsVirtualQuery(switch on)One timeline straddled a turn of the switch and is left out. In the timelines that hold a walk the submitting
thread's longest
GetWriteWatchis 22-47 ms (0.2-2 ms in the others) and the frames are 50-65 ms among frames of40-50.
The meter's walk: in 4 of 36 timelines of the run before the change, in 0 of 36 of the run after. The measured
build asked through
texture::committed; the reviewed one asks throughtexture::readable_bytes, the samequestion to the kernel.
What this does not change: between the stalls the walk's frames are the card's (37-45 ms of work a frame here), so the
median while walking does not move; this removes the frames that stood out above it. The pictures of the runs before
and after are right (looked at, not compared pixel by pixel: the walk does not repeat exactly).
Tests
hwrt::tests::title_memory_is_asked_about_page_by_page: committed, read-only, closed and uncommitted pages, arange across them, a wrapping length, and that
VirtualQuerywas not asked. The walk and the page-wise answeragree on what is readable, so what tells them apart is a test-only count of walks, which
maindoes not have:python -I scripts/red_green.pysays "red does not build" for it, not a red run. With the switch set the countrises and the test fails.
texture::title_memory_tests::a_page_says_whether_it_is_private_or_a_mapping.cargo test -p leonida-gpu --features diagnostics --lib --locked: 774 passed.python -I scripts/check_no_game_data.py,python -I tests/test_d3d12_switches.py.AI assistance
Written with Claude Code (Claude Fable 5.2), measured on the machine above by the same; an independent read-only
reviewer agent (Claude Opus) audited the diff before this was opened; its findings (a third walk left on the default
path, the protection of working-set pages, the wording of the notes) are addressed in the commit.
🤖 Generated with Claude Code
@Kal0s-design on GitHub · 2026-12-02 12:01 UTC · original
Ran natively on Windows 11 with head
5aa56d74dmerged into currentmain, no conflicts. These are CPU-side tests only; I did not run the game or measure frame times.Suite:
cargo test -p leonida-gpu --features diagnostics --lib --lockedran 774 passed, 0 failed, 59 ignored, the same count as the description.Guard pages. The PR's test covers a working-set page closed with
PAGE_NOACCESS, but notPAGE_GUARD. A guard page is one-shot: a read that touches it would clear the guard. So I added a throwaway test (not pushed) next totitle_memory_is_asked_about_page_by_page. It comparesreadable_len_by_query(the old walk) withreadable_len(the new page-wise path) on four committed pages. After each call I readVirtualQuery'sProtectto see whether the guard was still set.PAGE_GUARD, never touched (not in the working set)PAGE_GUARD(in the working set)PAGE_EXECUTE_READFrom the start of the four pages, both answer 4096 and stop at the guard.
(flags >> 4) & 0x101mask refuses the guard page that is in the working set.read_into, and its guard is still set afterwards. SoReadProcessMemorydoes not consume it here.REGION_QUERIESis global to the test binary. While my throwaway test ran in parallel,title_memory_is_asked_about_page_by_pagefailed at the"VirtualQuery asked"assertion. My test calledreadable_len_by_queryat the same time, so the count moved. Run alone, it passes. Nothing else in the crate calls the walk today, so this is fine as is. Any future test that does, directly or throughLEONIDA_HW_RT_REGION_QUERY, would make it flaky, so a thread-local counter may be worth considering.Overlap with #3046: that is mine, and it also touches
texture.rs. The two PRs conflict only because both add a test at the end oftitle_memory_tests. Whichever merges second keeps both tests. I'll handle it on #3046 if this one goes in first.GPUs tested: n/a (CPU-side tests).
AI-assisted: yes (Claude Code).
@MoonEyes on GitHub · 2026-12-02 12:41 UTC · original
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).
@rockcabbage on GitHub · 2026-12-02 13:37 UTC · original
Run report, head merged onto current
main.5aa56d74dmerged ontomainbf7886746(merge019adca0c, no conflicts), diag build (build-nvidia.ps1).-HardwareRT -NoFrameGen.LEONIDA_FRAME_TIMES), no input after the menus (the title's idle camera).mainmainaloneBoth closed normally at the end. The two medians do not tell the change apart from
main: starts with the same binary and settings stood between 36 and 52 ms on this PC over the day (two back to back: 42.4 and 52.0), and these runs stand still, where the walks this change removes do not occur (they come with bottom-level builds while moving; the in-run comparison in the description is the measure of that). Pictures of both runs looked at at 200 s and 430 s: the scene is right in each.AI-assisted (Claude Code, Claude Fable 5.2); run on the machine above.
@lixonik on GitHub · 2026-12-02 14:44 UTC · original
Quick heads-up while checking
[NEEDS-GAME-RUN]PRs: head5aa56d74dnow has a merge conflict ind3d12/crates/leonida-gpu/src/texture.rsagainst currentmain(acc350745), so it will need a rebase/merge ontomainbefore it can be merged.AI-assisted: yes (Antigravity).
@rockcabbage on GitHub · 2026-12-02 15:36 UTC · original
Rebased state:
mainmerged into the branch (the conflict intexture.rswas two tests added at the same place; both kept). New headfa1460b6b, which containsmainacc350745; it still merges cleanly ontomain3c106eb2f(checked withgit merge-tree, not run in game at that commit).Run report for head
fa1460b6b:build-nvidia.ps1);cargo test -p leonida-gpu --features diagnostics --lib --locked: 779 passed.-HardwareRT -NoFrameGen.mainalone was not run again at this commit (the earlier report'smainrun gave 39.9 ms against 43.1 for the head of that time).AI-assisted: yes (Claude Code, Claude Fable 5.2).
@nyceminem on GitHub · 2026-12-02 17:18 UTC · original
Measured on another machine: the meter's five-second walk shows up as a periodic hitch during ordinary walking too (no hardware ray tracing), and this PR removes it.
Setup: RTX 5070 (driver 616.64), Ryzen 7 7700X, Windows 11, diag build, launcher default (Series X, 2560x1440 output,
-Lowest 1080, DLSS frame generation 2x) withLEONIDA_FG_LIMIT_FPS=0. Same save, about 4 minutes of manually driven running with camera turns per side. Per-frame data fromLEONIDA_FRAME_TIMES.main3c106eb2f, measured in the phases of a run where a local test switch kept the five-second lines on (LEONIDA_AB=10,..., 124 s, 2,395 frames).main3c106eb2f+ this PR, one run (252 s, 4,866 frames).In the same before-run, the phases with the five-second lines skipped also lost most of the beat (frames over 140 ms on 6 of 22 beats against 16 of 21 with them on). As the PR says, the median does not move; only the frames above it go.
Caveats: single runs per side, manual routes, and the before-side phases are not contiguous. Two independent read-only reviewer agents checked the numbers blind (runs labelled without their identities).
AI-assisted: the measurements, analysis and this comment were made with Claude Code (Claude Opus 5.5), with separate read-only reviewer agents (Claude Opus 5.5).
@MoonEyes on GitHub · 2026-12-02 18:18 UTC · original
Verification of #3113 (third party, code review on Linux; not built: Windows-only
leonida-gpu)fa1460b6bdf502c6d46ae2cd2479f6a8a916275b(5 files, +166/-15). This is the head aftermainwasmerged in to resolve the
texture.rsconflict.acc350745.git merge-tree --write-tree origin/main pr/3113againstmain45dc41f95is clean(34 commits behind).
python -I scripts/check_no_game_data.pyon the 5 files: exit 0.fa1460b6b, plus nyceminem's second machine (RTX 5070). Kal0s-design ranthe unit suite on the previous head
5aa56d74d.Review
Root cause:
VirtualQuerywalks the page tables to the end of a run, which takes 21-36 ms in the title's pools,and
GetWriteWatchon the submitting thread queues behind it. The PR stops askingVirtualQueryon the twohot callers:
hwrt::readable_len(hwrt.rs:466-479) now usestexture::readable_bytes, which isQueryWorkingSetExfor up to 256 pages per call, with no walk;
copystat::logusestexture::shared, one page per call.The old path is kept behind
LEONIDA_HW_RT_REGION_QUERY=1for A/B. That is the same remedytexture::by_queryalready applies to the textures' pass, so it is consistent and not a new workaround.
Correctness of
readable(texture.rs:2812-2850): a page outside the working set (never touched or trimmed)falls back to a one-byte
read_into, so committed-but-not-resident memory still counts as readable, as it didunder
VirtualQuery. The new protection check(flags >> 4) & 0x101 == 0excludesPAGE_NOACCESS(0x01)and
PAGE_GUARD(0x100) in the 11-bitWin32Protectionfield. That is correct, and it also tightens thetextures' pass, which used to count a resident
PAGE_NOACCESSpage as readable. The new test covers it("a page closed after it was touched").
readable_bytes(texture.rs:2873-2880):there * 4096 - at % 4096when the run stops early, saturating to 0.The test checks both the offset (
at + 100) and the stop at an uncommitted page.Test
title_memory_is_asked_about_page_by_pageasserts thatREGION_QUERIESdoes not move, so it fails if thedefault path walks again. This is a real guard for the change.
sharedgets a private-against-mapping test.Unrelated churn:
switches.md:46flips theLEONIDA_KEYSrow's column (regenerated table). It is harmless,but it is outside the topic.
Process
findings.mdrecords themeasurement with the machine and the A/B switch, as AGENTS.md asks.
Verdict: ready (not built here). It only needs the fork CI approved.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
@MoonEyes on GitHub · 2026-12-02 18:21 UTC · original
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).
@fiestorra on GitHub · 2026-12-02 23:41 UTC · original
VERIFY-3113 — Windows nativo:
red then greenen las dos mitades del cambio5aa56d74d—copystat.rs(16),hwrt.rs(+80),texture.rsRan at the head
Negative control (synthetic): I made
texture::shared(at)returnSome(false)unconditionally, rebuilt and ran:It bites.
What the change is: the write watch's readable range is now measured
VirtualQuery-per-page (readable_len_by_query), walking the run of pages instead of trusting one query's answer for the whole range — and a page can now say whether it is private memory or a mapping (shared(at)), withreadable_bytessitting on both. The distinction matters because a mapped page and a private one behave differently for a write watch: one is the title's own memory and the other is somebody's file.What I could not test: the walk over the title's real address space — the tests drive the predicates with pages they describe, and the game's own layout is what the change is for.
Written with an AI assistant.
@x2Tweek on GitHub · 2026-12-03 06:47 UTC · original
Data point for this PR: on
main,readable_lenis the largest BLAS CPU cost on the recording threads with hardware RT on.Setup: RTX 5090 32 GB, driver 621.40, i9-14900KS, Windows 11 26300. Diag build of
maind9b618f10plus one unrelated local change (a BLAS buffer pool, off/on below; it does not touchreadable_len). Timers are added aroundreadable_lenand the other BLAS preparation steps (wall time, diagnostics only). The run uses-HardwareRT, Series X profile, 4K output, DLSS quality. The character walks with the camera turning continuously (look keys throughLEONIDA_KEYS_FILE), for 300 s in the world per run.readable_len(VirtualQuery, as on main)That is 6-10 % of the wall time, on the thread that records, for the page question alone. It costs more than all the rest of the BLAS preparation together, which matches the walk this PR removes. I have not yet run this PR's head with the same timers, so I give no "after" number here; I will add it if that helps.
AI-assisted: runs, timers and write-up with Claude Opus 5.5 (Claude Code); the numbers are the runtime's own log lines.
@MoonEyes on GitHub · 2026-12-03 07:01 UTC · original
This pull request has a merge conflict with current
main(d9b618f10), so it can't be run in game or merged as it is. Could you merge the latestmaininto it (or rebase onto it) and resolve the conflict? Once the head is updated, the in-game gate run can be done on the new head.AI-assisted (Claude Code).
@OreoFR on GitHub · 2026-12-03 07:09 UTC · original
Merge check on current main
d9b618f10, headfa1460b6b:git merge --no-ffconflicts only ind3d12/docs/switches.md, on the header count line. Main says 684/644, this PR says 682/642. The other four files merge cleanly, with no code conflict. Regenerating the page withpython -I tools/d3d12_switches.py --out d3d12/docs/switches.mdafter merging main resolves it. For an in-game A/B on an RTX 4070 Laptop (Series S, hardware RT, native 1080), I'll resolve it locally that way and post the numbers here. (oreofr-agent, AI-assisted)@OreoFR on GitHub · 2026-12-03 08:03 UTC · original
RUN: #3113 vs main, in-game A/B with hardware RT on the Series S profile (Verified by OreoFR)
fa1460b6bdf502c6d46ae2cd2479f6a8a916275b. Main:d9b618f10150f275c30088e4769c1acbf1d8d689.--no-ffmerge75cf8c6f3, not pushed. The only conflict was the count line ofd3d12/docs/switches.md, regenerated withtools/d3d12_switches.py --out; the code merged cleanly.build-nvidia.ps1(diag). Both builds carry the same local measuring patch inhost/frametime.rs, counting frames over 50 ms and in 55-65 ms per 5 s line. It is not part of the PR.-SeriesS -HardwareRT -Resolution 1080 -NoDlss -NoFrameGen -PrecompileUsed, BAR 0, texture budget 1024;A1 → A2 drift: 0.14 fps, 0.1 ms median, 84 frames over 50 ms, 3 in 55-65 ms, 5 over 100 ms.
Verdict (MEASURED, n=2 per arm):
The branch needs main merged in (the
switches.mdcount line) before it can merge.AI-assisted (oreofr-agent)
@merzleckeier on GitHub · 2026-12-03 08:25 UTC · original
Rechecked
fa1460b6ond9b618f1. The two new tests passed in a Windows MSVC build under Wine 11.22. A separate synthetic range starting 123 bytes into its first page and crossing the 256-page query batch boundary returned the same readable prefix with both paths. Both stopped at the first uncommitted page.The page-wise check also brought untouched data pages into the working set. I alternated the two paths on fresh, committed read-write allocations and collected ten samples per combination. At 256 KiB, the untouched range took a median of 0.8 µs with
VirtualQueryand 42.8 µs with the page-wise check. The resident-page count stayed at 0 withVirtualQueryand rose from 0 to 64 with the page-wise check. At 4 MiB, the medians were 0.9 and 349.2 µs and the resident counts afterward were 0 and 1,024 respectively. With pages touched beforehand, the page-wise medians were 3.6 µs at 256 KiB and 32.5 µs at 4 MiB. These timings isolate the readable check on synthetic ranges under Wine.The local combination with #3297
58386088conflicted only in the generated switch page. Regeneration passed--checkand all 21 catalog tests with #3270 applied.AI-assisted with OpenAI Codex.
@merzleckeier on GitHub · 2026-12-03 08:38 UTC · original
Rechecked
9ba2215aafter the merge ofmaind9b618f1. The PR now merges cleanly andd3d12/docs/switches.mdmatches a fresh generation byte for byte. A Windows MSVC build of this exact head under Wine 11.22 passed all ninetitle_memorytests, including the readable-range and private/mapping tests from this PR. AI-assisted with OpenAI Codex.@lixonik on GitHub · 2026-12-03 09:53 UTC · original
RUN (in game, RTX 5070 12 GB, Hardware RT, 315 s in-world gate) -- PASS (updated head
9ba2215ad)9ba2215admerged cleanly (git merge --no-ff) ontomain(d9b618f10)python -I scripts/check_no_game_data.py-- PASSpython -I tools/d3d12_switches.py --check d3d12/docs/switches.md-- PASSLEONIDA_D3D12_DEBUG=1 cargo test -p leonida-gpu --lib --locked hwrt::-- 23/23 PASS (includinghwrt::tests::title_memory_is_asked_about_page_by_page)cargo test -p leonida-gpu --lib --locked texture::-- 25 passed, 0 failed, 5 ignored (includingtexture::title_memory_tests::mapped_bytes_counts_readable_pages_between_unmapped_ends)cargo build --profile diag --features "diagnostics,dlss,mimalloc" --locked-- PASSLEONIDA_HW_RT=1,LEONIDA_AMBIENT=0,LEONIDA_RT_RESOLVE=1,LEONIDA_ACTIVATE_RAYS=1), 315 s in world, 452.1 s total, 64 world samples, max 5,364 draws):19,593built,341,989refits,3,589rehydrated), 5 live TLAS (38,470builds), BLAS memory539 MB/1,073 MBbudget (0evicted), 0 geometries given inactive3000-4999draws bucket: 24.7 fps (57 samples)AI-assisted: yes (Antigravity -- Gemini 4 Neon).
@merzleckeier on GitHub · 2026-12-03 12:26 UTC · original
Integration check on
b053a181with #31135e45fd65and #3297e31ec65b. The code merged cleanly. Regeneratingd3d12/docs/switches.mdresolved the only conflict and retained all four switches from the pair. All 21 switch catalog tests passed.In the Windows MSVC build under Wine I exercised the real
read_geometrieswith a synthetic 48-byte transform spanning two pages, including a read-only second page. All four combinations ofLEONIDA_HW_RT_REGION_QUERYandLEONIDA_HW_RT_TX_COPYpassed. With capture enabled, both memory-check paths saved the exact words and kept them when the backing memory changed in a later frame. Both declined to capture a transform extending into an uncommitted or newly inaccessible page. The sizing query produced no copy and did not invokeVirtualQuery.The combined build passed 30 HWRT and four texture title-memory tests. The library also passed
cargo checkwithout diagnostics. This covers CPU-side capture, memory checks and build compatibility. AI-assisted with OpenAI Codex.@rockcabbage on GitHub · 2026-12-03 12:49 UTC · original
mainmerged in again (b053a1813): the only conflict was the generatedd3d12/docs/switches.md, taken frommainand regenerated (
--checkpasses). None of #3072, #3297, #3168, #3107 or #3225 had merged, so nothing inmainoverlaps the change;
main's ownmapped_bytesnow also leaves outPAGE_GUARD/PAGE_NOACCESSpages, the samerule as this PR's
readable.Three small commits on top:
texture::sharedis compiled only with diagnostics or tests: its one caller is the diagnostics-only meter, and thedefault build warned that it was never used.
VirtualQuerywalks is per thread now (thanks @Kal0s-design: a parallel test asking the walkmoved the process-wide count). With
LEONIDA_HW_RT_REGION_QUERY=1the test still fails at "VirtualQuery asked".On the pages brought into the working set (@merzleckeier): yes, a committed page that is not resident is read one
byte to learn whether it is there, so it is faulted in. The BLAS build reads those vertex and index bytes right after
the question, so the fault is paid either way. The exception is the part of the probe beyond what the batch indexes.
That is the same trade
texture::committedmakes for the textures' pass. Left as it is.Checks on
5e45fd657(Windows 11, RTX 4090):cargo check -p leonida-gpuand with--features diagnostics: clean onthe PR's lines;
cargo test -p leonida-gpu --lib --locked: 718 passed; with--features diagnostics: 799 passed;cargo clippy -p leonida-gpu --features diagnostics: nothing on the PR's lines;tests/test_d3d12_switches.py: 21 OK;scripts/check_no_game_data.pyon the five files: exit 0. An independent read-only reviewer agent (Claude Opus)audited the diff against
main; its findings were the dead-code warning, the shared counter and the timing comment,all fixed above. The rest were notes, not bugs.
Run report for head
5e45fd657(containsmainb053a1813; nothing inmainafter it at the time of the run).--features diagnostics), started withplay-d3d12.ps1 -HardwareRT -NoFrameGen(the title's own upscaler);cargo test -p leonida-gpu --features diagnostics --lib --locked: 799 passed.mainalone was not run again, so this is a stability report, not a speed comparison.AI-assisted: yes (Claude Code; Claude Fable 5.2 directing, Claude Opus 5.5 for the update, reviewer Claude Opus).
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.