d3d12: the memory hook names its own placeholder holes so the guards' walk stops re-asking them under Wine (D3D12-WATCH-PLACEHOLDER-NAMES) #3256
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/3256:github-pr/3256" git switch "github-pr/3256"
Open
leonida/mandy
z3r0rc wants to merge 21 commits from
github-pr/3256 into main
pull from: github-pr/3256
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/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/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!3256
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/3256"
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 pull request has changes conflicting with the target branch.
Merge manually to resolve the conflicts.
Reviewers 0 approvals
Details
This pull request has changes conflicting with the target branch.
Merge manually to resolve the conflicts.
d3d12/crates/leonida-gpu/src/watch.rsView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Claimed in the coordination issue as:
D3D12-WATCH-PLACEHOLDER-NAMES— claim comment #2570 (comment-7360919453).Depends on: #2896 and #3154 (this builds on neither, but overlaps both textually — see "Relation to open work"; whoever lands second rebases).
Coordination: claim in #2570, "D3D12-WATCH-PLACEHOLDER-NAMES".
Problem, measured. Under Wine the guards' per-frame walk of a guarded range asks the kernel
about every hole region it cannot name. For a hole of the runtime's own
xmemreservations —reserved without commit, later partly committed — Wine's kernel answers the placeholder probe
with nothing, so the region stays unnamed forever and the walk re-asks it every pass. Census
counters on a steady world (RTX 4090, Wine 11.23, same exe A/B on the arm alone) show a median
of 11,428 hole questions a frame with the name off and 2 with it on; offline a mapped-block
asking prices ~900-2,000 ns, sizing the family at 3.5-9.3 ms of submitting-thread CPU a frame.
The fps delta did not rise above scene variance in the windows run; the claim here is the
removed storm and the pinned geometry, not a frame-time number.
The fix says the word the kernel will not:
watch.rsgains aPLACEHOLDERSbit registry and a new notice,title_memory_placeholder(at, len);placeholder(block)becomes hook-named OR the oldkernel probe — the fallback stays exactly as it was and the first touch of a range still
goes through it.
xmemnames its own uncommitted reservations (MEM_RESERVEwithoutMEM_COMMIT: the64 KiB arena and the 0x42000 heap) at the
VirtualAllocit wraps, and re-names blocks atits hide and single-page re-hole sites, where a block becomes a hole again.
including a len-0
title_memory_freed, which is how both of the hook's releases say it.LEONIDA_PLACEHOLDER_HOOK=0(fixture-pinned to the walk's re-ask) makes it A/B-able inone binary.
New tallies split kernel askings from guard-walk questions on the asking line and name the
hook-named population, so the family stays measurable; an acceptance pin fixes the shape of
views_of's answer (one entry per page asked, in order, never deduped or joined) because aconsumer that wants spans joined joins them itself.
Offline fixtures, all green under Wine with no GPU and no game files:
asks once — questions follow REGIONS, not blocks;
placeholder-naming probe so a real Windows box never false-fails where the kernel answers);
runtime — the refresh must report it ALONE, keep the neighbour a hole it asks about once,
guard neither and publish nothing;
bounded with its warning pinned silent, and the runtime's own word (an unmap or commit)
re-arms the re-ask through the walk;
merge fails the partial-fill pin; trusting unnamed holes as held fails the first pass.
Tested with
cargo xwin test -p leonida-gpu --features diagnostics,dlss --target x86_64-pc-windows-msvcunder Wine 11.23: 788 passed / 5 failed / 70 ignored, and the5 failures are the SAME tests that fail on bare current
mainin a control run of theunmodified base (779 passed / 5 failed / 60 ignored) — Wine-environment placeholder, overlay-
and stack-walk families, none touched by this branch; the branch adds 9 passing tests and no
new failures.
leonida-hle: 247 passed / 2 failed, matching the base. The 11,428 -> 2 censuswas measured same-exe A/B on the counter arm alone in a logged window. Separately, operator
play windows on this exact build (arm on, then arm off via
LEONIDA_PLACEHOLDER_HOOK=0):clean exits, no device faults, no visual regressions, no difference noticed in play.
Relation to open work (complementary purpose, real textual overlap — whoever lands second
rebases): #2896 edits
title_memory_freed/title_memory_changedand the standing-ask tests(rest-state clearing on unmap/free); #3154 edits
xmem.rs's allocation path (title addressrange below 2^37).
GPUs tested: n/a — no GPU tests in this change (pure CPU/offline fixtures); the live census
windows ran on RTX 4090 (AD102), NVIDIA proprietary driver 620.73.04, CachyOS x86_64,
Wine 11.23, vkd3d-proton master.
AI-assisted: yes — an OpenCode coding agent (Qwen3.8-Flash-Next 125B, locally quantized IQ3_S
pack) under a human operator; the diff, fixtures and red/green evidence were additionally
audited by a separate read-only reviewer agent before posting. No game content anywhere.
mainand merges cleanly.RUN (in game, batch of nine pull requests), each head merged with
git merge --no-ffonto main81efe4566, in one build: #313674bd1bcd4, #315653c3100ce, #3206d024194b3, #3248efd21d867, #3256e7aad1d4c, #32623643c2879, #2851b83b0b375, #312589bf1d328, #2642164506d01. 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. The precompile before the world took 619 s, against 157 s for the previous batch; the shader-side changes in this batch (#3156, #3262) probably left the pipeline cache cold (not checked). Switches that are off by default (for example #2851'sLEONIDA_TITLE_MEMORY_SCALE, #3136's timeline attribution) were not turned on: this run covers their default path only. #2642 targets Wine and was run on Windows only.AI-assisted (Claude Code).
VERIFY-3256 — Windows nativo: la documentación es exactamente lo que el generador escribe
e7aad1d4c—d3d12/docs/switches.md, 1 line (682 names→683, a row forLEONIDA_PLACEHOLDER_HOOK)For a generated document the only verification that means anything is this, and it passes:
Regenerating from the branch's own sources produces a byte-identical file — so what is committed is what the generator writes, not a hand edit that happens to look right.
And that matters more than usual here, because the document says so itself: "No CI job keeps it up to date: run the command again, or
--check, when you need it." A document that nothing keeps in sync is exactly the one that drifts, and this pull request is the drift being paid off.What it documents —
LEONIDA_PLACEHOLDER_HOOK=0and a re-wordedLEONIDA_ASK_GAP_KBrow — comes from the branch'swatch.rs, which is why the "time" of this review is the generator agreeing with the code.What I could not test
Written with an AI assistant.
Both asks are fair, and the fix rides this push.
Running the ten cases from a public checkout. The tallies they pin are per-process, so each
case needs its own process; one command per case:
(or run the built test binary the same way; under Wine — our runner uses Wine — the ten need no
device and no DXC staging; on Windows natively they use the real kernel APIs directly. Each
ignored case's own comment now names this command.)
One exception, and the reason on that case now says it:
the_ask_budget_of_the_placeholder_off_armis a CHILD — it asserts the parent handed it
LEONIDA_PLACEHOLDER_HOOK=0before the first hookread. Run its live parent
the_off_arm_sends_the_hook_s_holes_back_to_the_kernel, whichre-runs the binary with that variable and echoes the child's numbers.
Exact-head results at
61d8ed0aa(rebased onto current maind5b30be1c; Wine 11.23): thenine cases pass standalone; the parent above passes with its child's budget printed. Aggregates
at this head: gpu 801 passed / 5 failed / 70 ignored, hle 250 passed / 2 failed / 2 ignored —
all seven failures are the known Wine-substrate families (placeholder-naming trio, WARP overlay
"Invalid parameter", REMAP_HLSL d3dcompiler refusal, ws2_32
WSAConnectByList, xgamesave pair),none new.
The head also moved
e7aad1d4c→61d8ed0aa: the rebase onto current main, plus a commit thatrenames test attributes and docstrings to name the public run command (merzleckeier's ask), and
a comment-only sweep of internal note-IDs out of the sources. No behaviour change except the
LEONIDA_PLACEHOLDER_HOOK=0off arm itself, which is inert unless the variable is set.@MoonEyes thanks for the batch run. The covered
e7aad1d4cvs the new61d8ed0aadiffers by therebase onto current main (your
81efe4566batch tree already ran our carried content), thetest-attribute renames, and comment scrubbing — no runtime behaviour change. Your PASS should
carry; but per your own caveat a moved head deserves its own stamp, so if you want to re-run,
say the word and we will hold the merge for it.
AI assistance disclosure
Assisted by Qwen3.8-Flash-Next (OpenCode agent) per CONTRIBUTING.md; the runs above were driven by the agent under operator supervision.Both asks are fair, and the fix riding this push is the right shape — thank you for taking them together rather than one and leaving the other.
What I will re-run when it lands (the same two commands, so the record is comparable):
The byte comparison is the one that matters for a generated document: "the generator writes what is committed" is a claim that can be tested on the tree, whereas "it looks right" cannot — and a
--checkthat only counts names would pass over a row whose wording drifted.And a note for the next person who regenerates it:
--outrewrites the file in place, so running it and thengit diff --statis the whole check — no copy of the old file is needed. That is why I compared hashes rather than diffing against a saved copy.Re-verified at
61d8ed0aa: still byte-identical, still--check0The push is here and it does what you said — the same two commands, on the new head:
729 names now, against the 728 I measured on
e7aad1d4c— so the push added a switch and regenerated the document with it, which is the right way round: the count moved because the source did, and the file is still exactly what the generator writes.And the byte comparison is what makes that a statement rather than a hope: a hand edit that matched the count would pass a number check and fail this one.
From my side this is verified and I have nothing to ask. The one thing worth keeping for whoever regenerates it next is the procedure:
--outthengit diff --stat— an empty diff is the whole check, and no copy of the old file is needed.The red
d3d12 (windows-latest)job was my bug, not the branch:a_write_through_another_view_is_reported_at_the_guarded_oneread the diagnostics tallies without a feature gate, andASKSis only compiled underdiagnostics- so a plaincargo test --workspace --exclude xtask(nodiagnostics) fails to compile the lib test with E0425. Every other census reading in this module is already gated behind the same feature; these readings leaked past it. The head moves toa3ab0a50faf648171ead8ad9bb68b6e1fb273f9e: the readings and the one assert over them are now gated like the rest, and the guard/alias behaviour that test pins is still exercised and asserted without the feature. I reproduced the job's exact command line offline before and after: red (E0425), green. Same head also replaces internal shorthand labels left in comments, assert messages and commit messages with plain English - no pin and no number changes; the only content deltas from the reviewed chain are the feature gate and that wording.@MoonEyes since the head moves, your earlier stamp is void - if the shape still looks right, a re-stamp would be appreciated.
RUN (in game, batch of two pull requests), each head merged with
git merge --no-ffonto maind15e048a7, in one build: #3256a3ab0a50f, #327863eb3d6e2. 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. #3256 was also run in a batch on its earlier heade7aad1d4c; this run covers its current head. #3278 changes what happens after a stall at the start; this run had no such stall (0 hang watchdog or GPU stall lines), so it shows the change leaves the usual start as it was, not that it mends the stalled one.AI-assisted (Claude Code).
Head moved to
7b7b261df. What changed sincea3ab0a50f: it is rebased on current main — the one conflict was the switch page against #3318's regeneration, and the code hunks are untouched (nothing upstream touchedwatch.rs/xmem.rsbetween the two bases); the switch page now comes from the #3318 generator, so theLEONIDA_PLACEHOLDER_HOOKrow is produced, not hand-written (as #2642/#2643 do); the commit messages and a few code comments lost our internal shorthand, and the A/B fixture pair is renamedthe_off_switch_*(comment and test-name lines only, nothing behavioural); and one counters slot this tree never writes was dropped. The in-game pass ata3ab0a50fcarries over in substance, but the head move voids the review stamps — a fresh VERIFY on the new head would be welcome, and a re-run of the in-game batch when convenient. CI is re-running.