feat(vk): log the guest pools the page table cannot reach #474

Open
mooki wants to merge 1 commit from mooki/Longshot:feat/page-table-census into main
Member

Type: feat · Risk: low · Tested on: macOS 26.7.1, Apple M4 Max (game-free checks, no game run) · Needs: Windows or Linux, any GPU (a game run)

Why

Shaders follow pointers that no bound buffer holds through a page table of guest memory, but that table covers only two
windows of the guest's 512 GB: 8 GB from 64 GB (the heap) and 4 GB from 508 GB (where the game's GPU allocator put its storage
buffers). A pointer into a pool outside them reads 0, as the foliage culling's did before the table. Nobody has counted whether
the game makes pools out there, so whether the table has to reach the whole window, and how, is a guess. This logs them.

What changed

The renderer now counts the guest pools that come into the pool table outside the page table's two windows: it names the
first 30 as they come and logs a summary when the window closes. The page table itself is unchanged; its windows and
size only moved into a header that the table, the census and the test read.

  • Read first: PageTableCensus::refresh and summary in page_table_census.h, then the memory_sync hunk.
  • vk: gpu/vk/page_table_census.h (new).
    • The two windows, kPageWindows, and the table's size, kPageTableEntries, moved there from guest_pages_set and
      memory_guest_pages with the same values.
    • PageTableCensus: each refresh of the pool table names the pools that came outside the windows, the first 30 of them,
      with their bytes outside when only part of a pool is. summary() counts every pool that came, their bytes outside, the
      most outside at once, how many are outside now and the lowest and highest address among them.
  • vk: gpu/vk/vk_memory.cpp.
    • guest_pages_set and memory_guest_pages take the windows and the size from the header.
    • memory_sync refreshes the census with the pool table it is about to take, under a mutex of its own (page_census_mu),
      before it takes pools_mu. It runs only when the host's pool table changed, as before.
    • page_table_census_log() (declared in vk_internal.h) logs the summary.
  • vk: gpu/vk/vk_main.cpp: mkwvk_close_asked logs the summary when the window closes.
  • tests: tests/test_page_table_census.py (new).
    • It holds the header's windows to the shaders' own constants (kGuestPagesBase, kGuestPagesBytes, kGuestPagesBase2,
      kGuestPagesBytes2 in spirv_emit_context.cpp), and checks that guest_pages_set and memory_guest_pages use the
      header and that memory_sync and mkwvk_close_asked call the census.
    • It runs the census against pool tables like memory_sync's: pools at 128 GB and 504 GB and two across a window's end
      are named (the two by their bytes outside), pools inside are not, the same table refreshed again names nothing, past 30
      the pools are counted but not named, a pool that leaves and comes back counts again, and with none outside the summary
      says so.
    • It fails on main.
  • Design: the census counts the game's pools (the host's pool table), imported or not: a pointer into a pool outside the
    windows reads 0 either way.
  • Left out: a follow-up that makes the table reach the whole window would change this header's windows and the
    emitter's constants together; the test already holds the two to each other.

Measurements

Verdict: works, game-free: the new test fails on main and passes here, and the suite adds no failure. The census's
own cost, timed alone before the rebase (not rerun), is 2.4 µs to 29.2 µs a refresh, and a refresh happens only when
the host's pool table changed. No game run yet (Must be tested).

Commits: main 6c9edffe5d (2026-11-14); this PR feat/page-table-census @
50128bf247.
Hardware: Apple M4 Max (16 CPUs), macOS 26.7.1, Apple clang 21. Game-free: no GPU, no game
Scene: none. The census's proof is the test; its cost is a micro-benchmark of one refresh
Method: tests/test_page_table_census.py against main's tree (6c9edffe) and against this PR; the full game-free suite on
both; the census's refresh timed on tables of 2,400 and 8,192 pools (the median of 50 after a warm-up, -O2), before
the rebase, at 3bc46da5 (page_table_census.h is the same after it)
How to reproduce: python -I -B tests/test_page_table_census.py --cxx clang++ (add --source <a tree of main> for main's
side)

Before: main @ 6c9edffe After: this PR @ 50128bf2
tests/test_page_table_census.py FAIL: no census PASS
full game-free suite on macOS (tests/run_all.py --jobs 6) 531 passed, 32 failed, 17 skipped 532 passed, 32 failed, 17 skipped

