d3d12: mirror a descriptor record that crosses a watch page as one whole record (D3D12-DESCRIPTOR-PAGE-STRADDLE) #3445
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!3445
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/descriptor-page-straddle"
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?
Pull request successfully merged and closed
Change
descriptor.rs,sync_heaps) cut a heap's changed range at watch-page bounds. A record that crosses a page (heap start not a multiple of the record size) and that the title writes in two 16-byte halves, the second half alone on the next page, was skipped: the read began at the first whole record of the page. Now the parts are whole records (sync_record_parts), a record across a page is its own part, and overlapping parts are merged. The read loop takes its first record and count from the part (part_records).out.pagescounts pages actually read, not those single-record parts.infoline per placed heap whose start is not a multiple of its record size (start, rest mod 32, rest mod 16), to tell whether the title places such heaps.port_descriptors.rs:270(plan_parts), left for a separate change.Tests
record_across_a_watch_page_is_one_whole_partandread_loop_takes_whole_records_of_each_part(no GPU): a heap at page-16 with 32-byte records, the second half written alone on the next page, gives one part of the whole record. With the old split the record was not read.In-game run
Game gate (
scripts/game-gate.ps1) on a test branch that merges four changes over maina558375458: this PR together with the FFX jitter, XMem low window and descriptor-record changes and a periodic preload save.-SeriesS -PrecompileUsed, RTX 4060 8 GB, driver 32.0.16.1088, Windows 11, build with diagnostics. PASS, 314 s in the world, no device loss, median 17.7 fps, VRAM peak 6 390 MB for a 6 776 MB budget. Warningfault_after_stop(access violations in the runtime after the gate stopped the run, clean exit): the same 8 faults appear on a run of another branch, so most likely not from this change (not yet compared with main).cargo test --locked -p leonida-gpu -p leonidaon that test branch: 742 + 62 + 5 passed, 0 failed.No "not aligned on its record size" line on this route: the title placed no misaligned heap there, so the fix did not change what was read in this run. It is the same idea as Darner PR #163 (GPL-3.0-or-later), measured there on a 4070 Ti SUPER (missed 2/2 before, mirrored 2/2 after).
AI-assisted
Written with Claude Opus 5.5 (Claude Code); reviewed by a separate Claude Opus 5.5 reviewer instance (an unused assignment, the page count and a test of the read loop are fixed).
🤖 Generated with Claude Code
Merging, with Moon's written OK as maintainer (two maintainers only: the CONTRIBUTING rule against merging one's own PR is waived for this series). Branch updated with main
1a12090494, no conflict. The merged tree (d7c11355) is the one tested locally:cargo test --locked -p leonida-gpu -p leonida -p leonida-hleall passed,tests/test_d3d12_switches.pyOK,check_no_game_data.pyclean. In-game gate in the description (PASS, 314 s, no device loss). AI-assisted (Claude Opus 5.5).