Memory: more than 4 memory windows once #680 lands, so title memory stops falling back to plain memory #697
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#697
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Daazd on GitHub · 2026-11-24 03:37 UTC · original
Plan for comment before any code (CONTRIBUTING "Say what you are doing"). Stacked on #680.
The limit. Translated shaders reach 4 windows of 4 GiB (
xcl_w = (hi) & 3u,emit.rs:1536); the title gets 11.5 GiB of sparse space. A retail title reserves more GPU-visible memory than that (kernelx.rs:322: a 24 GB reservation of 64 KiB pages, 2.2 GB of large pages), and the rest goes to plain memory outside every window. There its buffer views are empty V#s (real.rs:1751), vertex / index buffers are mirrored and copied every draw, up to 2 GiB of mirrors and stale after that (list_x.rs:1799-1866), and a raw pointer in a shader reads whichever windowhi & 3names.Why now. With #680 a window is a descriptor index instead of a switch case, so a fifth or sixteenth window costs a shader nothing. What's left are constants:
MAX_WINDOWS, the& 3umask and the 4 heap slots.Proposal. N windows (power of two, e.g. 16 → 64 GiB) in the heap form only: N · 4 GiB aligned to N · 4 GiB and below 2^40 (#585), windows
0..N-2sparse andN-1coherent as now,xcl_w = hi & (N-1)with N inOptionsand the cache key. The root-UAV switch form keeps 4.Before any code: measurement. On the retail title (RTX 4070 Ti SUPER): bytes reserved and committed in plain GPU-visible memory, empty V#s, mirror MB and per-draw copy bytes. If little GPU traffic lands there, I'll report that and stop. Open risks: VRAM for pages that are plain today, write-watch and upload cost over more window memory, and whether out-of-range pointers should get an empty view instead of aliasing (a
hi - base_hiindex).PR split (each stacked on #680, under ~400 lines): (1) window count as a value, no behaviour change; (2) N-window layout behind
XCL_UMA_WINDOWS=n, with layout and GPU tests at window ≥ 4; (3) on by default, with smoke runs; (4) counters inreport.json.Does this fit where you want memory to go, or would you rather the windows stay at 4?
AI use: researched and drafted with Claude Code (Claude Opus 5.5); checked by me.
@maximecmb on GitHub · 2026-11-24 10:20 UTC · original
Data point for this plan: the retail title's empty buffer views all sit in its 24 GB GPU-view reservation, and wider windows alone don't reach it, because that reservation never goes to the windows
Setup: RTX 5080 16 GB (driver 617.42, 32-lane waves), Ryzen 7 9800X3D, 64 GB, Windows 11 26300, Rust 1.100.0 MSVC, release builds, retail 1.0.2.1,
XCL_NETWORK=0,XCL_ACTIVITY=1, hand-driven into the world load.1. Where the empty V#s are. #956 counts the views that get an empty V# and the resources unified memory had no room for. A local addition on top of it logs each empty buffer view's title address and size:
kernelx::mirrorscomment describes:kernelx: reservation 0x2eaa80c0000 (0x600000000 bytes, no CPU access) is the GPU view of 0x2e4a80c0000. With #631 onmainit now lands lower (the buffers are at ~0x43a6e0000), but it's still outside the windows.2. Why more windows don't change it. The pair is reserved as 64 KiB physical pages (
MEM_LARGE_PAGES | MEM_PHYSICAL), not withMEM_GRAPHICS. Sokernelx::VirtualAllocnever offers it tosparse_reserve/reserve: it goes straight togpu_visible_fallback→reserve_watched, which is plain write-watched memory recorded inGRAPHICS_RESERVATIONS. That happens with any window count.I checked this with a local stack of
main6efdabc+ #680 (its three current commits) + #822's two commits. I rebased them: inemit.rsI keptmain'shi - xcl_uma_basewindow index with its range check, and inshaders.rsI took #822's window-count block. On top of that I added #956 and the address log, and ran withXCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16:UMA: 15 sparse VRAM window(s) (60 GiB VA) + 4095 MB coherent window at 0x1000000000, yet the empty views are unchanged: 125 SRV / 129 UAV, all still "in a graphics reservation outside the windows".#101at 61.2 s, presents 0 from ~60 s (one burst at 66 s),+0x23cf683at 96.3 s.placed_title_texturesfallback test now finds its reserve-only allocation inside the windows. SoMEM_GRAPHICSreservations do move in with 16 windows; this one doesn't.So for this title, the plan here only reaches those buffers if the 64 KiB-page pair is also placed in the windows, and the GPU view stays tied to the CPU view's pages the way
mirrors::sourceties them for textures.3. Why this looks worth it. A separate GTA VI–only project, which hands any title buffer to the host GPU by copying it on first use, keeps this title presenting the world for ~100 s on the same machine, at 1–3.5 fps with 1 100–2 770 draws per frame (its own missing shaders keep the picture dark). Under XCL the frames stop ~2 s into the world. That project has no equivalent of these empty views. That's a correlation, not proof: I haven't tested a build where the pair is reachable.
Ruled out on this machine, each by a run:
Not tested: placing the 64 KiB-page pair in the windows; AMD; Linux.
AI use: Claude Code (Claude Opus 5.5) wrote the local diagnostics and the experiment builds, read the logs and wrote this comment. I ran the title on the hardware above.
@Daazd on GitHub · 2026-11-24 16:07 UTC · original
Thanks @maximecmb, this changes the plan.
Window count: #822 already covers it (
XCL_UMA_WINDOWS=8/16, stacked on #680), so I'm dropping my local window-count change and won't open a duplicate PR. What's left of this issue is the 24 GB GPU-view pair.One correction from reading
main(b7aa9f3):kernelx::VirtualAllocdoes try the windows for 64 KiB-page reservations. TheMEM_64K_PAGESbranch callsuma.sparse_reserve(size)beforegpu_visible_fallback. The pair only falls back becausesparse_reservefinds no 24 GB gap. So this is a space-and-pairing problem rather than a missing route.Proposed fix: put the CPU view in the windows, and point buffer views at it, instead of aliasing the GPU view.
PAGE_READWRITEview, which is the one the title maps physical pages into, gets reserved in the sparse windows. That needs #822's 16-window layout for the room.mirrors::reservedis then also called from theMEM_64K_PAGESsparse branch, not only afterreserve_watched. Today, if the CPU view lands in the windows, it is never recorded, so its GPU view is never paired andtitle_texturesloses the CPU view behind it (the Bink green screen would come back). The GPU view (PAGE_NOACCESS | PAGE_GRAPHICS_NOACCESS) stays where it is. It's never touched by the CPU, so it needs no window space.dev_create_cbv_xand the SRV/UAV paths that currently write an empty V# (note_buffer_view), whenvalies in a GPU view, the V# base becomesmirrors::source(va). That address is then in unified memory, so the shader reads the same pages the CPU writes. The check is the same astitle_textures::mirror_source: if the title mapped a physical page atvaitself (physical_page_at),vais kept. No second mapping and no syncing between the two views is needed, because the shader just reads the CPU view's address.Limits of this approach:
Questions:
kernelx: reservation … is the GPU view of …line still appear? If the CPU view moved into the windows there, the pairing is lost, and that could hide a Bink regression in that setup. Also, does your address log show any reads of the GPU view that don't go through a V#?AI use: Claude Code (Claude Opus 5.5) read the code on
mainand the referenced PRs and drafted this reply. Nothing here is tested yet.@CharlyRien on GitHub · 2026-11-25 05:20 UTC · original
Data for the plan above, and an answer to "any reads of the GPU view that don't go through an empty V#?": yes, most of them. In a dump of the title's view heap taken when the world starts, 65 % of the buffer V#s are non-empty and carry a GPU-view address as their base. They come from the "view of memory at an address" device methods (#70 / #71), which write the title's address as it is, so the empty-V# count misses them, and step 2 as written would too.
Setup
main9e3831emerged locally with #1288, #1448, #684, #889, #1323, #929, #640, #1326, #1327, #1329; on top, by hand and uncommitted: #1791, a local equivalent of #1405, #1803, a local readback change insparse.rs(one fence per title queue, see #1329), and local logging / dump code. Four memory windows on this tree (0x4_0000_0000–0x7_ffff_0000).XCL_UMA_SHADOW=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_GPU_WAIT_RELEASE_MS=250, warm caches; the title's own stall watchdog neutralised, compute programs of 4 MB of DXIL or more not handed to the driver;TdrDelay30 s. One run of the retail title, one frame dumped shortly after the world starts (GPU-side copy of the heap, read back before a compute dispatch).1. The first 32 768 slots of the title's view heap in that frame
0x12: 10 764,0x13: 23,0xe: 43), outside every windowSo of 16 593 non-empty buffer V#s, 10 830 point into the GPU view. None point into the title's other 64 KiB-page reservations. On this tree
dev_create_srv_at_x/dev_create_uav_at_x(device #70 / #71) writebuffer_words_at(va, …)with the title's address unchanged, which is where these come from;note_buffer_view's empty V# is a different path.2. Root views (from a second pair of runs, same tree plus #1055's map, written up on #1031): 3 700 distinct compute root-view addresses in the GPU view in the first seconds of the world, 12 918 by 200 s. Rebasing those to the CPU view's same offset is right for all but one at 100 s and wrong for 119 at 200 s, so
mirrors::sourceis a good first answer and #1055's per-page map is needed after that.3. Two readers that take a V# out of the view heap by index and end up with zeros (the heap address comes in the register after their root arguments, #1803):
For both, the registers and the translation were checked. What I have not captured is the content of the exact slots the culling records name (they are past the part of the heap I dumped), so "those are GPU-view V#s" is inferred from the 65 %, not read; and for the mesh case the slot is a zero one, which could be an empty V# or a slot XCL never wrote.
For the plan: placing the CPU view in the windows and rebasing would need to cover the by-address view methods and root views, not only the empty-V# path; and since two thirds of the title's buffer views are of this kind, I would expect it to change the picture, not just #505's stop. I can test a branch on this machine.
Not tested: any fix; 16 windows; AMD; current
main.AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the capture, the offline replay and the heap scan) did this and drafted the comment.
@CharlyRien on GitHub · 2026-11-25 05:37 UTC · original
Follow-up to my comment above, with a test that goes against my own expectation: giving every one of these by-address views a readable copy does not restart the culling on this tree.
Same tree and settings as above, plus #1055's map and a local experiment: when device #70 / #71 create a buffer view at a GPU-view address, the V# gets the address of a copy inside a sparse window, filled from the CPU view's same offset at creation and again at every present. One run, numbers at 106 – 123 s (about 20 s into the world).
The views (counted in the title, not from a dump this time)
The experiment
So these views being unreadable is real and large, but it is not, on its own, what keeps the culling empty; my "I would expect it to change the picture" above was too optimistic. What I cannot exclude: the copies were filled from the same offset in the CPU view, and I did not compare their bytes with what the page map says the console would show (the map agreed with same offset on the samples logged). Root views and raw addresses into the GPU view were not covered by this experiment.
Still not captured: the heap slots the culling records actually name. That is the next measurement here.
AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the experiment and the runs) did this and drafted the comment.
@CharlyRien on GitHub · 2026-11-25 06:30 UTC · original
A correction to the conclusion of my last comment, and the measurement I said was missing. The exact heap slots the culling reads are now captured: all of them are GPU-view V#s. And with the copies in place the first culling program does write in the title; what stays empty is further down the chain.
Same tree, settings and machine as my two comments above (the capture is from the tree without the copies; the in-title probe is from the tree with them).
1. The slots, read from a capture (one frame, 4 dispatches of the first culling program, 81 groups)
2. In the title, with the by-address copies of my last comment and a probe on that program (one run)
So "does not restart the culling" in my last comment was wrong as stated: the copies restart its first stage, and the indirect draws stay empty because of something downstream that I have not located yet (the other 4 dispatches, which use different buffers, still write nothing). The case for making the GPU view reachable is stronger than my last comment said, and same-offset rebasing is enough to get this first stage going.
Not tested / limits: the capture keeps 64 bytes of each object list on the CPU side, so the offline replay is right for the first objects of a list only; one run each; nothing downstream of the first program.
AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the capture, the replay and the runs) did this and drafted the comment.
@CharlyRien on GitHub · 2026-11-25 07:08 UTC · original
With the GPU view of the 24 GB pair made readable for buffer views and root views (by copies, as an experiment), and the two-pass mesh path on top, the retail title rasterises world geometry here for the first time: the main depth target and the G-buffer hold a character and the scene around it. The presented frame is not right yet.
Setup
main689f2dbmerged locally with #1329 (+ #1326, #1327), #1448, #1323, #889, #684, #929, #640 (ported), #1850, #765, #1982, #1405, #1464, three allocator-lifetime commits fromwondercrash/xcl(150e635,761ada5,9b70233), then #541 (6bd8f64), the rebased #724 branch at3442b58, #1887 and #1803; a local readback change insparse.rs(one fence per title queue, see #1329); local diagnostics.XCL_UMA_SHADOW=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_GPU_WAIT_RELEASE_MS=250 XCL_PAGE_BUDGET_MB=6144, warm caches; the title's own stall watchdog neutralised, compute programs of 4 MB of DXIL or more not handed to the driver;TdrDelay30 s. One clean run (numbers below), and one earlier run that a local memory guard ended at 117 s after its frame was logged (consistent numbers).Measured, about 15 s into the world
DispatchMeshwith groups. Before, the indirect ones had 0 groups, because the culling that fills their argument records wrote nothing.What this does and does not show
For the plan above: rebasing GPU-view addresses to a CPU view placed in the windows (for the by-address views and root views too), or real aliasing, should give the same result without the copies. I can test such a branch here.
Not tested: any of this without #541 / #724; AMD; current
main; more than these two runs.AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the ports and the runs) did this and drafted the comment.
@ettehn on GitHub · 2026-11-25 07:44 UTC · original · edited 2026-11-25 07:51 UTC
Synthetic mesh readback for GPU-view rebasing. I combined #2092 (
47c7cc1), #1803 (cb00751, with its heap-base packing wired into the two-pass path), and #1055 (f532d33). The mesh compute pass reads a V# from the heap throughs23. The test resolves backing addresses with #1055 and explicitly writes the descriptor between completed dispatches.64 KiB - 16in a view backed by pool pages 0 and 2. I filled pool page 1 with decoys. Rebasing to the first resolved address read one correct vertex and two decoys. Gathering the two mapped spans in view order into a contiguous read-only buffer read all three correctly.RTX 5070 Ti Laptop, driver 32.0.16.2124, Windows 11 25H2 (26200.9974), Ryzen 9 8945HX, Rust 1.97.1 MSVC, DXC 1.8.2502.11. With
XCL_ADAPTER=nvidia XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=0,cargo test --locked --offline -j 2 -p xcl --lib gpu_mesh_mode -- --nocapture --test-threads=1ran 2 passed, 0 failed, 0 skipped. This is a synthetic SRV readback. Retail frequency, in-flight mapping changes, UAV writes, and performance were outside the test.Test implementation and verification assisted by OpenAI Codex (GPT-6).
Reserved-buffer alias follow-up. On the same RTX 5070 Ti Laptop, a 5-tile D3D12 reserved buffer exposed pool tiles
0, 2as one logical range and0, 1, 2at separate offsets. The initial cross-boundary read returned11, 22. A single-thread compute shader then wrote33, 44via a root UAV across the alias boundary. The original offsets read back33, 99, 44, with the intervening decoy tile unchanged. After the first queue fence completed, I changed alias tile 1 to pool tile 1 withUpdateTileMappings. The next submission read back33, 99from the same alias range.cargo test --locked --offline -j 2 -p xcl --lib gpu_reserved_buffer_alias_spans_noncontiguous_tiles -- --nocapture --test-threads=1withXCL_ADAPTER=nvidiaran 1 passed, 0 failed, 0 skipped. This checks D3D12 tile aliasing and ordered remap in isolation. XCL runtime integration, overlapping cross-queue use, and a retail title are still untested. Verification assisted by OpenAI Codex (GPT-6).@claudetools-gh on GitHub · 2026-11-25 14:42 UTC · original
@CharlyRien @adiologydev a question about the shader side of this, and a data point: with the mesh stack and the #2308 stack on, the title gets into its 3D intro here and runs the mesh work, but the presented frame has only the 2D layers (titles, subtitles). #2308's description says shaders still can't read the GPU view outside the memory windows, so I take it that is the missing piece. Is anyone writing it, and in which form?
Setup: RTX 5070 Ti 16 GB, Ryzen 7 9700X, 62 GB, Windows 11 26300, release. #2057 +
mainafc5ee8+ #2092 / #541 / #1803 / #1887 (+ heap addresses passed to both two-pass stages, as in the #2092 comments) + #2270 + #2306 + #2293 / #2294 / #2307 / #1055 / #2308.XCL_PAGE_ALIAS=1 XCL_TEXTURE_LEVEL_PAGES=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=0 XCL_WATCH_HOT=0 XCL_PSO_WAIT_MS=50 XCL_NETWORK=0. One run.queue CopyPageMappingsBatchX: … pages mapped so far: 1023 showing a physical pageby 7 s, so the GPU view's pages are being mapped for real.two-pass DispatchMeshandtwo-pass ExecuteIndirectcalls logged, no mesh pipeline refused in the AS slot.XCL_FRAME_DUMP) are dark with the intro's text, as on screen.I'm adding a local probe of the large depth / colour targets at the dumped frames, to see whether geometry reaches them as in CharlyRien's experiment above, and will post what it shows. If the GPU-view rebasing (by-address views and root views into the windows) is being written somewhere, I'd be glad to test it on this card.
AI-assisted.
@CharlyRien on GitHub · 2026-11-25 14:56 UTC · original
@claudetools-gh short answer: not a clean rebasing from me. What I run is a local workaround by copies, and today's measurements say it is necessary but not yet enough. On #505 MacieGx wrote that he maps that range as extra memory windows filled on demand and that a PR will follow (#505); I have not seen it yet, so that is probably the form to wait for.
Setup for everything below: RTX 3090 24 GB (driver 616.56), Ryzen 9 5950X, 32 GB, Windows 11 22631, release, HLSL path. Tree:
main689f2db+ #1329, #1448, #1323, #889, #684, #929, #640, #1850, #765, #541, #724 (rebased,3442b58), #1887, #1803, #1982, #1405, #1464, #1989 (197b104), #2229 (039a363), plus local changes (the copies described here, a depth-twin copy at each use, a frame capture).XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_NETWORK=0 XCL_PAGE_BUDGET_MB=2048. Not #1055 / #1102, which matters for point 4.What put geometry in the targets in my comment above: a readable copy, inside the memory windows, of every buffer the title makes a by-address view of (device methods #70 / #71) when its address is in the GPU view, with the descriptor rewritten to point at the copy, refreshed at each present; the same for root views. Capped at 500 MB here, because the title makes such views of about 1 030 MB and the machine is short of memory.
Measured today, off the game: I captured the two-pass mesh draws of one world frame (489 draws, 177 with groups) with everything they read, and replay them through XCL's own translation; the replay gives the game's depth on 98.6 % of the words it changes and the same vertex and primitive counts for every record. In the game, with the cap, 92 of the 168 draws that have groups (another frame) write one vertex and one primitive per record, and all 92 have one buffer of their mesh table in the GPU view without a copy. Replaying with only the buffers those tables name made readable (350 buffers, 2 MB for the frame) gives real meshlets for all 92, for example 4 vertices → 456 and 8 → 1 016.
So a cheaper form than a blanket copy exists: at the bind of each two-pass stage, look at the table entries the stage really uses (the per-stage used-resource table of the container, #2217), and give a copy to those that are buffer descriptors pointing into a GPU view. In the title that was 65 536 copies over a 160 s run, 2 to 9 MB a frame, none refused. It is not enough: in the replay one draw still covers 3.1 M texels with those buffers readable, and in the title the depth target of some frames is one screen-sized surface. Some other input of the mesh programs is still read as zero; I have not found which.
Textures: of the 170 block-compressed textures the pixel shaders of those draws name through their material records, 167 are all zero on the GPU, 154 of them never evicted. Their title address is in the GPU view and in this tree the CPU view of those pages is not readable, so XCL has nothing to upload. Your tree has the page-mapping PRs, so your probe of the targets should tell whether that part is solved there.
If the copies of points 1 and 3 are useful to you as a stopgap, say so and I will cut them out as a patch. They are local, tangled with the capture code, and not PR quality.
AI use: Claude Code (Claude Fable 5.2 coordinating; Claude Fable 5.2 and Opus 5.5 agents wrote the copies, the capture and the replay and ran them). I looked at the depth images of the in-title run and checked the replay's summary lines; the per-draw numbers are from the agents' notes.
@claudetools-gh on GitHub · 2026-11-25 15:01 UTC · original
Follow-up to my question above, with the target probe I mentioned: on this tree the world draws are recorded, but nothing reaches the main depth target or the G-buffer. So the 3D is lost before rasterisation, not between the G-buffer and the present, unlike in CharlyRien's experiment with the readable copies.
Same machine, tree and settings as above, plus
XCL_DIRECT_SPLIT_INSTRUCTIONS=0and a local probe (XCL_TARGET_PROBE=1): at each dumped frame it copies the largest render / depth targets used that frame back to the CPU, samples every 8th pixel, and logs how many draws had the target bound and how many samples differ from its last clear value. One run; the frame below is in the 3D intro, ~159 s in, ~2 fps at that point.So 254 draws (mesh and indirect included) with the depth target bound leave it at its clear value of 0 everywhere, and the G-buffer target likewise. That is the "(1, 1) records" state you described before the GPU view was made readable: the culling and mesh programs run on inputs they can't see, emit nothing, and only the 2D layers reach the 4K composite. It points at the shader-side reads of the GPU view (by-address views and root views outside the windows) as the remaining piece, rather than at anything after the G-buffer.
A side effect that may matter for frame rate: in the same stretch the GPU is busy almost all the time (≈1.8–2.2 s of GPU time per 2 s, from
XCL_GPU_PROFILE), and most of it is a few small compute programs with very long single dispatches:24de2aef6c31d55e(32 threads, ~63 500 groups, up to 158 ms a call),b78fa10b425b8e54(up to 355 ms for one 160×90 dispatch; one of the two programs refused in the #675 / #505 reports),1b5466f261a70cde(226–245 ms),d79af1d04922a49b(up to 119 ms for 2–4 groups). If their loop counts or indices also come from memory the shaders can't see, they may be iterating over garbage, as in thea542b07e605c8fd7timing on #1452. I haven't checked their code yet.AI-assisted.
@GreemSC on GitHub · 2026-11-25 15:14 UTC · original
@claudetools-gh on "in which form", for @CharlyRien and @adiologydev too: the VIctory forks that now draw a lit, textured world (Belobug on an RX 9070 XT, DexNom on an RX 7900 XTX, ~3–4 fps per PortWatch; Belobug's README still says "not playable yet") read title memory from shaders in two ways. Their own docs and commits, not reproduced here; GPL-3.0, so ideas only, no code:
8dd30ab).Fixes on the same line that match the symptom here:
a26859f).AI use: Claude Code (Claude Opus 5.5) read the forks' docs and commits and wrote this; nothing here was run on XCL.
@claudetools-gh on GitHub · 2026-11-25 16:41 UTC · original
Follow-up to my probe result above: with the title's by-address buffer views that point into the GPU view redirected to UMA copies, world geometry reaches the depth target and the G-buffer here for the first time. Partial (9 % of the samples), but the cause is confirmed on this card and tree.
Same machine, tree and settings as above, plus two local switches (an experiment, not a design):
XCL_GPUVIEW_TRACE=1: counts #70 / #71 buffer views and root views by where their address points. By ~170 s: 13 530 buffer views in a GPU view, 0 in the alias space, 0 elsewhere (15 860 inside UMA); root views 0 outside (4 485 inside). So on this title it is the #70 / #71 views, not root views.XCL_GPUVIEW_MIRROR=1: at #70 / #71, a view whose address is in a GPU view gets a copy inside UMA (64 KiB-aligned, the view's size, capped at 64 MiB), filled page by page from the CPU-side bytes (mirrors::mapped_source, elsemirrors::source), and the V# gets the copy's address. Read-only copies are refreshed before each submit (changed 4 KiB blocks only); a UAV copy is filled once. Copies are reused when a range fits inside one. By ~170 s: 1 528 copies, 159 MB, 12 002 reuses, 221 overlapping another, 0 failed.The probe at an intro frame (~545 s; the title is slow there, under 1 fps):
On screen the frame changed from flat grey to a pale, blown-out teal image with shapes in it, which matches what @MacieGx described for an under-lit world with auto-exposure at its floor.
Known gaps of this experiment, which may explain the 9 %: overlapping ranges get separate copies; addresses stored inside buffers are not rewritten; UAV copies are never written back or refilled; views over 64 MiB are cut; texture views made by #70 / #71 are not covered. A proper form is what @MacieGx described (the GPU view as extra windows filled on demand) or a per-64 KiB directory the shaders resolve through; I'll keep this as a local stopgap until one of those lands, and am glad to test it.
AI-assisted.