The census's cost, before the rebase and not rerun after it (page_table_census.h is byte for byte the same at
50128bf2); main has no census:

the census's work when the pool table changes (median of 50 after a warm-up, -O2) this PR before the rebase @ 3bc46da5
2,400 pools, none outside / 40 outside 2.4 µs / 3.0 µs (median)
8,192 pools, 1,000 outside 29.2 µs (median)
main @ 6c9edffe:
FAIL: gpu/vk/page_table_census.h: no census of the guest pools outside the page table's windows

this PR @ 50128bf2:
PASS: each guest pool outside the page table's windows is named as it comes (the first 30), and the close's line counts them all, their bytes outside and where they lie

The lines the test expects, for a pool at 128 GB, one at 504 GB, two across a window's end, then 40 more and one back:

vk: page table: pool 0x11ffff0000..0x1200010000 (128 KB) is partly outside its windows (64 KB of it): a pointer into those bytes that no bound buffer holds reads 0
vk: page table: pool 0x2000000000..0x2004000000 (64.0 MB) is outside its windows: a pointer into it that no bound buffer holds reads 0
vk: page table: pool 0x7e00000000..0x7e00100000 (1.0 MB) is outside its windows: a pointer into it that no bound buffer holds reads 0
vk: page table: pool 0x7fffff0000..0x8000010000 (128 KB) is partly outside its windows (64 KB of it): a pointer into those bytes that no bound buffer holds reads 0
...
vk: page table census (close): 45 pools outside its windows, 64-72 GB and 508-512 GB, came into the pool table (the first 30 named above), 169.1 MB of them outside; at most 44 at once (105.1 MB), 44 now of 46 pools; between 0x11ffff0000 and 0x8000010000

With no pool outside: vk: page table census (close): no pool outside its windows, 64-72 GB and 508-512 GB (2 pools in the table now).

Screenshots: none; nothing on screen.

Flags and settings

None.

Testing

Tested:

  • On an Apple M4 Max with macOS 26.7.1, game-free only.
  • tests/test_page_table_census.py fails on main and passes here.
  • The full suite on both sides, compared by test name.
    • By test name, against main 6c9edffe's run on the same Mac: only one status changed: test_page_table_census, absent
      on main, passes here.
    • These 32 checks fail here and on main on this Mac, by name (not triaged here: some need the macOS port's other pull
      requests, some are checks main added or changed since 5e072fc8): test_appimage_package_retry,
      test_appimage_player_build, test_collect_wide, test_control, test_cpm_discovery, test_crash_dialog,
      test_crash_record, test_env_on, test_game_layout, test_lift_cleanup_error, test_linux_preflight,
      test_longshot_ctl, test_low_memory_notice, test_make_game_cache, test_mem_gate, test_mem_gate_children,
      test_mirror_trim, test_oot_state_tap, test_pcache_header_read, test_pipeline_cache_file,
      test_pipeline_cache_save, test_pipeline_play_cache, test_pipeline_tour, test_prof_symbols,
      test_program_cache_cleanup, test_program_cache_one_variant, test_readback_late, test_report_run,
      test_split_giants, test_vk_pgo, test_vram_budget_row, test_walk_key.
    • The same 17 checks skipped as on main.
    • Crash reports during the run: check.exe-2026-11-14-192832.ips (main's run: fault-arm64-2026-11-14-180704.ips,
      recorder_sync_test.exe-2026-11-14-180744.ips).
    • The checks that read vk_memory.cpp or vk_main.cpp pass here (test_pool_span, test_sparse_mirror,
      test_fsr4_tune, test_startup_progress, test_parallel_rb_refresh, nx2/test_import_windows).
  • Object compiles of gpu/vk/vk_memory.cpp and gpu/vk/vk_main.cpp with the renderer's flags (nx2/build.py), Apple clang
    21: arm64 and x86_64, on main and here, all 8 build. Main's renderer as a whole does not build on macOS (environ in
    vk_shader.cpp, posix_fallocate in pipeline_cache_file.h), so these used a compile-only prelude that declares those two
    names; these two files also build without it (arm64, both sides).
  • The census's cost, timed alone on this Mac before the rebase: 2.4 µs a refresh for 2,400 pools with none outside,
    29.2 µs for 8,192 pools with 1,000 outside. A refresh happens only at a submit that finds the host's pool table changed.
  • After the rebase onto main aa95d35f, at 99131946 (50128bf2 before the rebases onto e090cc48 and aa95d35f):
    Sweep3's checks of this head (the C/C++ it changes compiled, and its own tests run, on arm64 and x86_64 where they
    apply) gave the same results as before; python -I -B tests/run_all.py on wave S1's merge 11a5b4e7, which carries
    this head: 568/22/17 (passed/failed/skipped) against main aa95d35f's 543/33/17 on this Mac, no new failure
    (reports/2026-11-15-rebase-sweep-3.md).

