d3d12, xmem: remove remap release and the console heap mirror (RT-REMOVE-REMAP-RELEASE-AND-HEAP-MIRROR) #2370
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2370
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2370/head"
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?
@aslan2142 on GitHub · 2026-11-26 16:15 UTC · original
aslan2142:remove-remap-release-and-heap-mirror→main· +32 −796 · 15 files · 1 commits · merged 2026-11-26 16:15 UTCRemoves two features that came in with #2350 and were made opt-in by #2356 after they broke world runs.
Claimed in the coordination issue as: RT-REMOVE-REMAP-RELEASE-AND-HEAP-MIRROR
Both were additions on top of stopgap mechanisms, not fixes of the mechanisms themselves:
LEONIDA_GEOMETRY_REMAP_RELEASE): retired geometry copies when the title remapped physical pages. With it on, a world run on the RX 7900 XTX ended in a GPUVM page fault and a lost device (#2356).LEONIDA_HEAP_MIRROR,LEONIDA_HEAP_MIRROR_CHECK): a host-RAM mirror of a console resource heap's copy for the release sweep. With it on, a world run hung the GPU (#2356).With both variables unset,
mainbehaves as it did before this change.Removed
xmem.cpp:RemapReleases,remap_releases_enabled(), the page recording inunmap_range_lockedand its four call sites.xmem.h: the test seamrt::xmem::reload_remap_release_setting().xmem_test:test_remap_releases.src/console_heap_copy.h:ConsoleHeap::copyis a plainstd::uint8_t*again, written withmemcpy/memset. That includes the zeroing site that #2350's merge of #2162 resolved asheap.copy.zero().d3d12_vulkan_device.cpp:heap_mirror_enabled(),heap_mirror_check_enabled(),check_console_heap_mirror(), the check counters and their log line.d3d12_com.h: the test APIconsole_heap_mirror_mismatches().console_heap_copy,d3d12_console_heap_mirror,d3d12_console_heap_mirror_offandd3d12_console_heap_mirror_default, with their CMake entries.runtime/README.mdrows and the paragraphs indocs/d3d12_vulkan.md.Kept
LEONIDA_GEOMETRY_HOST(geometry copies in system memory, opt-in) and its memory-type assert.retire_range'sfinal_copy,copied at retirementin thegeometry buffersline). AnXMemFreeof a title heap block reports a release while its memory stays readable, so this copy is still made without remap release. Its comments no longer mention remaps.forget_pool_spanandretired with their copy. Every retirement (free, decommit, unmap) still feeds them.title_geometry_watch.h). Unmaps report page runs too.LEONIDA_CONSOLE_RELEASE_FILTER. It predates the mirror, and its sweep reads the copy again.LEONIDA_HEAP_MIRROR_CHECKlines.Not addressed here
The root problems behind both features need proper designs. This change does not touch them:
Tests
cteston the Ryzen 9 7950X3D iGPU (RADV RAPHAEL_MENDOCINO, Mesa 26.3.1): 111/111 pass.console_heap_copyis gone.main246791612: 418 pass now, 422 before. The difference is the four removed tests. No other test changed state, andxmemandgeometry_viewspass.tests/test_ci_registration.py,test_ctest_registration.py,test_docs_env_vars.py, the othertest_docs_*and CMake list tests,test_text_write_line_endings.py,compileallandcheck_no_game_data.pyon the changed files all pass.World runs
RX 7900 XTX, RADV (Mesa 26.3.1), Wine, the settings of the Linux section in
docs/running.md:b0767fd65)mainwith both features off also stopsmainwith both variables unset is the same configuration as this branch, and it reached the title's breakpoint in an earlier run.Not tested
AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2).
@aslan2142 on GitHub · 2026-11-26 16:15 UTC · original
Merging. This is a self-merge.
main246791612+ this PR (b0767fd65):ctest: 111/111 pass.main. The difference is the four removed tests; no other test changed state.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)