Repository navigation
Conversation
…p paths Every readability probe that touches an unmapped page raises a first-chance access violation. Under the debug launcher each one stops the process for a debugger round trip. On the title tested there were about 21000-25000 of them per run, almost all before the intro: by-address (slot-70) textures whose pages were not mapped yet, and a queue no-op slot (31) called every frame with the base of a physical-page pool whose mapping had failed. Slot 31 is now handled by queue_page_mappings (R0Y00#2307); the shape-check cap below still covers the slots left to queue_dynamic. No intended behaviour change: the same addresses are found readable or unreadable as before; only how that is found changes. The one timing difference is the 30-frame retry interval for by-address texture addresses found unmapped (below). - xmem: new export x2w_xmem_mapped_bytes(address, bytes, &mapped) answers from the page registry, without touching memory, how many bytes from address are mapped. It answers only inside xmem's page-mapping reservations; for any other address, a range past the reservation, a range a commit at address may cover, or an unmapped answer Windows does not confirm as reserved, it gives no answer and the caller probes as before. - d3d12_xs: readable_window asks xmem first (unmapped: no touch; mapped prefix: probed as before). publish_tiled_texture, names_known_iid, hex_text and the ExecuteCommandLists shape test in queue_dynamic go through readable_window instead of x2w_local::readable. - A by-address texture address that a probe found unmapped is not probed again for 30 frames (unless a write to it is announced). - queue_dynamic checks only the first 32 calls of a slot for an IID, like noop_slot and device_noop_slot already do. - The 5 s report logs "x2w-d3d12 readability: unmapped by xmem's page registry N, unreadable probes skipped N". - xmem_shim.def: x2w_xmem_mapped_bytes is ordinal 23 (17-22 are taken on main). - Tests: xmem_mapped_bytes (the export's answers), startup_queue_probe_{reserved,xmem}_{warp,hardware} (200 calls of unknown queue slot 30 with a reserved, unmapped r9: at most 32 faults without xmem, 0 with it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X1EBSe6YfE2ivQChRsx1hc
|
The Linux job's final failed check is |
R0Y00
left a comment
There was a problem hiding this comment.
I tested the clean merge tree with main e958b8e8. python -B tests/standin_exports_check.py still fails with xmem entries 56 != 54. The extra name and ordinal are x2w_xmem_mapped_bytes and 28; the current catalog classifies both as unmeasured. On the combined tree, changing the expected total to 56 and unmeasured count to 4 makes all 475 checks and all six mutation controls pass. Please update the expectations and add a named/ordinal equivalence assertion for the new export when rebasing.
R0Y00
left a comment
There was a problem hiding this comment.
The current trial merge with main 67862ee4 still fails python -B tests/standin_exports_check.py with xmem entries 56 != 54; this is the same catalog failure as the old Linux job. There is also a lifetime issue in xmem_mapped_bytes(): it caches a GetProcAddress result from GetModuleHandleW indefinitely. The latter leaves the module reference count unchanged, and the graphics shim has no import dependency on xmem.dll, so the cached address can outlive the module. Please keep a reference for the lifetime of the cached pointer, or acquire a scoped reference around each call. The current queue probe loads xmem and keeps it loaded throughout, so it cannot verify this ownership requirement. Microsoft Win32 documentation.
|
I verified the export-catalog fix in a clean trial merge of aeee2fb with main at 7db6f19. The XMem catalog has 56 entries: 52 implemented and four unmeasured. The new x2w_xmem_mapped_bytes entry and ordinal 28 both resolve as unmeasured. Updating only the expected totals to 56 and 52/4 gave 481 cases, with all six catalog mutations caught. python -B tests/startup_triage_run_check.py also passed. Please carry the two expectation updates into this PR when updating its base. |
Takes over #2245 by @Its3rr0rsWRLD, which had no activity for 48 h. Their commits are kept unchanged; I will hand back if they resume. Supersedes #2245.
Changes
Texture publication and the no-op paths no longer probe guest memory that is not mapped yet, and a texture published by address is retried once the mapping exists.
Rebased the original patch onto
main959306d4and carried forward the merge resolutions by pigalot. The original commit message mentions export ordinal 23. The rebased code uses ordinal 28 and preserves the existing exports. Removed the 30-frame skip from SRV publication so a second call can succeed immediately after mapping. The existing probe fixture still expects one fault for a repeat on an ordinary reservation. The fixture now also maps the texel and samples it through the retried SRV. Also removed a BOM fromtests/xmem_mapped_bytes_check.py.Verification
Commit
aeee2fbcb,devpreset, targetsxmem_shim startup_queue_probe startup_stream_consumer:33/33 passed.