<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/runtime/shims/xmem.cpp, branch docs/pso-cache-scope-note</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note</id>
<link rel='self' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/'/>
<updated>2026-11-26T21:55:04+00:00</updated>
<entry>
<title>Merge main e5a7c8942 into shadow-aliased-guard (#1867)</title>
<updated>2026-11-26T21:55:04+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T21:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=df92abca8ee2a8f9093efea7fcaa4dadc3ddaebc'/>
<id>urn:sha1:df92abca8ee2a8f9093efea7fcaa4dadc3ddaebc</id>
<content type='text'>
One conflict, runtime/README.md: this branch rewrote the LEONIDA_SHADOW_ALIAS_MS
row, main (#2163) added the LEONIDA_SHADOW_KEEP row after it. Both rows kept;
the keep row's "aliased" now reads "aliased while they can't be guarded at every
address", since aliased pages are no longer copied without a sign of a write.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>d3d12, xmem: remove remap release and the console heap mirror</title>
<updated>2026-11-26T15:43:18+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T15:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=b0767fd6574e5ec7af617e27c87a3401176154b8'/>
<id>urn:sha1:b0767fd6574e5ec7af617e27c87a3401176154b8</id>
<content type='text'>
Both came in with #2350 as additions on top of stopgap mechanisms, broke world runs (remap release: a GPUVM page
fault and a lost device; the mirror: a GPU hang) and were made opt-in by #2356. They go completely; with both
variables unset, main behaves as before.

Remap release (LEONIDA_GEOMETRY_REMAP_RELEASE, from 36771ec53):
- xmem.cpp: RemapReleases, remap_releases_enabled() and the page recording in unmap_range_locked; the four call
  sites (XMemMapPhysicalPages, the scatter call, both copy_page_mappings).
- xmem.h/xmem.cpp: the test seam rt::xmem::reload_remap_release_setting().
- xmem_test: test_remap_releases (and the title_geometry_watch.h include only it used).
- README row, the docs/d3d12_vulkan.md paragraph; comments that named it.

Console heap mirror (LEONIDA_HEAP_MIRROR, LEONIDA_HEAP_MIRROR_CHECK, from 746059011):
- src/console_heap_copy.h goes. ConsoleHeap::copy is a plain std::uint8_t* again, written with memcpy/memset as
  before the mirror, including the zeroing site that #2350's merge of #2162 resolved as heap.copy.zero(); the
  compute-input probe reads it directly again. Without the mirror, view() was the copy itself, so nothing changes.
- heap_mirror_enabled(), heap_mirror_check_enabled(), check_console_heap_mirror(), the per-heap check counters and
  log line, and the test API console_heap_mirror_mismatches() (d3d12_com.h).
- Tests console_heap_copy, d3d12_console_heap_mirror, _off and _default with their CMake entries; README rows and
  the docs/d3d12_vulkan.md sentences.

Kept, because other paths use them or main's behaviour with the variable unset depends on them:
- LEONIDA_GEOMETRY_HOST and its DeviceState memory-type assert (dc9ef1a0b).
- The final copy at retirement (GeometryViews::retire_range's final_copy, "copied at retirement" in the geometry
  buffers line): XMemFree of a title heap block (free_title_block) reports a release while the block's memory stays
  committed and readable, so that copy is still made without remap release. Comments now say that instead of
  naming remaps; geometry_views_test case 15 stays.
- forget_pool_span and "retired with their copy" in the title memory line: any retirement (free, decommit, unmap)
  feeds it.
- The release queue's joining of touching ranges (title_geometry_watch.h): unmaps report page runs too;
  geometry_views_test case 16 stays.
- LEONIDA_CONSOLE_RELEASE_FILTER, which predates the mirror; its sweep reads the copy again.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>xmem: read LEONIDA_GEOMETRY_REMAP_RELEASE once, with a test seam to read it again</title>
<updated>2026-11-26T15:05:43+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T15:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=4a6a8a633e71ceb5af7afbaadcf9ad2e4ba9a377'/>
<id>urn:sha1:4a6a8a633e71ceb5af7afbaadcf9ad2e4ba9a377</id>
<content type='text'>
GetEnvironmentVariableA at every remap ran under g_phys_mutex in every scatter call; with it, xmem_test's split race
("the reader of the views' last pages never faults or misreads") failed in two full Wine runs in a row, where main
passed it twice. The value is cached as before #2350's default changed; rt::xmem::reload_remap_release_setting lets
test_remap_releases switch it. Two full runs since: no change against main.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>xmem: a remap retires geometry copies only with LEONIDA_GEOMETRY_REMAP_RELEASE=1</title>
<updated>2026-11-26T14:57:50+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T14:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=1f7cbeff9a0461c037287e83297e9add75d2646a'/>
<id>urn:sha1:1f7cbeff9a0461c037287e83297e9add75d2646a</id>
<content type='text'>
Since #2350 a remap of physical pages that gives a page another frame retired the geometry copies over it, on by
default. In the first world run of that main on an RX 7900 XTX (RADV) the copies were retired by the thousand
(evicted 15010 in about 40 s) and the run ended in a GPUVM page fault (TCP read) and a lost device; the same build
settings without it ran eight minutes with evicted 0 and no fault.

A remap leaves the address valid on the console, so the title keeps using what names it, and not everything that
names a copy's address is rewritten when the copy goes:

- a root view is resolved while its list is recorded (d3d12_com.cpp, GraphicsCommandList::address); a list recorded
  before the retirement and executed in an ExecuteCommandLists begun after it is not among the replays the
  retirement waits for (kAfterExecutes covers only those in progress), so it reads the freed copy;
- a placed buffer view written outside a console heap carries the copy's address for as long as the descriptor lives.

The remap release is now off unless the variable is 1, read at every remap; the copies follow the new pages through
the refresh, as before #2350. Freeing, decommitting and unmapping still retire copies.

Tests: xmem_test test_remap_releases checks that a remap releases nothing by default and with 0, then the existing
checks with 1.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge #1972 from kurrutako: a slot-31 copy leaves the title's own mappings at the paired CPU range (RT-SLOT31-CPU-TWIN-TITLE-PAGES)</title>
<updated>2026-11-26T14:32:25+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T14:32:25+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=63c4978d2aa89cf896f8e42f450665a0d25aab74'/>
<id>urn:sha1:63c4978d2aa89cf896f8e42f450665a0d25aab74</id>
<content type='text'>
Head 28fc0262d. Closed by its author as incomplete; merged because world run 41 had it.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge #2240 from zmasi: sync TitleTexture readability against title_memory_map between passes (RT-TITLE-TEXTURE-MAP-GEN)</title>
<updated>2026-11-26T14:16:27+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T14:16:27+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=f5f67b4a9daae13d5a8a68358c1167e6866ec293'/>
<id>urn:sha1:f5f67b4a9daae13d5a8a68358c1167e6866ec293</id>
<content type='text'>
Head d088ea79b.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>d3d12: geometry copies in system memory, and retired when the title remaps their pages</title>
<updated>2026-11-26T14:07:51+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T04:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=36771ec53dc3769a75be6b0b878b9868e9648fdb'/>
<id>urn:sha1:36771ec53dc3769a75be6b0b878b9868e9648fdb</id>
<content type='text'>
Geometry copies held 4.4-6 GB of VRAM in world runs and were never evicted: a view retired only when its range was
freed, decommitted or unmapped, and the title streams by remapping the frames of its pools.

- LEONIDA_GEOMETRY_HOST (unset by default): 1 puts the copies in system memory outside VRAM, write-back where the
  device offers a cached host type; 2 write-combined. The memory type is picked among the host-visible types that are
  not device-local (memory_type_order alone would give the BAR first); a device with none keeps its types. Logged once
  and in the geometry buffers line.
- LEONIDA_GEOMETRY_REMAP_RELEASE (on by default, 0 off): XMemMapPhysicalPages with pages, the scatter call and
  CopyPageMappingsBatchX report the pages whose frame changed (or went) as released (xmem's RemapReleases, collected
  under the fault lock, reported after it), so GeometryViews retires the copies over them through #2094's
  drain_released and kAfterExecutes reaping. A page mapped again to its own frame is no change.
- A retired view is copied once more from its pages when they are readable: a list recorded before a remap that took
  the view's address reads the new bytes, as the refresh this replaces would have given it.
- A stream-pool extent backed by a retired copy leaves pool_spans (it was kept for the device's life).
- A full release queue joins touching ranges before it collapses into one covering range.

Tests: geometry_views_test cases 14-16, xmem_test test_remap_releases.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Sync title texture readability with map journal between refresh passes</title>
<updated>2026-11-26T10:02:47+00:00</updated>
<author>
<name>Zack</name>
<email>zmasi21@gmail.com</email>
</author>
<published>2026-11-26T10:02:47+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=d088ea79b8394c04a46ec19efb2922a7cd3faae3'/>
<id>urn:sha1:d088ea79b8394c04a46ec19efb2922a7cd3faae3</id>
<content type='text'>
Between periodic refresh_title_textures passes, synchronous slot-70 view creation and the async fill worker checked TextureReadability with a constant generation, missing title_memory_map range changes since the last pass. Track the map generation on TextureReadability and consult title_memory_map::changes_since outside refresh passes so unmapped or decommitted pages defer before hashing and newly mapped pages publish immediately without waiting for a submission.

Also mark mix_words and hash_bytes LEONIDA_GUARDED_NO_BUILTIN using an unaligned 64-bit load so clang-cl cannot emit CRT memcpy calls inside the __try frame, and classify non-title read faults over unmapped title pages in xmem::physical_page_fault as FaultExit::passed_guarded.
</content>
</entry>
<entry>
<title>d3d12: slot-133 shadows guard aliased title pages at every address instead of copying them each submission (RT-SHADOW-ALIAS-GUARD)</title>
<updated>2026-11-26T09:18:19+00:00</updated>
<author>
<name>Dimitar Pavlov</name>
<email>360593571+azsekazvamdimitar@users.noreply.github.com</email>
</author>
<published>2026-11-25T13:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=49a0b69fcdb80db1f2a44ce7ca0ab8dfdec1e403'/>
<id>urn:sha1:49a0b69fcdb80db1f2a44ce7ca0ab8dfdec1e403</id>
<content type='text'>
A page xmem maps at two addresses was copied whole at every refresh, since
a guard on one view doesn't fault a write through the other: about 1 GB a
submission after the story load on a retail boot. ShadowPages now arms the
geometry watch's cells of each aliased 64 KiB block at every address it is
mapped and copies a block only when a cell's version moved. xmem tells the
cells of a mapping change after updating the peers, and of list value
writes made through the section.

AI-assisted; tested under WineHQ 11.22 and GE-Proton11-14 on an RTX 3090
(NVIDIA 590.48.01).
</content>
</entry>
<entry>
<title>Merge main into RT-GEOMETRY-VIEW-EVICTION</title>
<updated>2026-11-26T02:22:30+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T02:22:30+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=7d38eee1163a8a825cc2506b2e931c5313f45014'/>
<id>urn:sha1:7d38eee1163a8a825cc2506b2e931c5313f45014</id>
<content type='text'>
Conflict in runtime/shims/d3d12_title_buffer_windows.h: main (#2098) added the
lock-free published_ block list (for_each_block, find_mapped); this branch
destroys empty blocks. Both are kept; a destroyed block's published_ entry is
cleared here, and the follow-up commits make that safe for the lock-free readers.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
