D3D12.X: XCL_VIEW_MEM=1 maps the title's GPU-view memory into heap windows 4..15 #3097
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3097"
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?
Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-28T05:07:31Z.
Stacked on #3096 (no longer on #1055, see below): only the top four commits belong here (the first and second are @MacieGx's, the third and fourth are review fixes).
A retail title gives the GPU addresses in its "GPU view" of its memory, outside the unified block. That view is a reservation with no CPU access, paired with a CPU reservation of the same size (
kernelx::mirrors). Translated shaders read 0 there. That covers the title's streamed geometry (meshlet, index and vertex buffers) and other buffers it reads through V#s and root addresses.With
XCL_VIEW_MEM=1, the heap's window slots 4..15 become reserved buffers. Their 64 KiB tiles are mapped and filled on demand with the title's bytes, before each draw or dispatch that names them. The switch is off by default and needsXCL_HEAP_WINDOWS=1and the default 4-window unified block. This is @MacieGx's view memory, ported from his tree ontomain, opt-in here.How it differs from the other PRs on GPU-view memory
CopyPageMappingsBatchX.mainnow keeps that record itself (#1031,kernelx::mirrors), so this PR no longer carries #1055's commit:view_mem::sourcereadsmain's record throughmirrors::shows(the page put there, nothing for an unmapped page, else the CPU view behind the GPU view).main's own view windows in the 16-window layout (view_want.rs,sparse::map_mirror,Uma::is_view) also give shaders the GPU-view memory. This PR works only with the 4-window block (XCL_UMA_WINDOWSunset) andXCL_HEAP_WINDOWS=1. The two have not been compared.What is in it
First commit (@MacieGx's view memory):
crates/xcl/src/hle/d3d12x/view_mem.rs(new):XCL_VIEW_POOL_MB(3072 by default) caps the total.ensure(va, len)maps and copies the tiles of a range that are new or whose signature changed (checked at most once a second), then waits for the copy.ensure_for_drawcovers the ranges a draw names:XCL_VIEW_TABLE_SLOTS);XCL_VIEW_ROOT_KB= 1024 KiB each.view memory:line in the activity log.real.rs(open_uma): with heap windows and a 4-window block, the view windows follow the unified ones in the heap.bind.rs:ensure_for_drawinbind_abi_with_root_resolved, for every draw and dispatch. On currentmainthis function was restructured; the call was placed again by hand.sparse.rs: the lock-order check.host.rs: the stats line.Second commit (@MacieGx's follow-ups from his tree):
XCL_VIEW_POOL_MBis reached, tiles no draw has named for 6 s give their pool tile back (mapped NULL first, at most one round a second), instead of every further range reading 0 for the rest of the run.title_textures::copy_committed_region(ReadProcessMemory; an unreadable page reads 0) instead of a plain copy: a page decommitted between the check and the copy ended a run.Third commit (fixes from an independent review of this PR):
Reset/Close/Signal, or an upload not done within 5 s, used to leave tiles marked current that were never copied; now they are tried again. An unfinished upload keeps the allocator and the staging buffer out of use until its fence is reached.CreateHeapruns as XCL's own work (title_textures::own_work), not through the adopted device's hook for title heaps.ONgoes back to false whenset_window_viewsfails, and the state's lock survives a panic under it.Fourth commit (a point from @andrewDoing's checks below): a V#, a root address or a range that starts below window 4 and reaches into it was dropped whole; it is now clipped to the view windows (
clip). Tests at both ends, a range ending where the windows start, overflow.+685 / −2 in 7 files for the four commits (over the 400-line target: the module and its two follow-ups, which only make sense together): one module, and the four lines that call it.
Lock order (the reason #2384 was closed)
view_mem's state is taken only by the draw binding, which holds no other XCL lock at that point, and byopen_umaat start.sourcetakes kernelx's page-mapping record and mirror table (mirrors::shows), then the physical-page lock (physical_page_at), one at a time, each released before the next. A new pool'sCreateHeapruns as XCL's own work, so the adopted device'sCreateHeaphook does not record it as a title heap (that hook takesUMA_BUFFERandHEAP_UMA; nothing holding those calls intoview_mem).sparse::lock_stateasserts that in debug builds, throughview_mem::holding, a thread-local flag set while the state is held. The few sparse functions that lockSTATEdirectly are not reached from here and carry no assert.view_memwhile holding a lock. The only edges are therefore view_mem → kernelx, and the sparse ↔ kernelx pair of #2384 cannot close a cycle through it.Tested
773dc5bonmain7a649b0(#3096370e1c7under it; rebased 29/11, no conflict). RTX 3090 24 GB (Resizable BAR off), driver 616.56, Ryzen 9 5950X, 32 GB RAM, Windows 11 22631; Rust 1.100.0, release tests.XCL_ADAPTER=warp, so the GPU tests run on WARP or skip;XCL_REQUIRE_GPUunset; the tests that open the hardware adapter whateverXCL_ADAPTERsays left out with--skip):cargo test --release -p xcl --lib -- hle::d3d12x::view_mem hle::d3d12x::bind::tests gpu::dxil::core_tests gpu::recomp::heap_window_tests gpu::uma::tests hle::d3d12x::console_heap::tests shaders::pipeline_library::tests shaders::warm_library::tests --test-threads=4: 195 passed, 7 failed, 1 ignored; 19 of the passes are GPU tests that skipped. The 7 failures are 6shaders::pipeline_library::testsandshaders::warm_library::tests::cold_publish_makes_an_unchanged_corpus_reusable:CreateComputePipelineStatereturns E_INVALIDARG on this machine's WARP, which has no SM 6.6 (the other 6 then fail on the poisoned lock or the same error). That is a local artefact of a WARP run here, not the CI failure (an entry count, 3 against 2). The 6view_memtests passed, and #3096's tests as on its head.main7a649b0: the same 7 failures with the same errors, nothing else failed (408 passed, 7 failed, 19 ignored for the union of the filters of our five PRs).main7a649b0(no new one).b11f2ea.main's own CI failed 4shaders::pipeline_library/warm_librarytests on227d2cb(run 46201186646), which #3096 hit; onmain7a649b0it fails 8 other tests, all inhle::d3d12x::title_textures::tests(run 46261846646): a red Build and test on this head with those 8 ismain's.fe2d5b7, onmaine429936, with #30968956fb4and #1055 under it.cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 2137 passed, 9 failed, 48 ignored. The 9 are the 9 testsmaine429936itself failed on a GPU, the same names as in this report on an RTX 4080. The 7 tests ofview_mempassed.scripts/smoke.ps1, withXCL_HEAP_WINDOWS=1and withXCL_HEAP_WINDOWS=1 XCL_VIEW_MEM=1(blocks below, under the regression pair):XCL_HEAP_WINDOWS=1: no device removal, no crash, 1,806 frames, peak commit 31,366 MB; the log has "memory windows from the shared descriptor heap", so the heap-window form ran, with the null slots past window 3.XCL_HEAP_WINDOWS=1 XCL_VIEW_MEM=1: no device removal, no crash, 1,796 frames, peak commit 34,821 MB. Read from its log: the view memory was on and was reached late in the run; its last stats line (200 s) counts 14 tiles uploaded (under 1 MB, 1 pool), 35 tile checks, 1,278 tiles without a source, 0 given back, 0 dropped. Deduced: in these 200 s the title is still loading, so this run shows the switch running without harm, not what it changes in the world.fe2d5b7c: Aniseto, RTX 5070 Ti 16 GB:view_mem, "6 passed; 0 failed" (CPU-side tests). minimalhipster990, RTX 4090 24 GB: suite 2,139 passed, 7 failed on the head, 2,127 passed, 8 failed onmain("The seven head failures also failed on main."); 395 s title runs withXCL_VIEW_MEM=0/=1, both exited 0 with no removal and no crash, 1,811 / 1,868 presents, "Neither run showed a playable world in the captures."; 200 sscripts/smoke.ps1with the default settings:main1,530 frames, the head 1,456.Regression run
Not made on this head yet: the pair below is of
maine429936and the earlier headfe2d5b7, so the "PR description" check stays red until ascripts/smoke.ps1pair of this head is added. It stays a draft.Earlier pair: same machine, same title, 200 s, the same scripted A presses (
XCL_PRESS_A_AT),XCL_PREPARE=0, noXCL_*switch set (the view memory and the heap windows off), both throughmain'sscripts/smoke.ps1.main:
earlier head
fe2d5b7:main's, under CONTRIBUTING's 80 %; its peak commit is 107.4 %. Presents per 25 s:main603 / 510 / 693 / 401 / 64 / 78 / 53 / 39, the head 390 / 568 / 583 / 83 / 75 / 85 / 33 / 22; in the world (100–200 s) the head presented 215 frames andmain235.main's own 200 s runs ofe429936on this machine gave 1,908, 2,442 and 1,744 frames.main.The two runs with the switches (earlier head
fe2d5b7)XCL_HEAP_WINDOWS=1:XCL_HEAP_WINDOWS=1 XCL_VIEW_MEM=1:Not tested
view_mem::sourceovermain'smirrors::showsonly by the unit tests.main's own view windows (16-window layout).ensure_for_draw: the console list replay (console_list::close,XCL_CONSOLE_LISTS=1), and pipelines the driver refuses in the heap-window form, which are translated again in the switch form over 4 windows and read 0 in windows 4..15.Testing on other setups is welcome. So far the suite and the title runs are from one RTX 3090 (Resizable BAR off). Results from AMD and Intel GPUs, other NVIDIA generations, or Resizable BAR on would help most. The suite plus a
scripts/smoke.ps1block, as a comment here, is enough.AI use
AI use: the port of the commits onto
main(opt-in switch, the lock-order check, the tests, the move tomirrors::shows), the review fixes, the rebases, the test and title runs and this description were done with Claude Code (Claude Opus 5.5), checked by me.🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T05:26:57Z.
I checked content refresh on RTX 5070 / NVIDIA 616.92 at head
fe7a852dedc4edc7b5a764584abde3b452e4534ausing a native 64 KiB readable-source fallback tile. The production signature samples eight bytes per 256-byte interval plus the final eight bytes. The test waited 1.1 seconds betweenensurecalls to get past the documented throttle, then fenced and read back the GPU tile.0x11 / 0x220x11 / 0x220x33 / 0x220x11 / 0x220x33 / 0x440x33 / 0x44Two fresh processes produced the same result. A write outside the sampled bytes can therefore remain stale beyond the one-second recheck interval until a sampled byte also changes. This is the consequence of the sampled-signature heuristic, not a measured retail failure. The fixture did not exercise mirror registration, full draw binding, or a title workload.
AI use: OpenAI Codex with GPT-6.2 Astra built and ran the check; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T05:40:31Z.
I checked descriptor ranges at the GPU-view boundary on head
fe7a852dedc4edc7b5a764584abde3b452e4534ausing an exact-sourcebuffer_rangeharness.A 32-byte buffer descriptor starting 16 bytes below window 4 overlaps the GPU-view region by 16 bytes, but the helper returned
Nonebecause its starting address is belowlo. Controls ending exactly at the boundary, starting at it, crossing the upper boundary, and starting at the upper boundary behaved as expected for their intersections. The root-descriptor path andensurealso reject a start below window 4.This establishes range classification in the synthetic boundary case, not that a retail title supplies such a descriptor. If crossing ranges are valid for this address space, intersecting the full byte interval with the view region at each entry point would retain the overlapping portion; that needs validation against address and overflow semantics.
AI use: OpenAI Codex with GPT-6.2 Astra built and ran the probe; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T05:56:28Z.
I reran the same native RTX 5070 / NVIDIA 616.92 tile-refresh fixture from my earlier report on updated head
2c501cf6. The only fixture change was updating the expected bytes and upload counts for the revised behavior.With 1.1 seconds between calls, fenced GPU readback for offsets 16 / 256 was:
0x11 / 0x22, checked/uploaded1 / 1.0x33 / 0x22,2 / 2.0x33 / 0x44,3 / 3.On the previous head, the second phase remained
0x11 / 0x22with counts2 / 1. The focused run passed with no skips. This validates the reported single-tile readable-source case; mirror registration, full draw binding, retail impact, and full-page hashing cost were not tested.AI use: OpenAI Codex with GPT-6.2 Astra ran the retest; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-28T06:03:06Z.
@andrewDoing thank you for both checks, and for rerunning the first one.
2c501cf6, the signature now hashes the whole 64 KiB tile instead of 8 bytes in every 256. Your rerun on2c501cf6(offset-16 write reaching the GPU, 2 / 2 uploads) is the check of it. The same commit records a tile's signature only after its upload has finished, so a failed or unfinished upload is tried again. Cost on our side: 3.2 µs per tile for the hash, release build, Ryzen 9 5950X, page in cache (a tile is hashed at most once a second); a cold page was not measured.2c501cf6. Fixed inf9cfb95e: a V#, a root address and anensurerange are now clipped to the view windows (clip), so the part inside is kept. Tests for both ends, a range that ends exactly where the windows start, and overflow.scripts/smoke.ps1runs on the new head are queued on our side and will go into the description.Setup for the numbers above: RTX 3090 24 GB (Resizable BAR off), driver 616.56, Ryzen 9 5950X, 32 GB RAM, Windows 11 22631, Rust 1.100.0; head
f9cfb95eonmaine429936c, its CPU unit tests (7 ofview_memand #1055's page-mapping test) passed.AI use: Claude Code, model Claude Opus 5.5, made the two fixes, ran the tests above and wrote this reply.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T06:12:03Z.
I retested the view-window boundary from my earlier report on updated head
f9cfb95e8bffe8d706bfd37e4102de00efe93e9f, native RTX 5070 / NVIDIA 616.92, using test-only fixtures through productionensure_for_draw→ensureand sparse mapping/upload.Four fresh-process cases covered the lower and upper edges for both a 32-byte table V# and a root address (1 KiB configured). A range exactly outside the region uploaded zero tiles; a range crossing each edge by 16 bytes uploaded one. Fenced GPU readback found the two expected sentinel bytes (
0x31,0x87) in each accepted tile. All four runs passed without skips.This validates the tested crossing ranges and tile contents. The sentinel check does not prove byte-granular clipping or shader sampling, and no retail title was tested.
AI use: OpenAI Codex with GPT-6.2 Astra built and ran the checks; Codex reviewed and prepared this report.
A separate native readable-source control on the same head also passed: after decommitting a populated 64 KiB source page, fenced GPU readback returned zeros; after recommitting the same virtual address and writing
0x55/0x66, it returned both new values. The run passed without skips and the device remained healthy. It covers the readable-source fallback, not mirror registration or a retail title.Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-28T08:34:36Z.
@andrewDoing thanks for the boundary retest and the decommit control on
f9cfb95e.Since then the head moved to
fe2d5b7c: a rebase onto #3096's new head, whose only change is a test (gpu::uma::tests::expanded_heap_window_shaders_translate_and_validatenow expects the 16-slot bound). The tree differs fromf9cfb95eonly incrates/xcl/src/gpu/uma.rs, 3 lines in that test;view_memis unchanged.The description now has our suite and
scripts/smoke.ps1runs onfe2d5b7c(RTX 3090 24 GB, Resizable BAR off, driver 616.56, Ryzen 9 5950X, 32 GB RAM, Windows 11 22631). If you have the time, your fixtures onfe2d5b7c, plus the suite and a smoke block from your 5070, would add a second card.AI use: Claude Code, model Claude Opus 5.5, compared the two heads and wrote this reply.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-28T10:14:27Z.
Ran the GPU-view memory tests at
fe2d5b7con an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
All six tests matching
view_mempass, including the clipped range that starts below window 4 and reaches into it. They are CPU-side tests of the opt-inXCL_VIEW_MEM=1module; I did not enable the switch in a real session. The thread has an RTX 3090 run and RTX 5070 checks, but no desktop 5070 Ti.Not tested: a title with
XCL_VIEW_MEM=1, a paired smoke run, the full workspace suite and its nine known failures, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-28T10:26:04Z.
RTX 4090 test of #3097
On clean head
fe2d5b7cthe GPU-view windows uploaded 4,779 tiles from a retail-title checkpoint. With the feature off and on, the last captured image was loading artwork. Both 395-second runs reached their time limit with exit 0. Neither run showed a playable world in the captures.Tested
Windows 11 build 26300, Ryzen 7 5800X3D, 32 GB RAM, RTX 4090 24 GB, NVIDIA 621.40, Rust 1.99.1 MSVC, Windows SDK DXC 1.9.2602.17. Separate clean worktrees at main
e429936c10a5b8aa09470ff99dfc8c8d3d8c56fdand headfe2d5b7c28b5658a31ba59b25c40f3d905900b16. Built withcargo build --locked --workspaceand rancargo test --locked --workspace --no-fail-fast -- --test-threads=4.The seven head failures also failed on main. Six are the GPU failures listed in #3093. The seventh is
test_title_runs_and_game_folder_is_untouched(post-Wait32/64 write failed). The two debug-layer title cases printed skips because the SDK layers were unavailable. Main alone also failedfailed_restore_stops_before_importing_an_unbacked_windowduring the suite. That case passed 3/3 on each checkout when rerun alone. Optional game-data sample variables were unset.Title comparison
For both world runs I used the same PR release executable, verified copies of the same Series X save, separate initially empty XCL caches and the driver-managed NVIDIA cache. Order was off, then on, once each. Common settings included
XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=4 XCL_VIEW_POOL_MB=1024 XCL_COHERENT_MB=3990 XCL_PAGE_BUDGET_MB=1024 XCL_DIRECT_DXIL=1 XCL_PREPARE=0 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=12. A presses at 25, 30, 35, 40, 62 and 64 s. The only feature change wasXCL_VIEW_MEM=0versus1.With the switch on, XCL initialized windows 4 through 15. At 394.2 s it reported 298 MB, 4,779 resident tiles, five pools, 4,779 uploads, 5,714 checks, 3,048 source misses, zero pool-full returns and zero page-gone drops. The first logged misses had no page mapping and a CPU-view address, with no physical page reported there. These are event counters. Driver compute pipeline builds still started at 394.74 s off and 389.86 s on. The captures end at loading artwork, so there is no matched world geometry or camera response to compare here.
Regression run
Clean release builds from
cargo build --locked --release -p xcl --bin xcl. Both 200-second smoke runs used the default feature settings. Main showed 1,530 frames, head 1,456. Both exited 0 with zero removals and zero crashes. Settings and checkpoint hashes are recorded for each run.Main
PR head
AI use: OpenAI Codex (GPT-6) ran the builds and tests, prepared the replay comparisons, inspected the logs and images, and drafted this report.
Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-28T10:56:41Z.
@minimalhipster990 thanks for the suite and the smoke pair on the 4090. The head at 95 % of
mainin 200 s, with no removal and no crash, is now in the description under "Tested elsewhere", with your two 395 s runs.On reaching the world: our 200 s runs press A every 0.5 s from 4 to 100 s, then every 2 s (
XCL_PRESS_A_AT). With 6 presses up to 64 s and cold caches, your two runs may not have left the loading screens. The same happened with the switch off, so this does not come fromXCL_VIEW_MEM.If you have the time, one more pair with that press schedule and a cache warmed by a first launch would help: the
view memory:totals line of the log, with images from the world, would show whether the view windows are read there.AI use: Claude Code, model Claude Opus 5.5, read the thread and wrote this reply.
Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-28T11:44:28Z.
@CharlyRien I repeated the off/on pair on clean
fe2d5b7c28b5658a31ba59b25c40f3d905900b16with your A-button schedule and a first-launch cache. Both runs still ended on loading artwork. Most tile uploads happened after the last interval with a present.Same RTX 4090 24 GB, NVIDIA 621.40, Ryzen 7 5800X3D, 32 GB, Windows 11 build 26300 and Series X checkpoint as in my earlier report. I used the same release executable, a fresh copy of the same save and a byte-verified copy of the cache produced by the first 395 s launch (1,022 files) for each run. Both logs report at least 128 pipelines built from a previous run's driver blobs. The NVIDIA system cache remained driver-managed.
XCL_PRESS_A_ATscheduled 340 presses: every 0.5 s from 4 through 100 s, then every 2 s from 102 through 394 s. No other inputs were scripted. Both runs usedXCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=4 XCL_FRAME_DUMP=12and the remaining settings from the original pair. OnlyXCL_VIEW_MEMchanged, off first.Final totals with the switch on, verbatim:
The counter stood at 852 uploads at 148.105 s. A further 4,086 uploads were recorded with no subsequent present. Driver compute compiles were still starting at 385.686 s off and 388.454 s on. We can confirm that the title populated the view windows during this transition. Their use by geometry visible in a presented world frame remains open.
Additional attempt to capture the world. I also ran one separate pair with
XCL_PSO_WAIT_MS=50on the same executable, save, input schedule and initial cache, this time on first. With view memory on, two GPU queue waits expired after 5,000 ms at 189.226 s. Both hadrecorded=0x67a, submitted=0x0, completed=0x0. XCL stopped with0x80004005and reported no graph-proven cycle. With view memory off, the run reached 395 s and 1,769 presents, exit 0. The eight sampled frames from 1679 through 1763 had byte-identical RGB pixels and showed a flat dark field with black bars. This separate pair produced no identifiable world image either. A single timeout with this extra setting is insufficient to attribute it to the view windows.AI use: OpenAI Codex (GPT-6) ran the tests, checked the logs and sampled images, and drafted this reply.
Imported from ivall/xcl. Originally posted by minimalhipster990 on 2026-11-28T13:14:04Z.
Follow-up on the three courtyard pipelines. With the indirect route from #2092 ported onto the same local #3097 configuration, 4 of 13,791 verified commands carried nonzero work. The GPU argument buffers contained 3,140 compute groups and 7,253 mesh groups. The other 13,787 already had zero X at the GPU rewrite input. All eight fenced RT0 readbacks still matched the skip-path control byte-for-byte (all zero RGBA). Per-shader counts, readback method and coverage on #2092
Selective mesh-slot comparison. On the RTX 4090 (621.40), I ran the same local release executable based on
fe2d5b7c28b5658a31ba59b25c40f3d905900b16twice for 395 s. Both runs used view windows, the 64 KiB BC1 prototype, the same save, first-launch cache and A schedule. A switch moved just the three MS/PS pairs identified in the six-target courtyard pass from the AS subobject to the MS subobject. With the original slot all seven title pipeline creation calls returnedE_INVALIDARG. With the move all seven returnedS_OK, and all three pairs produced native two-pass pipelines. The stock #3097ExecuteIndirectpath then skipped at least 16,384 calls whose resolved native pipeline matched the probe. The counter logs powers of two. Skip in this headI sampled the title's own
CopyResourcefrom the first 2560×1440 colour target of the six-RT pass. In each run, all eight fence-verified copies (ordinals 1, 2, 3, 4, 8, 16, 32, 64) contained RGBA 0/0/0/0 at every pixel. Each readback buffer was prefilled and checked with a nonzero value before submission. Seven post-gap samples per run still showed loading artwork. The original-slot run showed 1,792 frames and the moved-slot run 1,867. Both exited 0 with no logged device removal. A controlled test of two-pass indirect execution is the next step for these shader pairs. Related implementation in #2092cargo build --locked --release --target-dir target-verified -p xcl --bin xcl, twoxcl run <title>replays. With the selective switch enabled,cargo test --locked --release --target-dir target-verified -p xcl --test d3d12_mesh_stream -- --test-threads=1 --nocapturepassed 3, failed 0, ignored 0, skipped 0. OpenAI Codex (GPT-6) wrote the local probes, ran the comparison and checked the readbacks.What reaches PresentX after the BC1 pause. I repeated the 395 s run on the RTX 4090 (driver 621.40) with a local diagnostic build of
fe2d5b7c28b5658a31ba59b25c40f3d905900b16, the 64 KiB BC1 prototype, view windows on, the same first-launch cache, save and 340 A presses. The run showed 1,799 frames from 1,799 PresentX calls and exited 0 with no logged device removal.I copied the title's single 3840×2160 RGBA8 plane and the swap-chain buffer on the same queue after the presenter's copy, then compared every texel after the fence. Zero differing RGBA pixels in all nine pairs, including two full-colour loading controls. The 26.975 s gap ended at frame 1630. Across seven samples (offsets 0, 1, 2, 5, 15, 40, 80), four planes were nearly black (max RGB 2/2/2) and three were dark green (34/80/2). Both patterns match the earlier loading illustration at frame 1523 when contrast is expanded (cropped 64×36 grid correlations 0.936 and 0.938). The title was already supplying these images before the swap-chain copy. World visibility is still unverified.
Three MS/PS pairs from the six-target courtyard pass on #3094 also reached the MS-in-AS-slot refusal on this #3097 build. I matched both shader hashes and the ordered RT formats
[29,28,28,28,34,28]. The capture on6396870eclassified 38, 324 and 48 type-10 indirect operations asranfor those pairs. The first pair was MS6ee2afb0a844e6c0/ PS4e0489f05beae4fa, stream index 22539. On #3097 the probes observedE_INVALIDARGduring the cached-only translation attempt for all three. Their contribution to the final image still needs a controlled replay. Courtyard capture on #3094 · MS-in-AS-slot return on this headBuilt with
cargo build --locked --release -p xcl --bin xcl. Onexcl run <title>replay. OpenAI Codex (GPT-6) added the local probes, ran the replay and verified the pixels and capture records.Follow-up on the BC1 readbacks. On the RTX 4090 I tested a local prototype based on
fe2d5b7c28b5658a31ba59b25c40f3d905900b16. I ran the same release executable twice with views on, the same save, first-launch cache, A schedule and 395 s limit. On the three BC1 textures only, I varied the maximum write size from 4 to 64 KiB. A block ends at the first unchanged page or the end of the currently writable region.VirtualQueryandWriteProcessMemoryFor each run I read all 51,437,568 destination bytes back and compared them with the expected texture layout. All matched. Both runs exited 0. With 4 KiB writes the seven post-gap RGB samples had channel values of 0 or 1 out of 255. With 64 KiB writes all 13 samples were fully black. One replay per setting.
I also ran
cargo test --locked --release -p xcl --lib block_fixture_ -- --test-threads=1 --nocaptureat each cap. Two passed per setting, zero failed or skipped. The native D3D12 fence had already reached 9. The title continued to see 3 after a simulated short copy, after making a page read-only and after decommitting it between polls. After recommit and retry, all 131,072 bytes matched and the title saw 9. The second fixture checked unaligned edges and an unchanged page containing newer destination data. OpenAI Codex (GPT-6) wrote the local prototype and fixtures, ran the comparison and prepared this update.@CharlyRien, the 4090 reached presentation again with the view windows active. Removing view-pool pressure still left a flat final image. I followed up on the 5 s queue timeout on clean
fe2d5b7c28b5658a31ba59b25c40f3d905900b16(Series X profile, RTX 4090, NVIDIA 621.40). The same first-launch cache, save, A schedule andXCL_PSO_WAIT_MS=50were used throughout.I changed
XCL_GPU_WAIT_TIMEOUT_MSfrom 5000 to 120000, then comparedXCL_VIEW_POOL_MB=1024with the PR default of 3072. One run per setting, 395 s each, both exit 0 with no logged device removal.Presentation resumed after a roughly 78 s gap in both runs. The post-gap images were byte-identical within each run. The tint differed between runs, and the center 896×420 pixels varied by at most one 8-bit step per channel within either image. No world geometry was identifiable at either pool size.
After averaging the center crop to 64×36 and stretching its contrast, the faint spatial pattern matches the earlier loading illustration (figure beside a car). The best brightness correlations against the saved loading samples were 0.799 at 1 GiB and 0.953 at 3 GiB. The thread-sampling replay independently retained the same illustration in frame 1691 (0.982).
Where the queue was waiting. A further 1 GiB run with
XCL_THREAD_DUMP_ATfound two Wait64 cells at 190 and 215 s withrecorded=0x69a,submitted=completed=0and the producing lists still unexecuted. At 240 s both cells showedmemory=submitted=completed=0x69fon producer queue q3, with no armed wait and CPU-signaled value zero. At 155 and 175 s a title thread recording a texture copy was waiting fortitle_textures::TEXTURESincapture_gpu_write. In both samples the fence worker was inwrite_changed_pageswhile holding that mutex. The original 5 s timeout dump also had the queue-submission thread waiting on this mutex inprepare_downloads. These samples identified the mutex to time in the follow-up below. Readback publication on this headTiming the readback. I added local timers to release
fe2d5b7cand ranxcl.exe run <title>for another 395 s per setting on the same 4090, with the same save, first-launch cache and A schedule. The pool was 1 GiB, the PSO wait 50 ms and the GPU timeout 120 s. OnlyXCL_VIEW_MEMchanged between the two instrumented runs.publish_downloadheldTEXTURESIn each gap, three distinct BC1 UNORM textures accounted for nearly all the hold time. For each texture all 4,186 pages changed and were written successfully (17,145,856 bytes). With views on, the three holds lasted 42.83, 38.99 and 35.65 s. A recording thread waited 42.10 s in
capture_gpu_writeduring the first, and the submitting thread waited 38.96 s inprepare_downloadsduring the second. The probes timed the page loop as a whole and logged caller waits of 1 ms or more after the mutex was released. Overlapping waits count once.Both runs exited 0. The 6 post-gap RGB samples with views on and the 8 with views off were identical within each run and still showed faint loading artwork. This locates a CPU-side stall with either setting. The clean and instrumented runs had different gap lengths. The timing does not establish what causes the dark output.
Per-page timing on the three BC1 textures. I repeated the 395 s pair on a second local release build of the same head, views off first. This time I timed every native call on those textures. Each run made 12,558 calls to each API and successfully wrote 51,437,568 bytes.
VirtualQueryWriteProcessMemoryEach API took about half the loop time in both runs. In all 12,555 adjacent page pairs per run, the previous query already covered the next page and the new query confirmed the same region end, allocation base, state, protection and type. A 4 KiB versus 64 KiB comparison could test whether fewer queries and writes help, with partial-write, remap and fence-completion checks. Both runs exited 0. The five post-gap RGB samples with views on and seven with views off again showed faint loading artwork.
AI use: OpenAI Codex (GPT-6) instrumented the local builds, ran the tests, checked the timings and frame pixels, resolved the earlier XCL stacks against the release PDB, and drafted this report.
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-28T20:14:44Z.
Test report for
fe2d5b7c(this PR's head, which includes #3096) againstmainb937fbab, from a second machine as asked: RTX 3060 12 GB (driver 581.80), i9-14900KF, 64 GB RAM, Windows 11 26200, release builds. Same title (a newer retail game), 300 s,XCL_PREPARE=0on both (with preparation on,mainand this head both stopped in preparation here today; the cause is driver out-of-memory refusals in the preparation workers, not this PR),XCL_ADAPTER=3060,XCL_PIPELINE_THREADS=8.That's 100.2 % of
main's frames and 98.9 % of its peak commit, no device removal or crash on either. Peak commit swings between ~17 and ~37 GB from run to run on this machine depending on the cache state, so only same-state pairs like this one compare.Not tested: default heap windows only (no
XCL_HEAP_WINDOWS/XCL_UMA_WINDOWS), so the 16-window setup this PR targets was not exercised; runs with shader preparation; the whole suite; AMD; runs longer than 300 s.AI use: Claude Code (Claude Opus 5.5) built both commits, ran the smoke runs and wrote this report.
Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-28T23:26:57Z.
Rebased on
main7db2f39(after #3203), on #3096's new head03580be; headb11f2ea. Tests (cargo test --release -p xcl --lib,XCL_REQUIRE_GPU=mesh, #3096's modules plusview_memandkernelx): 118 passed, 0 failed, the 6view_memtests among them. The compiler warnings are the same 18 asmain's.What changed in the rebase:
mainnow recordsCopyPageMappingsBatchXitself (#1031,kernelx::mirrors), so #1055's commit is dropped.view_mem::sourcereadsmain's record throughmirrors::shows(the page put there, nothing for an unmapped page, else the CPU view behind the GPU view, as before).bind.rsandhost.rswere restructured onmain: theensure_for_drawcall and the stats line were placed again by hand. A test'sLayoutliteral takesmain's two new fields by default.mainnow also has view windows of its own in the 16-window layout (view_want.rs,sparse::map_mirror). This PR still works only with the 4-window block (XCL_UMA_WINDOWSunset) andXCL_HEAP_WINDOWS=1. We have not compared the two.fe2d5b7c, before this rebase.For comparison,
main7db2f39itself, run with these filters and those of our other PRs, same setting, has 7 failures, all skips thatXCL_REQUIRE_GPU=meshturns into failures on this card: sixlower_dxil::tests::*_on_the_gpu("…, wave64: no wave64") andbind::tests::two_pass_binds_set_the_shared_view_heap("no heap windows").The branch merges with
main227d2cbwithout conflict (not tested there).Setup: RTX 3090 24 GB (Resizable BAR off), driver 616.56, Ryzen 9 5950X, 32 GB RAM, Windows 11 22631, Rust 1.100.0, release tests,
XCL_REQUIRE_GPU=mesh.AI use: Claude Code with Claude Opus 5.5 did the rebase and the port to
mirrors::shows, ran the tests and wrote this. The person running these tests asked for it.Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-29T13:57:35Z.
Rebased on
main7a649b0; head773dc5b(no conflict). Measured, CPU only (cargo test --release -p xcl --lib, #3096's and this PR's modules + the library tests): 195 passed, 7 failed (19 skipped GPU tests); the 6view_memtests passed. The 7 failures are the 6shaders::pipeline_library::testsandwarm_library::tests::cold_publish_makes_an_unchanged_corpus_reusable, the same 7 with the same errors onmain7a649b0here: E_INVALIDARG fromCreateComputePipelineStateon this machine's WARP (no SM 6.6). Deduced: a local artefact of WARP here, not the CI failure mode. No GPU run on the card, no title run.Read, CI: the 4
pipeline_library/warm_libraryfailures of our previous CI runs weremain's own on227d2cb(run 46201186646) and passed onmainsincefa20459;main7a649b0now fails 8hle::d3d12x::title_textures::testsin CI (run 46261846646), so a red Build and test with those 8 ismain's. "PR description" stays red only for thexcl-smokepair of the new head, which needs a title run (not made: CPU only this time).Description refreshed (Tested, Regression run, AI use). The body now says it is no longer stacked on #1055 (
mainkeeps the page record itself, #1031) and namesmain's own view windows (16-window layout), not compared with this.Stack: RTX 3090 24 GB (Resizable BAR off), driver 616.56, Ryzen 9 5950X, 32 GB RAM, Windows 11 22631; Rust 1.100.0, release tests,
XCL_ADAPTER=warp,XCL_REQUIRE_GPUunset.AI use: rebase, test runs and this comment done with Claude Code (Claude Opus 5.5), checked by me.
Pull request closed