native: heap buffer views not linear in one pool read the title's own mapping instead of the null view (#258) #267

Manually merged
github merged 37 commits from github-bot/gh-267 into main 2026-11-27 10:48:46 +00:00 AGit
Owner

@⁠Olima34 on GitHub · 2026-11-27 06:52 UTC · original
Olima34:fix/heap-views-title-alias → main · +519 −4 · 7 files · 2 commits · merged 2026-11-27 10:46 UTC

The fix announced on #258 for item 1: the G-buffer cullers read their instance data through a heap buffer view that the host wrote as the null view.

Bug. NativeHost::mirror wrote the null view for a heap buffer view whose range isn't one linear run of a pool (pool pages scattered, or in descending order), even when the title maps the whole range with no gap.

  • What it hit: culler ff826810673a0198 reads its instance data from heap entry 17. That entry is title buffer 0x24010000, 182,452,224 bytes: the "174 MB … not in a mapped pool" line in every run. Entry 9936 (0xd0eab0000, 52 MB) is nulled the same way.
  • The data is there: on the CPU, the title memory behind entry 17 is 31.6% non-zero in its first 64 KiB.

Fix. When the range isn't linear in one pool but the title maps it with no gap (new PoolTable::covers), mirror wraps the title's own addresses with the existing wrap_title_memory instead of writing the null view.

  • NativeHost::title_alias aligns the range to 16 KiB and caches the wrapped buffer by range, along with a signature of the title mappings the range crosses (PoolTable::signature). The buffer is reused while that signature holds and made again when the title remaps the range. The last 64 are kept; a pool release drops only wraps over that pool's pages, never one an entry shows.
  • The wrapped buffer is written through write_buffer, so it is resident exactly as pool buffers are, on both residency paths (the heap's residency set, and per-encoder naming on Macs without sets). It aliases title memory: it adds nothing to phys_footprint, and Metal's currentAllocatedSize counts it once more.
  • Following the title's pages: at each submission, if the pool table's generation changed, every heap entry that is wrapped, or left null because of a gap, is mirrored again when its mapping signature changed (follow_title_pages). A remap gets a new wrap, an unmap gets the null view, and a gap mapped later gets wrapped. Shortcut: a partly unmapped range reads zeros as a whole.
  • A range with a real gap still stays the null view, logged at info level for the first 64 cases. In game, those are host-side addresses and null descriptors, not title pools.

Tests. native::tests::a_wrapped_view_follows_title_pages_remapped_or_unmapped_under_it remaps, then unmaps, under a wrapped view and checks the reads. Also: native::tests::a_buffer_view_across_title_pages_out_of_pool_order_reads_the_title_mapping maps two real title pages (with mach_vm_remap) from pool pages 2 then 1, with 64 words across the boundary. The heap_rw fixture reads them on the GPU through a heap view. Without the fix, mirror refuses the view and the test fails.

In game (M5 Pro, Series S, windowed, on 2a3b03d1 + #253):

  • Heap entry 17 is now wrapped, with 0 GPU errors in every run.
  • But this isn't the last gate. Mesh record buffer A is still 100% zero, even with a local switch that lets the GPU finish each frame before the next one records.
  • The G-buffer is 0–8.4% non-black at most (0–3.5% before), so still not lit, and the content is noisy 64x64 tiles, not geometry.
  • The cullers do run groups: their indirect dispatch counts at encode time are 248, 81, 64, 62, 129, 2,389 and 1,750.
  • The next suspect is #258 item 3: the cullers' projected-depth test (v13 against min(pyramid, 1.0), then v_cmp_nge, which is true on NaN), where every lane is culled.

Checks: victory-gpu 317 tests pass (arm64), and victory-hle, victory and xtask pass. Windows clippy is clean with -D warnings. cargo xtask policy passes. docs/native-host.md has a new section, "Heap buffer views not linear in one pool (#258)", and the VICTORY_TRACE_ROOT_SPAN line that said such views are refused is corrected.

**@⁠Olima34** on GitHub · 2026-11-27 06:52 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267) `Olima34:fix/heap-views-title-alias` → `main` · +519 −4 · 7 files · 2 commits · merged 2026-11-27 10:46 UTC The fix announced on #258 for item 1: the G-buffer cullers read their instance data through a heap buffer view that the host wrote as the null view. **Bug.** `NativeHost::mirror` wrote the null view for a heap buffer view whose range isn't one linear run of a pool (pool pages scattered, or in descending order), even when the title maps the whole range with no gap. - **What it hit:** culler `ff826810673a0198` reads its instance data from heap entry 17. That entry is title buffer `0x24010000`, 182,452,224 bytes: the "174 MB … not in a mapped pool" line in every run. Entry 9936 (`0xd0eab0000`, 52 MB) is nulled the same way. - **The data is there:** on the CPU, the title memory behind entry 17 is 31.6% non-zero in its first 64 KiB. **Fix.** When the range isn't linear in one pool but the title maps it with no gap (new `PoolTable::covers`), `mirror` wraps the title's own addresses with the existing `wrap_title_memory` instead of writing the null view. - `NativeHost::title_alias` aligns the range to 16 KiB and caches the wrapped buffer by range, along with a signature of the title mappings the range crosses (`PoolTable::signature`). The buffer is reused while that signature holds and made again when the title remaps the range. The last 64 are kept; a pool release drops only wraps over that pool's pages, never one an entry shows. - The wrapped buffer is written through `write_buffer`, so it is resident exactly as pool buffers are, on both residency paths (the heap's residency set, and per-encoder naming on Macs without sets). It aliases title memory: it adds nothing to `phys_footprint`, and Metal's `currentAllocatedSize` counts it once more. - **Following the title's pages:** at each submission, if the pool table's generation changed, every heap entry that is wrapped, or left null because of a gap, is mirrored again when its mapping signature changed (`follow_title_pages`). A remap gets a new wrap, an unmap gets the null view, and a gap mapped later gets wrapped. Shortcut: a partly unmapped range reads zeros as a whole. - A range with a real gap still stays the null view, logged at info level for the first 64 cases. In game, those are host-side addresses and null descriptors, not title pools. **Tests.** `native::tests::a_wrapped_view_follows_title_pages_remapped_or_unmapped_under_it` remaps, then unmaps, under a wrapped view and checks the reads. Also: `native::tests::a_buffer_view_across_title_pages_out_of_pool_order_reads_the_title_mapping` maps two real title pages (with `mach_vm_remap`) from pool pages 2 then 1, with 64 words across the boundary. The `heap_rw` fixture reads them on the GPU through a heap view. Without the fix, `mirror` refuses the view and the test fails. **In game** (M5 Pro, Series S, windowed, on 2a3b03d1 + #253): - Heap entry 17 is now wrapped, with 0 GPU errors in every run. - **But this isn't the last gate.** Mesh record buffer A is still 100% zero, even with a local switch that lets the GPU finish each frame before the next one records. - The G-buffer is 0–8.4% non-black at most (0–3.5% before), so still not lit, and the content is noisy 64x64 tiles, not geometry. - The cullers do run groups: their indirect dispatch counts at encode time are 248, 81, 64, 62, 129, 2,389 and 1,750. - The next suspect is #258 item 3: the cullers' projected-depth test (`v13` against `min(pyramid, 1.0)`, then `v_cmp_nge`, which is true on NaN), where every lane is culled. **Checks:** victory-gpu 317 tests pass (arm64), and victory-hle, victory and xtask pass. Windows clippy is clean with `-D warnings`. `cargo xtask policy` passes. `docs/native-host.md` has a new section, "Heap buffer views not linear in one pool (#258)", and the `VICTORY_TRACE_ROOT_SPAN` line that said such views are refused is corrected.
A buffer view in a descriptor heap was written as a view of the pool
buffer that holds its range, which needs the range to be one linear run
of one pool. The title maps its physical pages one 64 KiB page at a
time, often in descending pool order, so a large buffer seldom is one,
and such a view was the null view: the shader read zeros ("a descriptor
was not mirrored ... is not in a mapped pool", about 500 to 3,000 a run).

The world's G-buffer culling shaders read their instances that way
(#258): culler ff826810673a0198's root constants name heap entry 17, a
182,452,224-byte buffer the title had filled. The host nulled it, so the
culler read all-zero instances. A 52 MB one (entry 9936) was nulled too.

Title memory is mapped at its own addresses in this process. A view
whose range the title maps without a gap (PoolTable::covers), but not as
one run of a pool, now wraps those addresses (NativeHost::title_alias:
the backend's wrap_title_memory over whole 16 KiB host pages). The wrap
is cached by range and dropped when a pool is released. A later remap of
those pages is seen when the entry is mirrored again (marked shortcut).

Test: tests::a_buffer_view_across_title_pages_out_of_pool_order_reads_
the_title_mapping maps two title pages for real from pool pages 2 then 1,
puts 64 words across the boundary and reads them through a heap view on
the GPU. The view was refused before.

In game the 174 MB view is wrapped, with no GPU errors. The mesh records
still stay zero after the GPU has run the frame, so this was one input
the cullers lacked, not the last.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 06:52:35 +00:00
github-bot force-pushed github-bot/gh-267 from 82a25593dd to 37670bfe29 2026-11-27 07:08:08 +00:00 Compare
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 08:08 UTC · original

Thank you for the pull request. The test uses real remapped pages and fails without the change, and it is good to have the entry 17 and 9936 sizes in the text.

Before it can merge, two questions from my comment in #258 that the text only half answers:

  1. What happens to a page inside a wrapped range that the title unmaps later? The wrap is a view of host addresses, so I expect the GPU to read unmapped memory and the command buffer to fail. Please say what happens, and add a test if you can (map, wrap, unmap one page, then run). The text answers the remap case only, and says it is seen only when the entry is mirrored again.
  2. Ketan-Kapse's second lesson was that the entry is loaded by the shader itself, so it is in no bound table and remirror_tables never visits it again. Your shortcut says exactly that remap is not seen until it is mirrored again. For entry 17 that may be never. Please say whether the title remaps that range after the entry is written, or show that it does not (a log of the signature for entry 17 over a world load is enough).

Please also give the resident size of the wrapped 174 MiB and 50 MiB views as the process footprint before and after, because the text says it adds no memory and I have not seen it measured. Ketan-Kapse says #267 and #264 together fill the records and neither alone does, so please run them together.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 08:08 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267#issuecomment-7213189217) Thank you for the pull request. The test uses real remapped pages and fails without the change, and it is good to have the entry 17 and 9936 sizes in the text. Before it can merge, two questions from my comment in #258 that the text only half answers: 1. What happens to a page inside a wrapped range that the title unmaps later? The wrap is a view of host addresses, so I expect the GPU to read unmapped memory and the command buffer to fail. Please say what happens, and add a test if you can (map, wrap, unmap one page, then run). The text answers the remap case only, and says it is seen only when the entry is mirrored again. 2. Ketan-Kapse's second lesson was that the entry is loaded by the shader itself, so it is in no bound table and `remirror_tables` never visits it again. Your shortcut says exactly that remap is not seen until it is mirrored again. For entry 17 that may be never. Please say whether the title remaps that range after the entry is written, or show that it does not (a log of the signature for entry 17 over a world load is enough). Please also give the resident size of the wrapped 174 MiB and 50 MiB views as the process footprint before and after, because the text says it adds no memory and I have not seen it measured. Ketan-Kapse says #267 and #264 together fill the records and neither alone does, so please run them together.
Author
Owner

@⁠Olima34 on GitHub · 2026-11-27 09:04 UTC · original

Thanks for the review. Short answers now, data to follow in the next revision:

  1. A page unmapped later inside a wrapped range: not tested yet. The wrap is newBufferWithBytesNoCopy over the title's addresses, and I don't know what Metal does when a page under it is unmapped: a fault, a stale page kept alive, or zeros. We'll add the test you describe (map, wrap, unmap one page, run), report what happens, and handle it.
  2. Ketan-Kapse's two points are real gaps in this version. It wraps only a range the title maps fully at mirror time, and nothing mirrors entry 17 again. The next revision will, at submission and on a pool-table generation change, re-mirror the heap entries whose range changed or that were left null because part of their range was unmapped. That's one comparison when nothing changed. It will also log entry 17's signature over a world load, to show whether the title remaps it.
  3. Footprint: we'll give phys_footprint and Metal's currentAllocatedSize before and after, for the 174 MiB and 50 MiB views.
  4. Run together with #264, as you suggest. The results will go on #258.
**@⁠Olima34** on GitHub · 2026-11-27 09:04 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267#issuecomment-7214240445) Thanks for the review. Short answers now, data to follow in the next revision: 1. **A page unmapped later inside a wrapped range:** not tested yet. The wrap is `newBufferWithBytesNoCopy` over the title's addresses, and I don't know what Metal does when a page under it is unmapped: a fault, a stale page kept alive, or zeros. We'll add the test you describe (map, wrap, unmap one page, run), report what happens, and handle it. 2. **Ketan-Kapse's two points are real gaps in this version.** It wraps only a range the title maps fully at mirror time, and nothing mirrors entry 17 again. The next revision will, at submission and on a pool-table generation change, re-mirror the heap entries whose range changed or that were left null because part of their range was unmapped. That's one comparison when nothing changed. It will also log entry 17's signature over a world load, to show whether the title remaps it. 3. **Footprint:** we'll give `phys_footprint` and Metal's `currentAllocatedSize` before and after, for the 174 MiB and 50 MiB views. 4. **Run together with #264**, as you suggest. The results will go on #258.
A no-copy wrap of the title's own pages keeps the physical pages it was
made over. After the title maps other pool pages at those addresses, or
unmaps them, the GPU still read and wrote the old pages through it, with
no fault and no zeros (M5 Pro, macOS 27). An entry left null for a gap
was never tried again either: a shader that loads its entry from the
heap itself (the G-buffer cullers' entry 17) is in no bound table, so
remirror_tables never visits it.

At each submission, if the pool table changed since the host last
looked (one comparison otherwise), every heap entry that shows a wrap,
or that was left null for a gap, is mirrored again when the signature of
the mappings under it changed (NativeHost::follow_title_pages, with
NativeHeap::title_views). A remapped range gets a new wrap, a range with
a page unmapped becomes the null view, a gap mapped later is wrapped.
An entry the title has since filled with another record is dropped.

The wrap cache no longer empties at every pool release: only the wraps
over a released pool's pages go, and a wrap a heap entry shows is never
evicted. Emptying it made a new wrap of the same range each time the
entry was mirrored again, while the old ones stayed alive (174 MiB view
wrapped 5 times in 80 s, 50 MiB 10 times, 24 MiB 17 times; that run
ended in GPU timeouts and an out-of-memory error).

Measured: a wrap adds nothing to the process footprint and takes no
process address space; Metal's currentAllocatedSize counts it again.
In game the 174 MiB and 50 MiB views left phys_footprint the same to
the byte, Metal's count +182,452,224 and +52,428,800; a local 174 MiB
measurement kept 241 MiB through the wrap and two dispatches. Large
wraps are logged with both numbers. Entry 17's signature did not change
over a 300 s world run (logged at the 1st to 1,000th look).

Test: tests::a_wrapped_view_follows_title_pages_remapped_or_unmapped_
under_it remaps a view's second page to another pool page, then unmaps
it: the view reads the new page, then zeros. Without the follow it
read the old page both times.
Author
Owner

@⁠Olima34 on GitHub · 2026-11-27 09:43 UTC · original

Revision pushed (ca22c393 on top of 37670bfe). Answers to your questions:

1. A page remapped or unmapped under a wrap. Measured on M5 Pro, macOS 27: a no-copy wrap keeps the physical pages it was made over. After the title remaps the range to other pool pages, or unmaps it, the GPU keeps reading and writing the old pages. There's no fault and no zeros.

  • The fix: at each submission, if the pool table's generation changed (one comparison otherwise), NativeHost::follow_title_pages re-mirrors every heap entry that is wrapped, or left null because of a gap, whose mapping signature changed. A remap gets a new wrap, an unmap gets the null view (zeros), and a gap mapped later gets wrapped.
  • Test: native::tests::a_wrapped_view_follows_title_pages_remapped_or_unmapped_under_it remaps and then unmaps under a wrapped view. The view reads the new page, then zeros. Without the following, it reads the old page and fails.
  • Shortcut, marked in the code: a partly unmapped range reads zeros as a whole. A D3D12 reserved resource reads zeros only on its unmapped tiles.

2. Entries loaded by the shader itself. The following covers every entry of every heap that holds a wrapped or gap-null view, not only bound tables, so entry 17 is covered.

  • Over a 300 s world run, entry 17's signature (0x1f7c0000+0xae00000) stayed the same from the 1st to the 1,000th look, from generation 6,742 to 321,276. So the title doesn't remap that range.
  • The pool table changes about 2,600 times a second.
  • A bug in the first revision, fixed in this commit: the wrap cache was cleared on every pool release. In one run that re-wrapped the 174 MiB view 5 times in 80 s, the 50 MiB one 10 times and a 24 MiB one 17 times, while the old wraps stayed alive. That run ended in GPU timeouts and an out-of-memory error, with 24 GB still held by the kernel after exit. Now the cache drops only wraps over a released pool's pages, and never one an entry shows. With that: 3 wraps in total, no GPU error, a full 300 s run, and GPU memory clean after exit.

3. Footprint. A wrap adds nothing to phys_footprint and takes no process address space. Metal's currentAllocatedSize counts it once more:

View phys_footprint Metal currentAllocatedSize
174 MiB, in game 769,473,040 bytes before and after +182,452,224 bytes
50 MiB, in game unchanged +52,428,800 bytes
174 MiB, local test (after two dispatches reading through it) 241 MiB before and after +174 MiB

Each large wrap logs these numbers ("a large buffer view wraps the title's own pages").

4. With #264 and #253 on this revision: the G-buffer peaks at 88% lit (153 s), then holds 11–13%. There's no root parameter 255 line and no GPU error.

Checks: victory-hle, victory, victory-gpu (318) and xtask pass. Windows clippy is clean with -D warnings, and cargo xtask policy passes. One unrelated test, texture_tests::a_missed_write_not_followed_by_another_backs_off_whole_reads, failed once under load (41) right after a reboot, then passed twice. The docs section is updated.

**@⁠Olima34** on GitHub · 2026-11-27 09:43 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267#issuecomment-7215015443) Revision pushed (`ca22c393` on top of `37670bfe`). Answers to your questions: **1. A page remapped or unmapped under a wrap.** Measured on M5 Pro, macOS 27: a no-copy wrap keeps the physical pages it was made over. After the title remaps the range to other pool pages, or unmaps it, the GPU keeps reading and writing the *old* pages. There's no fault and no zeros. - **The fix:** at each submission, if the pool table's generation changed (one comparison otherwise), `NativeHost::follow_title_pages` re-mirrors every heap entry that is wrapped, or left null because of a gap, whose mapping signature changed. A remap gets a new wrap, an unmap gets the null view (zeros), and a gap mapped later gets wrapped. - **Test:** `native::tests::a_wrapped_view_follows_title_pages_remapped_or_unmapped_under_it` remaps and then unmaps under a wrapped view. The view reads the new page, then zeros. Without the following, it reads the old page and fails. - **Shortcut, marked in the code:** a partly unmapped range reads zeros as a whole. A D3D12 reserved resource reads zeros only on its unmapped tiles. **2. Entries loaded by the shader itself.** The following covers every entry of every heap that holds a wrapped or gap-null view, not only bound tables, so entry 17 is covered. - Over a 300 s world run, entry 17's signature (`0x1f7c0000+0xae00000`) stayed the same from the 1st to the 1,000th look, from generation 6,742 to 321,276. So the title doesn't remap that range. - The pool table changes about 2,600 times a second. - **A bug in the first revision, fixed in this commit:** the wrap cache was cleared on every pool release. In one run that re-wrapped the 174 MiB view 5 times in 80 s, the 50 MiB one 10 times and a 24 MiB one 17 times, while the old wraps stayed alive. That run ended in GPU timeouts and an out-of-memory error, with 24 GB still held by the kernel after exit. Now the cache drops only wraps over a released pool's pages, and never one an entry shows. With that: 3 wraps in total, no GPU error, a full 300 s run, and GPU memory clean after exit. **3. Footprint.** A wrap adds nothing to `phys_footprint` and takes no process address space. Metal's `currentAllocatedSize` counts it once more: | View | `phys_footprint` | Metal `currentAllocatedSize` | |---|---|---| | 174 MiB, in game | 769,473,040 bytes before and after | +182,452,224 bytes | | 50 MiB, in game | unchanged | +52,428,800 bytes | | 174 MiB, local test (after two dispatches reading through it) | 241 MiB before and after | +174 MiB | Each large wrap logs these numbers ("a large buffer view wraps the title's own pages"). **4. With #264 and #253 on this revision:** the G-buffer peaks at 88% lit (153 s), then holds 11–13%. There's no `root parameter 255` line and no GPU error. **Checks:** victory-hle, victory, victory-gpu (318) and xtask pass. Windows clippy is clean with `-D warnings`, and `cargo xtask policy` passes. One unrelated test, `texture_tests::a_missed_write_not_followed_by_another_backs_off_whole_reads`, failed once under load (41) right after a reboot, then passed twice. The docs section is updated.
github-bot force-pushed github-bot/gh-267 from ca22c393a3 to f837d3bfd6 2026-11-27 10:48:46 +00:00 Compare
github manually merged commit b42494a75b into main 2026-11-27 10:48:46 +00:00
Author
Owner

@⁠Olima34 on GitHub · 2026-11-27 10:43 UTC · original

Rebased on main 8fe4b63d (head f837d3bf). The only conflict was in NativeHeap: the used field from #292 and title_views from this PR now sit side by side. After the rebase, victory-gpu has 318 tests passing, Windows clippy is clean on the workspace, and cargo xtask policy passes.

**@⁠Olima34** on GitHub · 2026-11-27 10:43 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267#issuecomment-7216223556) Rebased on main 8fe4b63d (head f837d3bf). The only conflict was in `NativeHeap`: the `used` field from #292 and `title_views` from this PR now sit side by side. After the rebase, victory-gpu has 318 tests passing, Windows clippy is clean on the workspace, and `cargo xtask policy` passes.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 10:46 UTC · original

Thank you. This answers what I asked. You measured what a wrap does when the title remaps or unmaps a page under it, you followed the pages, and the test remaps and then unmaps. The log of entry 17 over 300 s shows the title does not remap it, and the footprint table shows the wrap adds nothing to phys_footprint. You also ran it with #264 and #253. CI is green.

I have not run this revision (ca22c393); my run in #258 had the first one. It is behind main, and #279 and #264 change the same part of mirror, so the second of them to land needs a rebase. Not blocking: when you have a number for what follow_title_pages costs per submission, please post it, since the pool table changes about 2,600 times a second.

Merged.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 10:46 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267#issuecomment-7216284246) Thank you. This answers what I asked. You measured what a wrap does when the title remaps or unmaps a page under it, you followed the pages, and the test remaps and then unmaps. The log of entry 17 over 300 s shows the title does not remap it, and the footprint table shows the wrap adds nothing to `phys_footprint`. You also ran it with #264 and #253. CI is green. I have not run this revision (ca22c393); my run in #258 had the first one. It is behind main, and #279 and #264 change the same part of `mirror`, so the second of them to land needs a rebase. Not blocking: when you have a number for what `follow_title_pages` costs per submission, please post it, since the pool table changes about 2,600 times a second. Merged.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 10:46 UTC · original

I ran these five together on my Mac before merging (#101, #267, #288, #289, #291 on main, M5 Pro 48 GB, Series S, warm cache, three runs): two runs stayed in the world until the time limit (139 s and 202 s there, about 2 fps, no failed command buffer, no fault); one ended at the start of the world with a title fault I had not seen before (first chance at image+0x4fafef8, a read of 0x30000065c), with no GPU error before it. I could not tie that one to any of the five. If you see it, please say so.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 10:46 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267#issuecomment-7216286800) I ran these five together on my Mac before merging (#101, #267, #288, #289, #291 on main, M5 Pro 48 GB, Series S, warm cache, three runs): two runs stayed in the world until the time limit (139 s and 202 s there, about 2 fps, no failed command buffer, no fault); one ended at the start of the world with a title fault I had not seen before (first chance at image+0x4fafef8, a read of 0x30000065c), with no GPU error before it. I could not tie that one to any of the five. If you see it, please say so.
Author
Owner

@⁠Olima34 on GitHub · 2026-11-27 11:16 UTC · original

The number you asked for: in our world run, one follow_title_pages pass cost about 3 ms, with the pool lock held, at about 12 passes a second. The title copies the same descriptor into many heap slots, and each copy re-walked the same range. The follow-up PR walks each distinct range once per pass: about 70–80 µs per pass, under 1 ms of CPU a second. The table and the harness are in the PR.

**@⁠Olima34** on GitHub · 2026-11-27 11:16 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/267#issuecomment-7216876790) The number you asked for: in our world run, one `follow_title_pages` pass cost about 3 ms, with the pool lock held, at about 12 passes a second. The title copies the same descriptor into many heap slots, and each copy re-walked the same range. The follow-up PR walks each distinct range once per pass: about 70–80 µs per pass, under 1 ms of CPU a second. The table and the harness are in the PR.
This discussion has been locked. Commenting is limited to contributors.
No description provided.