Not tested:

  • An in-game run on any platform (none on this Mac's lane: no GPU or game runs).
  • How many lines a real game writes: at most 30 per run plus one at close.
  • Not built on Windows or Linux: the change uses only the standard library and logf, as the code around it does.
  • An in-game measurement, so the box for numbers from the same PC is not in the checklist.

Must be tested:

  • Windows or Linux, any GPU, any driver: build this PR (head 99131946) and main aa95d35f the same way, play a few minutes
    past the title on each and close the window, then read longshot_log.txt, expecting this PR's log to have
    vk: page table census (close): ... near the end and a vk: page table: pool ... line for each pool outside the
    windows (the first 30), if the game makes any, where main's has neither; post both lines, since the count decides
    how the table should grow (by hand: test request T-U3ND)

Risks

What could break: low. The output added is at most 30 lines in a run and one at close.

  • memory_sync does a little more work when the pool table changed (above), under a mutex of its own: inside it only the
    census runs and its lines are logged; pools_mu is taken after it is released.
  • Landing order: rebased on main 6c9edffe (2026-11-14) without a conflict; main had changed vk_main.cpp (#444) and
    vk_internal.h (#404) away from this PR's lines. No conflict with the author's other open PRs as rebased on 6c9edffe
    (git merge-tree of the heads, 2026-11-14).

Turning it off: revert the commit.

Compatibility: nothing changes. The page table's own contents do not change: the same windows, the same values, the
same entries. The emitter's constants (spirv_emit_context.cpp) are untouched, so the translator's stamp is the same
and no program is translated again. Saves, the options file and the vk ABI are unchanged.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main: on aa95d35f (#761, 2026-11-15), head 99131946, without a conflict; this PR's own
    commits, old → new: 50128bf2 → 99131946; the commit names elsewhere in this description are from before the
    rebase.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). On macOS: 532 passed, 17
    skipped, and 32 failures that also fail on main 6c9edffe on this Mac, named under Testing. After the rebase onto main
    aa95d35f (head 99131946): wave S1's merge 11a5b4e7, 568/22/17 against main aa95d35f's 543/33/17, no new failure.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
**Type:** feat · **Risk:** low · **Tested on:** macOS 26.7.1, Apple M4 Max (game-free checks, no game run) · **Needs:** Windows or Linux, any GPU (a game run) ## Why Shaders follow pointers that no bound buffer holds through a page table of guest memory, but that table covers only two windows of the guest's 512 GB: 8 GB from 64 GB (the heap) and 4 GB from 508 GB (where the game's GPU allocator put its storage buffers). A pointer into a pool outside them reads 0, as the foliage culling's did before the table. Nobody has counted whether the game makes pools out there, so whether the table has to reach the whole window, and how, is a guess. This logs them. ## What changed The renderer now counts the guest pools that come into the pool table outside the page table's two windows: it names the first 30 as they come and logs a summary when the window closes. The page table itself is unchanged; its windows and size only moved into a header that the table, the census and the test read. - Read first: `PageTableCensus::refresh` and `summary` in `page_table_census.h`, then the `memory_sync` hunk. - vk: `gpu/vk/page_table_census.h` (new). - The two windows, `kPageWindows`, and the table's size, `kPageTableEntries`, moved there from `guest_pages_set` and `memory_guest_pages` with the same values. - `PageTableCensus`: each refresh of the pool table names the pools that came outside the windows, the first 30 of them, with their bytes outside when only part of a pool is. `summary()` counts every pool that came, their bytes outside, the most outside at once, how many are outside now and the lowest and highest address among them. - vk: `gpu/vk/vk_memory.cpp`. - `guest_pages_set` and `memory_guest_pages` take the windows and the size from the header. - `memory_sync` refreshes the census with the pool table it is about to take, under a mutex of its own (`page_census_mu`), before it takes `pools_mu`. It runs only when the host's pool table changed, as before. - `page_table_census_log()` (declared in `vk_internal.h`) logs the summary. - vk: `gpu/vk/vk_main.cpp`: `mkwvk_close_asked` logs the summary when the window closes. - tests: `tests/test_page_table_census.py` (new). - It holds the header's windows to the shaders' own constants (`kGuestPagesBase`, `kGuestPagesBytes`, `kGuestPagesBase2`, `kGuestPagesBytes2` in `spirv_emit_context.cpp`), and checks that `guest_pages_set` and `memory_guest_pages` use the header and that `memory_sync` and `mkwvk_close_asked` call the census. - It runs the census against pool tables like `memory_sync`'s: pools at 128 GB and 504 GB and two across a window's end are named (the two by their bytes outside), pools inside are not, the same table refreshed again names nothing, past 30 the pools are counted but not named, a pool that leaves and comes back counts again, and with none outside the summary says so. - It fails on main. - Design: the census counts the game's pools (the host's pool table), imported or not: a pointer into a pool outside the windows reads 0 either way. - Left out: a follow-up that makes the table reach the whole window would change this header's windows and the emitter's constants together; the test already holds the two to each other. ## Measurements **Verdict:** works, game-free: the new test fails on main and passes here, and the suite adds no failure. The census's own cost, timed alone before the rebase (not rerun), is 2.4 µs to 29.2 µs a refresh, and a refresh happens only when the host's pool table changed. No game run yet (Must be tested). Commits: main 6c9edffe5da1f5b5383977aeab3f544c0de25d4c (2026-11-14); this PR feat/page-table-census @ 50128bf2472b3ae4c3f005d4702fa9152078ce36. Hardware: Apple M4 Max (16 CPUs), macOS 26.7.1, Apple clang 21. Game-free: no GPU, no game Scene: none. The census's proof is the test; its cost is a micro-benchmark of one refresh Method: `tests/test_page_table_census.py` against main's tree (6c9edffe) and against this PR; the full game-free suite on both; the census's `refresh` timed on tables of 2,400 and 8,192 pools (the median of 50 after a warm-up, `-O2`), before the rebase, at 3bc46da5 (`page_table_census.h` is the same after it) How to reproduce: `python -I -B tests/test_page_table_census.py --cxx clang++` (add `--source <a tree of main>` for main's side) | | Before: main @ 6c9edffe | After: this PR @ 50128bf2 | |---|---|---| | `tests/test_page_table_census.py` | FAIL: no census | PASS | | full game-free suite on macOS (`tests/run_all.py --jobs 6`) | 531 passed, 32 failed, 17 skipped | 532 passed, 32 failed, 17 skipped | The census's cost, before the rebase and not rerun after it (`page_table_census.h` is byte for byte the same at 50128bf2); main has no census: | the census's work when the pool table changes (median of 50 after a warm-up, `-O2`) | this PR before the rebase @ 3bc46da5 | |---|---| | 2,400 pools, none outside / 40 outside | 2.4 µs / 3.0 µs (median) | | 8,192 pools, 1,000 outside | 29.2 µs (median) | ``` main @ 6c9edffe: FAIL: gpu/vk/page_table_census.h: no census of the guest pools outside the page table's windows this PR @ 50128bf2: PASS: each guest pool outside the page table's windows is named as it comes (the first 30), and the close's line counts them all, their bytes outside and where they lie ``` The lines the test expects, for a pool at 128 GB, one at 504 GB, two across a window's end, then 40 more and one back: ``` vk: page table: pool 0x11ffff0000..0x1200010000 (128 KB) is partly outside its windows (64 KB of it): a pointer into those bytes that no bound buffer holds reads 0 vk: page table: pool 0x2000000000..0x2004000000 (64.0 MB) is outside its windows: a pointer into it that no bound buffer holds reads 0 vk: page table: pool 0x7e00000000..0x7e00100000 (1.0 MB) is outside its windows: a pointer into it that no bound buffer holds reads 0 vk: page table: pool 0x7fffff0000..0x8000010000 (128 KB) is partly outside its windows (64 KB of it): a pointer into those bytes that no bound buffer holds reads 0 ... vk: page table census (close): 45 pools outside its windows, 64-72 GB and 508-512 GB, came into the pool table (the first 30 named above), 169.1 MB of them outside; at most 44 at once (105.1 MB), 44 now of 46 pools; between 0x11ffff0000 and 0x8000010000 ``` With no pool outside: `vk: page table census (close): no pool outside its windows, 64-72 GB and 508-512 GB (2 pools in the table now)`. Screenshots: none; nothing on screen. ### Flags and settings None. ## Testing **Tested:** - On an Apple M4 Max with macOS 26.7.1, game-free only. - `tests/test_page_table_census.py` fails on main and passes here. - The full suite on both sides, compared by test name. - By test name, against main 6c9edffe's run on the same Mac: only one status changed: `test_page_table_census`, absent on main, passes here. - These 32 checks fail here and on main on this Mac, by name (not triaged here: some need the macOS port's other pull requests, some are checks main added or changed since 5e072fc8): `test_appimage_package_retry`, `test_appimage_player_build`, `test_collect_wide`, `test_control`, `test_cpm_discovery`, `test_crash_dialog`, `test_crash_record`, `test_env_on`, `test_game_layout`, `test_lift_cleanup_error`, `test_linux_preflight`, `test_longshot_ctl`, `test_low_memory_notice`, `test_make_game_cache`, `test_mem_gate`, `test_mem_gate_children`, `test_mirror_trim`, `test_oot_state_tap`, `test_pcache_header_read`, `test_pipeline_cache_file`, `test_pipeline_cache_save`, `test_pipeline_play_cache`, `test_pipeline_tour`, `test_prof_symbols`, `test_program_cache_cleanup`, `test_program_cache_one_variant`, `test_readback_late`, `test_report_run`, `test_split_giants`, `test_vk_pgo`, `test_vram_budget_row`, `test_walk_key`. - The same 17 checks skipped as on main. - Crash reports during the run: check.exe-2026-11-14-192832.ips (main's run: fault-arm64-2026-11-14-180704.ips, recorder_sync_test.exe-2026-11-14-180744.ips). - The checks that read `vk_memory.cpp` or `vk_main.cpp` pass here (`test_pool_span`, `test_sparse_mirror`, `test_fsr4_tune`, `test_startup_progress`, `test_parallel_rb_refresh`, `nx2/test_import_windows`). - Object compiles of `gpu/vk/vk_memory.cpp` and `gpu/vk/vk_main.cpp` with the renderer's flags (`nx2/build.py`), Apple clang 21: arm64 and x86_64, on main and here, all 8 build. Main's renderer as a whole does not build on macOS (`environ` in `vk_shader.cpp`, `posix_fallocate` in `pipeline_cache_file.h`), so these used a compile-only prelude that declares those two names; these two files also build without it (arm64, both sides). - The census's cost, timed alone on this Mac before the rebase: 2.4 µs a refresh for 2,400 pools with none outside, 29.2 µs for 8,192 pools with 1,000 outside. A refresh happens only at a submit that finds the host's pool table changed. - **After the rebase onto main aa95d35f**, at `99131946` (`50128bf2` before the rebases onto e090cc48 and aa95d35f): Sweep3's checks of this head (the C/C++ it changes compiled, and its own tests run, on arm64 and x86_64 where they apply) gave the same results as before; `python -I -B tests/run_all.py` on wave S1's merge `11a5b4e7`, which carries this head: 568/22/17 (passed/failed/skipped) against main aa95d35f's 543/33/17 on this Mac, no new failure (`reports/2026-11-15-rebase-sweep-3.md`). **Not tested:** - An in-game run on any platform (none on this Mac's lane: no GPU or game runs). - How many lines a real game writes: at most 30 per run plus one at close. - Not built on Windows or Linux: the change uses only the standard library and `logf`, as the code around it does. - An in-game measurement, so the box for numbers from the same PC is not in the checklist. **Must be tested:** - Windows or Linux, any GPU, any driver: build this PR (head 99131946) and main aa95d35f the same way, play a few minutes past the title on each and close the window, then read `longshot_log.txt`, expecting this PR's log to have `vk: page table census (close): ...` near the end and a `vk: page table: pool ...` line for each pool outside the windows (the first 30), if the game makes any, where main's has neither; post both lines, since the count decides how the table should grow (by hand: test request T-U3ND) ## Risks **What could break:** low. The output added is at most 30 lines in a run and one at close. - `memory_sync` does a little more work when the pool table changed (above), under a mutex of its own: inside it only the census runs and its lines are logged; `pools_mu` is taken after it is released. - Landing order: rebased on main 6c9edffe (2026-11-14) without a conflict; main had changed `vk_main.cpp` (#444) and `vk_internal.h` (#404) away from this PR's lines. No conflict with the author's other open PRs as rebased on 6c9edffe (`git merge-tree` of the heads, 2026-11-14). **Turning it off:** revert the commit. **Compatibility:** nothing changes. The page table's own contents do not change: the same windows, the same values, the same entries. The emitter's constants (`spirv_emit_context.cpp`) are untouched, so the translator's stamp is the same and no program is translated again. Saves, the options file and the vk ABI are unchanged. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`: on aa95d35f (#761, 2026-11-15), head `99131946`, without a conflict; this PR's own commits, old → new: `50128bf2` → `99131946`; the commit names elsewhere in this description are from before the rebase. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). On macOS: 532 passed, 17 skipped, and 32 failures that also fail on main 6c9edffe on this Mac, named under Testing. After the rebase onto main aa95d35f (head `99131946`): wave S1's merge `11a5b4e7`, 568/22/17 against main aa95d35f's 543/33/17, no new failure. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here.
feat(vk): log the guest pools the page table cannot reach
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 20s
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 13s
Website / Website on Cloudflare (pull_request_target) Has been skipped
3bc46da5dd
Guest memory's page table, for the pointers shaders follow, covers two windows of the guest's 512 GB: 8 GB from 64 GB and
4 GB from 508 GB. A load through a pointer into a pool outside them that no bound buffer holds reads 0, and whether the game
has such pools was never counted.

- gpu/vk/page_table_census.h (new): the two windows (moved from guest_pages_set, unchanged) and the census. Each refresh of
  the pool table names the pools that came outside the windows, the first 30, with their bytes outside when only part is;
  the summary counts all that came, their bytes outside, the most at once, what is outside now and where they lie.
- vk_memory.cpp: guest_pages_set and memory_guest_pages take the windows from the header; memory_sync refreshes the census
  with the pool table it is about to take; page_table_census_log logs the summary.
- vk_main.cpp: mkwvk_close_asked logs it at close.
- tests/test_page_table_census.py (new): the windows against the shaders' constants, the census against pool tables like
  memory_sync's, and the call sites. It fails on main.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
mooki force-pushed feat/page-table-census from 3bc46da5dd
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 20s
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 13s
Website / Website on Cloudflare (pull_request_target) Has been skipped
to 50128bf247
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
CI / Workflow lint (actionlint) (pull_request) Successful in 7s
Third-party parts / As their notes say (pull_request) Successful in 10s
PR description / Description follows the template (pull_request_target) Successful in 16s
2026-11-15 01:52:16 +00:00
Compare
mooki changed title from WIP: feat(vk): log the guest pools the page table cannot reach to feat(vk): log the guest pools the page table cannot reach 2026-11-15 04:33:18 +00:00
mooki force-pushed feat/page-table-census from 50128bf247
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
CI / Workflow lint (actionlint) (pull_request) Successful in 7s
Third-party parts / As their notes say (pull_request) Successful in 10s
PR description / Description follows the template (pull_request_target) Successful in 16s
to 44c7ebfe81
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 15s
CI / Conventional Commit title (pull_request) Successful in 13s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 37s
2026-11-15 07:14:05 +00:00
Compare
mooki force-pushed feat/page-table-census from 44c7ebfe81
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 15s
CI / Conventional Commit title (pull_request) Successful in 13s
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 20s
Third-party parts / As their notes say (pull_request) Successful in 37s
to 991319462c
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
CI / Workflow lint (actionlint) (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 6s
Third-party parts / As their notes say (pull_request) Successful in 10s
PR description / Description follows the template (pull_request_target) Successful in 4s
2026-11-15 13:05:41 +00:00
Compare
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
CI / Workflow lint (actionlint) (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 6s
Third-party parts / As their notes say (pull_request) Successful in 10s
PR description / Description follows the template (pull_request_target) Successful in 4s
This pull request has changes conflicting with the target branch.
  • gpu/vk/vk_memory.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/page-table-census:mooki-feat/page-table-census'
git switch 'mooki-feat/page-table-census'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!474
No description provided.