D3D12.X: title texture reads outside the coherent window use the safe copy #751

Open
github-bot wants to merge 1 commit from github-bot/gh-751 into main AGit
Owner

@⁠grahamster2 on GitHub · 2026-11-24 04:36 UTC · original
grahamster2:title-bytes-decommit-race → main · +196 −36 · 1 files · 1 commits · open

Since #602, the unchanged-content hash and the detile of title textures read the title's memory in place whenever gpu::shader::readable passes. That bypasses the ReadProcessMemory copy #484 gave read_committed: the title can decommit or unmap those pages from another thread at any moment, and the hash or detile then faults with 0xC0000005. @⁠chadatouille spotted this on #484. @⁠Dukiverse confirmed it independently in a retail title: on main dd2ae9a the fault is in tiling::Chain::detile_level ← title_textures::subresources on a subresources_on worker. Dukiverse also posted a local fix along the same lines; this version adds the regression test and reuses the read buffer.

What is in it
Rebased onto main cbc296a (head 59f8e7c). The only conflict was in the tests. #1986's 32 MiB / 256-item upload batch caps (batch_fits and its test) are kept as they are. #1990's 3D textures with packed mip tails go through subresources, so they are read through with_title_bytes too.

  • D3D12.X: title texture reads outside the coherent window use the safe copy (crates/xcl/src/hle/d3d12x/title_textures.rs):
    • with_title_bytes(at, len, f) replaces title_bytes. A range inside the coherent committed window is still read in place: XCL's VirtualFree never decommits that window, and MEM_DECOMMIT there zeroes in place.
    • Everything else goes through read_committed's safe copy into a buffer reused per thread, so there is no new allocation and page faults per texture. A buffer that grew past 64 MiB is let go after the read. The scoped workers of a parallel batch detile still get a buffer per batch. Since #1986 a batch is capped at 32 MiB and 256 textures, which bounds those buffers too.
    • read_committed_into writes every byte (copied, or zero where a page can't be read), so the reused buffer needs no memset and nothing from an earlier read shows through a hole.
    • read_committed_into copies the whole range with one ReadProcessMemory first. It walks region by region with VirtualQuery only when that copy is refused (a page not committed, no-access or guard). The walk was most of the copy's cost: VirtualQuery scans from the page asked about to the end of its run of like pages, and the title's memory is a few runs of hundreds of MiB. ReadProcessMemory on a guard page fails and leaves the guard in place.
    • The frame-trace sampler had the same in-place read and goes through it too.
    • Tests:
      • title_bytes_survive_concurrent_decommit: hashes 1 MiB 2,000 times while another thread decommits and recommits its 64 KiB pages. It asserts that every decommit and recommit succeeds and that decommits happened during the hashing. Each 4 KiB holds its own value, and every read must hold those values or zeros.
      • title_bytes_leave_guard_pages_alone: a guard page and a no-access page read as zeros, and the guard is still set afterwards.
      • title_bytes_are_copied_outside_the_coherent_window: same bytes as read_committed, holes zero, no stale bytes from a longer read, the 64 MiB cap, and the coherent window read in place. It replaces title_bytes_are_used_in_place_when_all_are_readable, whose behaviour this removes.

Tested

  • NVIDIA GeForce RTX 3080 10 GB (driver 32.0.16.1088), AMD Ryzen 5 7600X, 32 GB, Windows 11 26200; tests in debug unless noted, the retail title in release.
  • title_bytes_survive_concurrent_decommit:
    • with the old in-place title_bytes behind a local shim (not committed): 3 of 3 runs end in STATUS_ACCESS_VIOLATION;
    • on this change: 5 of 5 pass (cargo test --release -p xcl --lib title_bytes, at 4e101fc).
  • cargo build --workspace: no warnings.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 59f8e7c: 1154 passed, 2 failed, 46 ignored. The two failures are timing tests this change does not touch, frame::tests::origin_events_issue_tokens_and_flips_have_statistics and pso_async::used_tests::a_bind_waits_for_a_slow_pipeline_no_longer_than_its_budget ("waited 460.8 ms"). Both pass when run alone on 59f8e7c (cargo test -p xcl --lib <name> -- --exact). The three new tests and batch_fits_caps_items_bytes_and_device pass.
  • Before the rebase, on 1a480bc: 703 passed, 0 failed, 41 ignored.
  • The copy's cost: release microbenchmark, 7600X, not committed, measured before the rebase (the rebase does not change read_committed_into); a 16 KiB / 256 KiB / 4 MiB read of fully committed memory. The microsecond figures quoted in review came from a 9800X3D; these were measured on the 7600X.
region the bytes lie in 4e101fc (walk first) 1a480bc (one copy first) memcpy, for scale
64 MiB 128 / 125 / 280 µs 1.3 / 6.9 / 156 µs 0.1 / 3.4 / 140 µs
512 MiB 1629 / 1179 / 1753 µs 1.4 / 7.5 / 128 µs 0.1 / 3.4 / 140 µs

A range with holes pays one refused copy on top of the walk: 4 MiB with one 4 KiB hole went from 158 to 230 µs. With every other 64 KiB page missing it is ~150 µs either way.

  • SKIPPED on 59f8e7c: every wave64 variant in gpu::recomp::lower::tests, lower_dxil::tests and recomp::tests ("no wave64"); three lower_dxil f16 / f32-conversion per-lane forms refused (V_MUL_F16, V_PK_MUL_F16 VOP3 modifiers, V_CVT_F16_F32, #1426); heap_window_out_of_memory_falls_back_to_the_switch_form ("no heap windows").
  • The retail title, before the rebase: 2 streaming runs per build (180 s, A pressed through the menus, caches warmed first; main f4ce27c vs the change on it), presents per second over fixed windows:
main, run 1 / 2 this PR, run 1 / 2
intro video (4–16 s) 22.8 / 22.2 22.2 / 22.2
menus and loading (16–44 s) 28.9 / 28.9 28.9 / 28.7
while streaming (44–84 s) 5.7 / 4.5 5.5 / 5.6
peak commit 30.2 / 29.0 GB 29.9 / 30.1 GB

Both builds then stop at the title's watchdog (#232). One main run ended earlier on a device hang (0x887A0006, 63 s). The decommit crash is intermittent, so these runs don't show it either way.

Regression run
main:

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: NVIDIA GeForce RTX 3080
title: 5d6132ca
seconds: 60
exit: 0x0
frames shown: 1463 (PresentX 1463)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15274 MB

PR:

xcl-smoke v1
commit: 59f8e7c992dda0044d18a660aad86fae1d94185f
gpu: NVIDIA GeForce RTX 3080
title: 5d6132ca
seconds: 60
exit: 0x0
frames shown: 1632 (PresentX 1632)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15457 MB

Not tested

  • A flaky GPU test, which also fails on main: placed_title_textures_share_vram_and_preserve_pixels ("cubemap extra_pages must be reused at same va") fails intermittently on this card, and its panic poisons transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory.
    • On unmodified main f4ce27c (cargo test -p xcl --lib -- --test-threads=4): 4 of 13 runs failed. Over 4 alternating pairs, main failed 1 of 4 with the same cubemap assertion and this branch 2 of 4. It also failed with this PR's two new tests skipped.
    • Alone it passes on both.
    • It looks like the idle-page sweep timing that #447 / #614 / #673 deal with; not part of this change.
  • AMD and Intel GPUs.
  • The CPU cost on slower CPUs: #602's gain was measured on a Ryzen 5 2600. The copy now costs about what #602's in-place read did on fully committed memory (table above), but a slower core was not measured.
  • The decommit crash in a title run on this exact commit (it is intermittent).
  • A title protecting coherent-window memory as no-access or guard: the in-place read there assumes it stays readable, as read_committed and gpu::shader::readable already did.
  • XCL_TRACE_FRAME: samples on decommitted pages now count as zero bytes (they used to be skipped), so a texture whose samples all fall there shows as all zero. This is diagnostic only.

AI use

  • Claude Code with Claude Opus 5.5: found the crash with the retail title and symbolised it, wrote the probe, the fix and the tests (through a subagent), had separate subagents review the diff adversarially (also after the review follow-up) and applied their findings, profiled the copy, ran the tests, the retail-title and regression runs, and wrote this description.
**@⁠grahamster2** on GitHub · 2026-11-24 04:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/751) `grahamster2:title-bytes-decommit-race` → `main` · +196 −36 · 1 files · 1 commits · open Since #602, the unchanged-content hash and the detile of title textures read the title's memory in place whenever `gpu::shader::readable` passes. That bypasses the `ReadProcessMemory` copy #484 gave `read_committed`: the title can decommit or unmap those pages from another thread at any moment, and the hash or detile then faults with `0xC0000005`. @⁠chadatouille spotted this on #484. @⁠Dukiverse confirmed it independently in a retail title: on `main` dd2ae9a the fault is in `tiling::Chain::detile_level` ← `title_textures::subresources` on a `subresources_on` worker. Dukiverse also posted a local fix along the same lines; this version adds the regression test and reuses the read buffer. **What is in it** Rebased onto `main` cbc296a (head 59f8e7c). The only conflict was in the tests. #1986's 32 MiB / 256-item upload batch caps (`batch_fits` and its test) are kept as they are. #1990's 3D textures with packed mip tails go through `subresources`, so they are read through `with_title_bytes` too. - `D3D12.X: title texture reads outside the coherent window use the safe copy` (`crates/xcl/src/hle/d3d12x/title_textures.rs`): - `with_title_bytes(at, len, f)` replaces `title_bytes`. A range inside the coherent committed window is still read in place: XCL's `VirtualFree` never decommits that window, and `MEM_DECOMMIT` there zeroes in place. - Everything else goes through `read_committed`'s safe copy into a buffer reused per thread, so there is no new allocation and page faults per texture. A buffer that grew past 64 MiB is let go after the read. The scoped workers of a parallel batch detile still get a buffer per batch. Since #1986 a batch is capped at 32 MiB and 256 textures, which bounds those buffers too. - `read_committed_into` writes every byte (copied, or zero where a page can't be read), so the reused buffer needs no memset and nothing from an earlier read shows through a hole. - `read_committed_into` copies the whole range with one `ReadProcessMemory` first. It walks region by region with `VirtualQuery` only when that copy is refused (a page not committed, no-access or guard). The walk was most of the copy's cost: `VirtualQuery` scans from the page asked about to the end of its run of like pages, and the title's memory is a few runs of hundreds of MiB. `ReadProcessMemory` on a guard page fails and leaves the guard in place. - The frame-trace sampler had the same in-place read and goes through it too. - Tests: - `title_bytes_survive_concurrent_decommit`: hashes 1 MiB 2,000 times while another thread decommits and recommits its 64 KiB pages. It asserts that every decommit and recommit succeeds and that decommits happened during the hashing. Each 4 KiB holds its own value, and every read must hold those values or zeros. - `title_bytes_leave_guard_pages_alone`: a guard page and a no-access page read as zeros, and the guard is still set afterwards. - `title_bytes_are_copied_outside_the_coherent_window`: same bytes as `read_committed`, holes zero, no stale bytes from a longer read, the 64 MiB cap, and the coherent window read in place. It replaces `title_bytes_are_used_in_place_when_all_are_readable`, whose behaviour this removes. **Tested** - NVIDIA GeForce RTX 3080 10 GB (driver 32.0.16.1088), AMD Ryzen 5 7600X, 32 GB, Windows 11 26200; tests in debug unless noted, the retail title in release. - `title_bytes_survive_concurrent_decommit`: - with the old in-place `title_bytes` behind a local shim (not committed): 3 of 3 runs end in `STATUS_ACCESS_VIOLATION`; - on this change: 5 of 5 pass (`cargo test --release -p xcl --lib title_bytes`, at 4e101fc). - `cargo build --workspace`: no warnings. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on 59f8e7c: 1154 passed, 2 failed, 46 ignored. The two failures are timing tests this change does not touch, `frame::tests::origin_events_issue_tokens_and_flips_have_statistics` and `pso_async::used_tests::a_bind_waits_for_a_slow_pipeline_no_longer_than_its_budget` ("waited 460.8 ms"). Both pass when run alone on 59f8e7c (`cargo test -p xcl --lib <name> -- --exact`). The three new tests and `batch_fits_caps_items_bytes_and_device` pass. - Before the rebase, on 1a480bc: 703 passed, 0 failed, 41 ignored. - **The copy's cost:** release microbenchmark, 7600X, not committed, measured before the rebase (the rebase does not change `read_committed_into`); a 16 KiB / 256 KiB / 4 MiB read of fully committed memory. The microsecond figures quoted in review came from a 9800X3D; these were measured on the 7600X. | region the bytes lie in | 4e101fc (walk first) | 1a480bc (one copy first) | memcpy, for scale | |---|---|---|---| | 64 MiB | 128 / 125 / 280 µs | 1.3 / 6.9 / 156 µs | 0.1 / 3.4 / 140 µs | | 512 MiB | 1629 / 1179 / 1753 µs | 1.4 / 7.5 / 128 µs | 0.1 / 3.4 / 140 µs | A range with holes pays one refused copy on top of the walk: 4 MiB with one 4 KiB hole went from 158 to 230 µs. With every other 64 KiB page missing it is ~150 µs either way. - SKIPPED on 59f8e7c: every wave64 variant in `gpu::recomp::lower::tests`, `lower_dxil::tests` and `recomp::tests` ("no wave64"); three `lower_dxil` f16 / f32-conversion per-lane forms refused (`V_MUL_F16`, `V_PK_MUL_F16` VOP3 modifiers, `V_CVT_F16_F32`, #1426); `heap_window_out_of_memory_falls_back_to_the_switch_form` ("no heap windows"). - The retail title, before the rebase: 2 streaming runs per build (180 s, A pressed through the menus, caches warmed first; main f4ce27c vs the change on it), presents per second over fixed windows: | | main, run 1 / 2 | this PR, run 1 / 2 | |---|---|---| | intro video (4–16 s) | 22.8 / 22.2 | 22.2 / 22.2 | | menus and loading (16–44 s) | 28.9 / 28.9 | 28.9 / 28.7 | | while streaming (44–84 s) | 5.7 / 4.5 | 5.5 / 5.6 | | peak commit | 30.2 / 29.0 GB | 29.9 / 30.1 GB | Both builds then stop at the title's watchdog (#232). One main run ended earlier on a device hang (`0x887A0006`, 63 s). The decommit crash is intermittent, so these runs don't show it either way. **Regression run** main: ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: NVIDIA GeForce RTX 3080 title: 5d6132ca seconds: 60 exit: 0x0 frames shown: 1463 (PresentX 1463) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15274 MB ``` PR: ``` xcl-smoke v1 commit: 59f8e7c992dda0044d18a660aad86fae1d94185f gpu: NVIDIA GeForce RTX 3080 title: 5d6132ca seconds: 60 exit: 0x0 frames shown: 1632 (PresentX 1632) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15457 MB ``` **Not tested** - **A flaky GPU test, which also fails on `main`:** `placed_title_textures_share_vram_and_preserve_pixels` ("cubemap extra_pages must be reused at same va") fails intermittently on this card, and its panic poisons `transitions_apply_when_their_list_is_submitted` and `d32s8_targets_take_their_own_size_of_video_memory`. - On unmodified `main` f4ce27c (`cargo test -p xcl --lib -- --test-threads=4`): 4 of 13 runs failed. Over 4 alternating pairs, main failed 1 of 4 with the same cubemap assertion and this branch 2 of 4. It also failed with this PR's two new tests skipped. - Alone it passes on both. - It looks like the idle-page sweep timing that #447 / #614 / #673 deal with; not part of this change. - AMD and Intel GPUs. - The CPU cost on slower CPUs: #602's gain was measured on a Ryzen 5 2600. The copy now costs about what #602's in-place read did on fully committed memory (table above), but a slower core was not measured. - The decommit crash in a title run on this exact commit (it is intermittent). - A title protecting coherent-window memory as no-access or guard: the in-place read there assumes it stays readable, as `read_committed` and `gpu::shader::readable` already did. - `XCL_TRACE_FRAME`: samples on decommitted pages now count as zero bytes (they used to be skipped), so a texture whose samples all fall there shows as all zero. This is diagnostic only. **AI use** - Claude Code with Claude Opus 5.5: found the crash with the retail title and symbolised it, wrote the probe, the fix and the tests (through a subagent), had separate subagents review the diff adversarially (also after the review follow-up) and applied their findings, profiled the copy, ran the tests, the retail-title and regression runs, and wrote this description.
The unchanged-content hash, the detile of title textures and the
frame-trace sampler read the title's memory in place once it looked
readable (#602). That bypasses the ReadProcessMemory copy of
read_committed (#484): the title can decommit or unmap those pages from
another thread at any moment, and the read then faults with 0xC0000005.

with_title_bytes replaces title_bytes. A range inside the coherent
committed window is still read in place: XCL's VirtualFree never
decommits that window (MEM_DECOMMIT there zeroes the block in place).
Everything else is read as read_committed reads it, into a buffer kept
per thread and dropped after a read that grew it past 64 MiB.
read_committed_into now writes every byte (copied, or zero for a page
that is not readable), so the reused buffer needs no memset and nothing
of an earlier read shows through a hole. Only long-lived threads reuse
the buffer: the scoped workers of a parallel batch detile allocate one
per batch.

title_bytes_survive_concurrent_decommit hashes 1 MiB while another
thread decommits and recommits its 64 KiB pages; it checks that every
decommit and recommit succeeded, that some happened during the hashing and
that each read holds the title's bytes or zeros.
title_bytes_leave_guard_pages_alone reads a guard and a no-access page
as zeros and checks that the guard stays.

read_committed_into first copies the whole range with one
ReadProcessMemory and walks it region by region with VirtualQuery only
when that is refused (a page not committed, no-access or a guard page;
the guard stays). VirtualQuery scans from the page asked about to the
end of its run of like pages, and the title's memory is a few runs of
hundreds of MiB: in a release
microbenchmark (7600X), reading 16 KiB / 256 KiB / 4 MiB of a
fully committed 64 MiB region took 128 / 125 / 280 us with the walk and
1.3 / 6.9 / 156 us now (512 MiB region: 1629 / 1179 / 1753 us, now
1.4 / 7.5 / 128 us). A range with holes pays one refused copy on top
of the walk (4 MiB with one hole: ~158 us before, ~230 us now).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:21 +00:00
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 04:41 UTC · original

CPU cost on dc9eec1, Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, release. Two local synthetic fixtures used only committed memory outside the coherent window.

  • On a rotating 128 MiB buffer, I compared the old readability check plus direct hash with the PR’s copy plus the same hash. Median time per read over seven alternating pairs (direct / copy): 1.58 / 107.72 µs for 16 KiB, 112.60 / 129.11 µs for 256 KiB, and 252.80 / 454.49 µs for 4 MiB. The hashes matched for every pair.

  • Holding reads at 16 KiB and varying the committed allocation from 1 / 16 / 128 MiB, median VirtualQuery alone took 0.89 / 11.08 / 100.75 µs, versus 2.49 / 13.32 / 101.77 µs for copy plus hash. The query accounts for most of the small-read cost inside the large allocation on this setup.

Both scratch fixtures passed (1/1 each, zero skips) with cargo test --offline --locked --release -p xcl --lib <filter> -- --nocapture --test-threads=1 using scratch_committed_texture_copy_cost and scratch_fixed_read_different_allocations. These are per-read CPU measurements. Frame timing, the concurrent decommit case, and retail use were outside the benchmarks. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the fixtures and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 04:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7122249457) CPU cost on [`dc9eec1`](https://github.com/ivall/xcl/commit/dc9eec1d198c57ba19d97b43a93df4de6977915c), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, release. Two local synthetic fixtures used only committed memory outside the coherent window. - On a rotating 128 MiB buffer, I compared the old readability check plus direct hash with the PR’s copy plus the same hash. Median time per read over seven alternating pairs (direct / copy): **1.58 / 107.72 µs** for 16 KiB, **112.60 / 129.11 µs** for 256 KiB, and **252.80 / 454.49 µs** for 4 MiB. The hashes matched for every pair. - Holding reads at 16 KiB and varying the committed allocation from **1 / 16 / 128 MiB**, median `VirtualQuery` alone took **0.89 / 11.08 / 100.75 µs**, versus **2.49 / 13.32 / 101.77 µs** for copy plus hash. The query accounts for most of the small-read cost inside the large allocation on this setup. Both scratch fixtures passed (1/1 each, zero skips) with `cargo test --offline --locked --release -p xcl --lib <filter> -- --nocapture --test-threads=1` using `scratch_committed_texture_copy_cost` and `scratch_fixed_read_different_allocations`. These are per-read CPU measurements. Frame timing, the concurrent decommit case, and retail use were outside the benchmarks. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the fixtures and drafted this report.
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 04:54 UTC · original

Test run of 4e101fc56b86f4f489a4485b7f2c0ef00381740e on AMD RDNA4. I merged it onto current main 64b3f35 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 702 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 661 passed, 0 failed, 21 ignored
  • 0 SKIPPED; title_bytes_are_copied_outside_the_coherent_window, read_committed_copies_committed_pages_and_zeroes_gaps and read_committed_tolerates_concurrent_decommit pass.

Review: The unchanged-content hash and the detile go back through the ReadProcessMemory copy (with_title_bytes → read_committed_into), so a page the title decommits from another thread reads as zeros instead of faulting, and gaps are zeroed in the caller's buffer. The CPU cost measured above is the trade-off. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 04:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7122439098) Test run of `4e101fc56b86f4f489a4485b7f2c0ef00381740e` on AMD RDNA4. I merged it onto current `main` `64b3f35` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows, not Wine), Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **702 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 661 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `title_bytes_are_copied_outside_the_coherent_window`, `read_committed_copies_committed_pages_and_zeroes_gaps` and `read_committed_tolerates_concurrent_decommit` pass. **Review:** The unchanged-content hash and the detile go back through the `ReadProcessMemory` copy (`with_title_bytes` → `read_committed_into`), so a page the title decommits from another thread reads as zeros instead of faulting, and gaps are zeroed in the caller's buffer. The CPU cost measured above is the trade-off. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠mastrr9 on GitHub · 2026-11-24 05:14 UTC · original

Independent native Windows NVIDIA RTX 5080 build/test run and code review at head 4e101fc56b86f4f489a4485b7f2c0ef00381740e.

Code Review

  • Clean fix for the #602 concurrent-decommit 0xC0000005 fault in content_hash / detile_level:
    • Only reads in place inside UMA's committed coherent window; everything else copies safely via read_committed_into into a thread-local reusable TITLE_BYTES buffer (releasing buffers larger than TITLE_BYTES_KEPT = 64 MiB).
    • Zeroing every hole/unreadable region in read_committed_into and failed single-page leaves in copy_committed_region prevents stale bytes from prior calls on the same thread from bleeding through.
    • Keeping VirtualQuery ahead of ReadProcessMemory avoids accidentally tripping PAGE_GUARD pages.

Tested

  • Environment: NVIDIA GeForce RTX 5080 (16 GB, wave32, driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 (0ef1bc386 2026-11-09), DXC from Windows SDK 10.0.26100.0, debug build.
  • Command: cargo build --workspace && cargo test --workspace -- --test-threads=4
  • Result: 702 passed, 0 failed, 41 ignored (0 new warnings).
  • PR-specific tests (2/2 ok):
    • hle::d3d12x::title_textures::tests::title_bytes_are_copied_outside_the_coherent_window
    • hle::d3d12x::title_textures::tests::title_bytes_survive_concurrent_decommit
  • SKIPPED (2):
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64)
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)

Not tested

  • D3D12 debug layer, AMD/wave64 hardware, CPU throughput benchmarks, and retail titles.

AI use: Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment.

**@⁠mastrr9** on GitHub · 2026-11-24 05:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7122753151) Independent native Windows NVIDIA RTX 5080 build/test run and code review at head `4e101fc56b86f4f489a4485b7f2c0ef00381740e`. ### Code Review - Clean fix for the `#602` concurrent-decommit `0xC0000005` fault in `content_hash` / `detile_level`: - Only reads in place inside UMA's committed coherent window; everything else copies safely via `read_committed_into` into a thread-local reusable `TITLE_BYTES` buffer (releasing buffers larger than `TITLE_BYTES_KEPT = 64 MiB`). - Zeroing every hole/unreadable region in `read_committed_into` and failed single-page leaves in `copy_committed_region` prevents stale bytes from prior calls on the same thread from bleeding through. - Keeping `VirtualQuery` ahead of `ReadProcessMemory` avoids accidentally tripping `PAGE_GUARD` pages. ### Tested - **Environment:** NVIDIA GeForce RTX 5080 (16 GB, wave32, driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC from Windows SDK `10.0.26100.0`, debug build. - **Command:** `cargo build --workspace && cargo test --workspace -- --test-threads=4` - **Result:** **702 passed, 0 failed, 41 ignored** (0 new warnings). - **PR-specific tests (2/2 `ok`):** - `hle::d3d12x::title_textures::tests::title_bytes_are_copied_outside_the_coherent_window` - `hle::d3d12x::title_textures::tests::title_bytes_survive_concurrent_decommit` - **SKIPPED (2):** - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`) - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`) ### Not tested - D3D12 debug layer, AMD/wave64 hardware, CPU throughput benchmarks, and retail titles. **AI use:** Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment.
Author
Owner

@⁠atk3001 on GitHub · 2026-11-24 09:21 UTC · original

Test report on a retail title, 4e101fc (this PR's head, on 64b3f35).

Setup: RTX 5080 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 26300, rustc 1.100.0, release, XCL_NETWORK=0, retail 1.0.2.1. A pressed by script (XCL_PRESS_A_AT=20,22,25,30,35,40,50,60), so every run gets the same input.

Without this PR (main 077ce40): 1 of 3 runs faulted at 59.8 s. It was the fault this PR describes:

  • 0xc0000005 in VCRUNTIME140.dll+0x1c45a (read at 0x297bb048000)
  • tiling::Chain::detile_level (tiling.rs:438) ← title_textures::subresources (title_textures.rs:1175) ← a subresources_on worker

In the other two runs the title reached the null write at +0x23cf683 (#846) at 95.6 s, or no crash came within the 180 s.

With this PR: 2 of 2 scripts/smoke.ps1 -Seconds 180 runs show no fault in title_textures or tiling. Both end at the title's own null write at +0x23cf683 (#846), at 99.5 s and 94.5 s. That is the known later crash, not this one.

xcl-smoke v1
commit: 4e101fc56b86f4f489a4485b7f2c0ef00381740e
gpu: NVIDIA GeForce RTX 5080
title: GTA
seconds: 180
exit: 0xc0000005
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 2
peak commit: 29508 MB

Not tested: the race does not hit every run (1 of 3 on main), so two clean runs show no regression rather than prove the fix. I did not run the test suite on this head, and did not measure the upload time this PR adds back.

Report written with Claude Code (Claude Opus 5.5) from my own runs.

**@⁠atk3001** on GitHub · 2026-11-24 09:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7127310697) Test report on a retail title, 4e101fc (this PR's head, on 64b3f35). **Setup:** RTX 5080 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 26300, rustc 1.100.0, release, `XCL_NETWORK=0`, retail 1.0.2.1. A pressed by script (`XCL_PRESS_A_AT=20,22,25,30,35,40,50,60`), so every run gets the same input. **Without this PR (`main` 077ce40):** 1 of 3 runs faulted at 59.8 s. It was the fault this PR describes: - `0xc0000005` in `VCRUNTIME140.dll+0x1c45a` (read at 0x297bb048000) - `tiling::Chain::detile_level` (tiling.rs:438) ← `title_textures::subresources` (title_textures.rs:1175) ← a `subresources_on` worker In the other two runs the title reached the null write at `+0x23cf683` (#846) at 95.6 s, or no crash came within the 180 s. **With this PR:** 2 of 2 `scripts/smoke.ps1 -Seconds 180` runs show no fault in `title_textures` or `tiling`. Both end at the title's own null write at `+0x23cf683` (#846), at 99.5 s and 94.5 s. That is the known later crash, not this one. ``` xcl-smoke v1 commit: 4e101fc56b86f4f489a4485b7f2c0ef00381740e gpu: NVIDIA GeForce RTX 5080 title: GTA seconds: 180 exit: 0xc0000005 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 2 peak commit: 29508 MB ``` **Not tested:** the race does not hit every run (1 of 3 on main), so two clean runs show no regression rather than prove the fix. I did not run the test suite on this head, and did not measure the upload time this PR adds back. Report written with Claude Code (Claude Opus 5.5) from my own runs.
Author
Owner

@⁠maephisto666 on GitHub · 2026-11-24 09:50 UTC · original

Test report: the fault this PR describes, reproduced in the retail title, and the same setup with this PR.

Setup

  • RTX 5090 (driver 32.0.16.2124), Ryzen 9 9950X3D, 64 GB, Windows 11 build 26100, rustc 1.100.0 (MSVC), release builds.
  • Retail 1.0.2.1, XCL_NETWORK=0 plus a firewall block, fresh title data per run with the learned coherent window seeded (4095 MB), warm caches, scripted presses through the first-run setup, XCL_PSO_WAIT_MS=50.
  • Base for both runs: main 09940bb + #631 (rebased) + #891 + #533 + a local diagnostic that saves a frame every 5 s. The only difference between the two runs is this PR.

Without this PR – during the story load, 114.1 s:

unhandled exception 0xc0000005 in VCRUNTIME140.dll+0x1c45a (read at address 0xc72d00000)

Stack from xcl.pdb of that build:

xcl::gpu::tiling::Chain::detile_level +0x57a
xcl::hle::d3d12x::title_textures::subresources +0x302
alloc::vec::…::from_iter<…, title_textures::subresources_on::closure_env$0> +0xb3
xcl::hle::d3d12x::real::res_release +0x60
xcl::hle::d3d12x::title_textures::refresh +0x34d1

0xc72d00000 is outside the coherent window (0x400000000, 4095 MB) – the case this PR routes through the safe copy. res_release on the stack fits the title letting go of the memory while the detile reads it.

With this PR (same base, settings and scripted input): no fault in title textures. The title reaches the world (first ListX #101 at 130.7 s), shows the intro's "two years ago" title card at 141.8 s, and ends at 196.4 s in the #505 stall (cross-queue Write64 Signal … would close a GPU cycle – signalled on CPU from 144.9 s, then the watchdog at +0x23cf683).

Tests: cargo test --release -p xcl --lib title_textures on the stacked build: 14 passed, 0 failed, including title_bytes_are_copied_outside_the_coherent_window and title_bytes_survive_concurrent_decommit.

Caveat: one run each. Across about ten runs on main-based builds today this fault showed up once, so the run with the PR shows it got past that point, not a measured rate.

Not tested: the full suite on this stack, AMD, other titles, scripts/smoke.ps1 blocks.

AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and retail runs on the hardware above, symbolized the stack, and wrote this report.

**@⁠maephisto666** on GitHub · 2026-11-24 09:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7127959022) Test report: the fault this PR describes, reproduced in the retail title, and the same setup with this PR. **Setup** - RTX 5090 (driver 32.0.16.2124), Ryzen 9 9950X3D, 64 GB, Windows 11 build 26100, rustc 1.100.0 (MSVC), release builds. - Retail 1.0.2.1, `XCL_NETWORK=0` plus a firewall block, fresh title data per run with the learned coherent window seeded (4095 MB), warm caches, scripted presses through the first-run setup, `XCL_PSO_WAIT_MS=50`. - Base for both runs: `main` `09940bb` + #631 (rebased) + #891 + #533 + a local diagnostic that saves a frame every 5 s. The only difference between the two runs is this PR. **Without this PR** – during the story load, 114.1 s: ``` unhandled exception 0xc0000005 in VCRUNTIME140.dll+0x1c45a (read at address 0xc72d00000) ``` Stack from `xcl.pdb` of that build: ``` xcl::gpu::tiling::Chain::detile_level +0x57a xcl::hle::d3d12x::title_textures::subresources +0x302 alloc::vec::…::from_iter<…, title_textures::subresources_on::closure_env$0> +0xb3 xcl::hle::d3d12x::real::res_release +0x60 xcl::hle::d3d12x::title_textures::refresh +0x34d1 ``` `0xc72d00000` is outside the coherent window (`0x400000000`, 4095 MB) – the case this PR routes through the safe copy. `res_release` on the stack fits the title letting go of the memory while the detile reads it. **With this PR** (same base, settings and scripted input): no fault in title textures. The title reaches the world (first `ListX #101` at 130.7 s), shows the intro's "two years ago" title card at 141.8 s, and ends at 196.4 s in the #505 stall (cross-queue `Write64 Signal … would close a GPU cycle – signalled on CPU` from 144.9 s, then the watchdog at `+0x23cf683`). **Tests:** `cargo test --release -p xcl --lib title_textures` on the stacked build: 14 passed, 0 failed, including `title_bytes_are_copied_outside_the_coherent_window` and `title_bytes_survive_concurrent_decommit`. **Caveat:** one run each. Across about ten runs on `main`-based builds today this fault showed up once, so the run with the PR shows it got past that point, not a measured rate. **Not tested:** the full suite on this stack, AMD, other titles, `scripts/smoke.ps1` blocks. **AI use:** Claude Code (Claude Opus 5.5) ran the builds, tests and retail runs on the hardware above, symbolized the stack, and wrote this report.
Author
Owner

@⁠iggyvilla on GitHub · 2026-11-24 14:13 UTC · original

Test report and review for 4e101fc56b86f4f489a4485b7f2c0ef00381740e (current head of #751, crates/xcl/src/hle/d3d12x/title_textures.rs; base 64b3f35, the commit of the PR's own regression blocks) on an AMD RDNA2 card. The builds and runs were done by an agent (omp, DeepSeek V4.1 Flash); I checked the numbers against its saved suite, smoke and test logs and spot-checked the diff; the text is by Claude Code (Claude Sonnet 5.5).

Tested

  • AMD Radeon RX 6650 XT (RDNA2, 8 GB), driver 32.0.21045.29003; Ryzen 7 5700X, 31.9 GB; Windows 11 build 26300; rustc 1.100.0; no XCL_SAMPLE_*. Clean worktrees for head and base; debug for tests, release for smokes; no other title run during the measurements.
  • cargo test -j 4 --workspace --no-fail-fast -- --test-threads=4: head 699 passed, 3 failed, 41 ignored; base 698 passed, 3 failed, 41 ignored (sums of the saved logs). The head has one more test: the PR replaces title_bytes_are_used_in_place_when_all_are_readable and adds title_bytes_survive_concurrent_decommit.
  • The same three tests fail on both: placed_title_textures_share_vram_and_preserve_pixels (cubemap extra_pages must be reused at same va, different values each run) and its two PoisonError cascades (transitions_apply_when_their_list_is_submitted, d32s8_targets_take_their_own_size_of_video_memory). This is the known flake of this 8 GB card (#470 family), not this PR; run alone, placed… failed on both commits and the other two passed on both. No SKIPPED lines.
  • The PR's tests, -p xcl --lib title_bytes -- --nocapture --test-threads=1: 2 passed, 0 failed (8.09 s). The log shows UMA: 3 sparse VRAM window(s) (12 GiB VA) + 512 MB coherent window, so title_bytes_are_copied_outside_the_coherent_window ran its in-place half rather than returning early.
  • Smoke (XCL_NETWORK=0, retail, 60 s): one unmeasured base warm-up (1544 frames, peak 15306 MB), then head, then base. All exit 0x0, 0 device removals, 0 crashes, 60 60 60.
xcl-smoke v1
commit: 4e101fc56b86f4f489a4485b7f2c0ef00381740e
gpu: AMD Radeon RX 6650 XT
title: retail
seconds: 60
exit: 0x0
frames shown: 1560 (PresentX 1560)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15302 MB
xcl-smoke v1
commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175
gpu: AMD Radeon RX 6650 XT
title: retail
seconds: 60
exit: 0x0
frames shown: 1549 (PresentX 1549)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15152 MB

Head is 11 frames (0.7 %) above base and the warm-up (1544) is inside that spread, so no regression or gain is measurable in this window.

  • origin/main has moved (44+ commits); git merge-tree of the head onto it is clean. The results above are on the head as-is, not on that merge.

Review (diff read at 4e101fc)
Buffer reuse looks right: read_committed_into writes every byte (copied coherent window, copy_committed_region for readable regions, zeros elsewhere and for the tail when VirtualQuery stops early), so a short read after a long one cannot expose stale bytes. I found no other in-place read of title memory in hle/d3d12x outside tests; the hash in upload_all, the detile paths and the frame-trace sampler go through with_title_bytes. Points to weigh:

  1. The copy is now the default path. unchanged_skip() is on by default and title graphics memory sits in the sparse windows, so nearly every title texture takes the ReadProcessMemory copy. The PR's own measurement (on a 9800X3D; quoted from its description, not reproduced here) is 1.58 → 107.72 µs for 16 KiB, 112.60 → 129.11 µs for 256 KiB and 252.80 → 454.49 µs for 4 MiB. Slower CPUs are unmeasured; a regression, if any, would show on many-small-texture titles on older cores. On this 5700X nothing showed in 60 s.
  2. The coherent window is still read in place with no protection check. That predates the PR, but readable() used to catch a no-access or guard page there and nothing does now. The PR lists it under "Not tested"; I did not test it either.
  3. The frame-trace counter changed meaning: samples on decommitted pages used to be skipped and now count as zero bytes, so XCL_TRACE_FRAME can show a texture as "all zero". Diagnostic only.
  4. title_bytes_survive_concurrent_decommit can pass vacuously: its mutator ignores the return values of VirtualFree(…, MEM_DECOMMIT) and the recommit VirtualAlloc (confirmed in the source), and the test only asserts that no access violation occurs. Asserting the decommit succeeded would keep the negative control honest. The evidence that the old code faults is the author's run (3/3 access violations with the old behaviour behind a shim); I could not reproduce that without editing the tree.

Not tested

  • Gameplay past the first minute: the fault is intermittent, so one clean pair does not prove it gone (the PR says the same), and the one retail reproduction in the PR thread was ~114 s into a scripted load, beyond a 60 s smoke.
  • A slower CPU; a title protecting coherent-window memory as no-access/guard; the head merged onto current main; release-build workspace tests; any non-AMD GPU; XCL_SAMPLE_* runs.

AI use
Claude Code, Claude Sonnet 5.5: checked the numbers against the saved logs, spot-checked the diff and wrote this text; it ran nothing. The builds, suites, smokes and the first review pass were done by omp with DeepSeek V4.1 Flash, which changed no code.

**@⁠iggyvilla** on GitHub · 2026-11-24 14:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7134032305) Test report and review for `4e101fc56b86f4f489a4485b7f2c0ef00381740e` (current head of #751, `crates/xcl/src/hle/d3d12x/title_textures.rs`; base `64b3f35`, the commit of the PR's own regression blocks) on an AMD RDNA2 card. The builds and runs were done by an agent (omp, DeepSeek V4.1 Flash); I checked the numbers against its saved suite, smoke and test logs and spot-checked the diff; the text is by Claude Code (Claude Sonnet 5.5). **Tested** - AMD Radeon RX 6650 XT (RDNA2, 8 GB), driver 32.0.21045.29003; Ryzen 7 5700X, 31.9 GB; Windows 11 build 26300; rustc 1.100.0; no `XCL_SAMPLE_*`. Clean worktrees for head and base; debug for tests, release for smokes; no other title run during the measurements. - `cargo test -j 4 --workspace --no-fail-fast -- --test-threads=4`: head **699 passed, 3 failed, 41 ignored**; base **698 passed, 3 failed, 41 ignored** (sums of the saved logs). The head has one more test: the PR replaces `title_bytes_are_used_in_place_when_all_are_readable` and adds `title_bytes_survive_concurrent_decommit`. - The same three tests fail on both: `placed_title_textures_share_vram_and_preserve_pixels` (cubemap `extra_pages must be reused at same va`, different values each run) and its two `PoisonError` cascades (`transitions_apply_when_their_list_is_submitted`, `d32s8_targets_take_their_own_size_of_video_memory`). This is the known flake of this 8 GB card (#470 family), not this PR; run alone, `placed…` failed on both commits and the other two passed on both. No `SKIPPED` lines. - The PR's tests, `-p xcl --lib title_bytes -- --nocapture --test-threads=1`: 2 passed, 0 failed (8.09 s). The log shows `UMA: 3 sparse VRAM window(s) (12 GiB VA) + 512 MB coherent window`, so `title_bytes_are_copied_outside_the_coherent_window` ran its in-place half rather than returning early. - Smoke (`XCL_NETWORK=0`, retail, 60 s): one unmeasured base warm-up (1544 frames, peak 15306 MB), then head, then base. All exit `0x0`, 0 device removals, 0 crashes, `60 60 60`. ``` xcl-smoke v1 commit: 4e101fc56b86f4f489a4485b7f2c0ef00381740e gpu: AMD Radeon RX 6650 XT title: retail seconds: 60 exit: 0x0 frames shown: 1560 (PresentX 1560) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15302 MB ``` ``` xcl-smoke v1 commit: 64b3f35599bb7102f55d640e1a791e7d6dd3b175 gpu: AMD Radeon RX 6650 XT title: retail seconds: 60 exit: 0x0 frames shown: 1549 (PresentX 1549) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15152 MB ``` Head is 11 frames (0.7 %) above base and the warm-up (1544) is inside that spread, so no regression or gain is measurable in this window. - `origin/main` has moved (44+ commits); `git merge-tree` of the head onto it is clean. The results above are on the head as-is, not on that merge. **Review** (diff read at `4e101fc`) Buffer reuse looks right: `read_committed_into` writes every byte (copied coherent window, `copy_committed_region` for readable regions, zeros elsewhere and for the tail when `VirtualQuery` stops early), so a short read after a long one cannot expose stale bytes. I found no other in-place read of title memory in `hle/d3d12x` outside tests; the hash in `upload_all`, the detile paths and the frame-trace sampler go through `with_title_bytes`. Points to weigh: 1. **The copy is now the default path.** `unchanged_skip()` is on by default and title graphics memory sits in the sparse windows, so nearly every title texture takes the `ReadProcessMemory` copy. The PR's own measurement (on a 9800X3D; quoted from its description, not reproduced here) is 1.58 → 107.72 µs for 16 KiB, 112.60 → 129.11 µs for 256 KiB and 252.80 → 454.49 µs for 4 MiB. Slower CPUs are unmeasured; a regression, if any, would show on many-small-texture titles on older cores. On this 5700X nothing showed in 60 s. 2. The coherent window is still read in place with no protection check. That predates the PR, but `readable()` used to catch a no-access or guard page there and nothing does now. The PR lists it under "Not tested"; I did not test it either. 3. The frame-trace counter changed meaning: samples on decommitted pages used to be skipped and now count as zero bytes, so `XCL_TRACE_FRAME` can show a texture as "all zero". Diagnostic only. 4. `title_bytes_survive_concurrent_decommit` can pass vacuously: its mutator ignores the return values of `VirtualFree(…, MEM_DECOMMIT)` and the recommit `VirtualAlloc` (confirmed in the source), and the test only asserts that no access violation occurs. Asserting the decommit succeeded would keep the negative control honest. The evidence that the old code faults is the author's run (3/3 access violations with the old behaviour behind a shim); I could not reproduce that without editing the tree. **Not tested** - Gameplay past the first minute: the fault is intermittent, so one clean pair does not prove it gone (the PR says the same), and the one retail reproduction in the PR thread was ~114 s into a scripted load, beyond a 60 s smoke. - A slower CPU; a title protecting coherent-window memory as no-access/guard; the head merged onto current `main`; release-build workspace tests; any non-AMD GPU; `XCL_SAMPLE_*` runs. **AI use** Claude Code, Claude Sonnet 5.5: checked the numbers against the saved logs, spot-checked the diff and wrote this text; it ran nothing. The builds, suites, smokes and the first review pass were done by omp with DeepSeek V4.1 Flash, which changed no code.
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-24 15:14 UTC · original

@⁠iggyvilla thanks for the run and the careful review. All four points are answered below; 1 and 4 are fixed in the new head 1a480bc. The smoke blocks in the description will be redone on that head.

1. Cost of the copy: fixed, and the cause was the region walk, not the copy.

  • A release microbenchmark on a Ryzen 5 7600X (not committed) split read_committed_into into its parts:
    • ReadProcessMemory of 16 KiB takes ~0.9 µs.
    • The VirtualQuery before it took 120 µs in a 64 MiB committed region and 1.3–2.5 ms in a 512 MiB one. VirtualQuery scans from the page asked about to the end of its run of like pages, and the title's memory is a few runs of hundreds of MiB.
  • The new version copies the whole range with one ReadProcessMemory first. It walks region by region only when that copy is refused, which happens for a page that is not committed, is no-access, or is a guard page.
fully committed 64 MiB region, read before after
16 KiB 128 µs 1.3 µs
256 KiB 125 µs 6.9 µs
4 MiB 280 µs 156 µs (memcpy of the same: ~140 µs)
  • In a 512 MiB region the same three reads went from 1629 / 1179 / 1753 µs to 1.4 / 7.5 / 128 µs.
  • A range with holes pays one refused copy on top of the old walk. 4 MiB with one hole went from ~158 µs to ~230 µs, and with every other 64 KiB page missing it is ~150 µs either way.
  • Guard pages: ReadProcessMemory on a guard page fails without clearing the guard. The new test title_bytes_leave_guard_pages_alone checks that a guard page and a no-access page read as zeros and that the guard is still set afterwards.

2. The coherent window is read in place with no protection check: this is deliberate, and it predates #751.

  • XCL commits the coherent window as a whole when it makes it, and its VirtualFree never decommits there: MEM_DECOMMIT inside the window zeroes the block in place.
  • A title's VirtualProtect on that memory goes through kernelx. A no-access or guard page there would need the title to protect its own GPU heap memory, which I haven't seen.
  • I'd rather not add a per-read VirtualQuery back for a case nobody has hit, since that is exactly the cost in point 1. If a title does it, the read faults with a clear 0xC0000005 at a known site, and the fix is to route that title's window reads through the same copy.
  • It stays under Not tested.

3. XCL_TRACE_FRAME counts decommitted samples as zero bytes: yes, that is intended. The sampler counts non-zero bytes. A page the title decommitted has none, and counting it as zero keeps the 16 samples a texture at a fixed weight, where skipping it gave fewer samples for some textures than others. A texture whose samples all fall on decommitted pages now shows as "all zero", which for the GPU it is: its upload reads zeros there too. It's diagnostic only; I'll add a line about it to the description.

4. title_bytes_survive_concurrent_decommit could pass vacuously: fixed.

  • The mutator now asserts that every VirtualFree(MEM_DECOMMIT) and recommit succeeds.
  • The test counts the decommits made while the 2,000 hashes run and asserts there was at least one.
  • Each 4 KiB of the test memory now holds its own number, and every read is checked to contain those numbers or zeros (a page decommitted mid-copy may give its number and then zeros). So a read that returned garbage or stale bytes would fail.

Tested:

  • cargo test --workspace -- --test-threads=4 on 1a480bc, RTX 3080 10 GB / Ryzen 5 7600X / Windows 11 26200, debug: 703 passed, 0 failed, 41 ignored.
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).

Written with Claude Code (Claude Opus 5.5); the measurements are my own runs.

**@⁠grahamster2** on GitHub · 2026-11-24 15:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7135699108) @⁠iggyvilla thanks for the run and the careful review. All four points are answered below; 1 and 4 are fixed in the new head `1a480bc`. The smoke blocks in the description will be redone on that head. **1. Cost of the copy:** fixed, and the cause was the region walk, not the copy. - A release microbenchmark on a Ryzen 5 7600X (not committed) split `read_committed_into` into its parts: - `ReadProcessMemory` of 16 KiB takes ~0.9 µs. - The `VirtualQuery` before it took 120 µs in a 64 MiB committed region and 1.3–2.5 ms in a 512 MiB one. `VirtualQuery` scans from the page asked about to the end of its run of like pages, and the title's memory is a few runs of hundreds of MiB. - The new version copies the whole range with one `ReadProcessMemory` first. It walks region by region only when that copy is refused, which happens for a page that is not committed, is no-access, or is a guard page. | fully committed 64 MiB region, read | before | after | |---|---|---| | 16 KiB | 128 µs | 1.3 µs | | 256 KiB | 125 µs | 6.9 µs | | 4 MiB | 280 µs | 156 µs (memcpy of the same: ~140 µs) | - In a 512 MiB region the same three reads went from 1629 / 1179 / 1753 µs to 1.4 / 7.5 / 128 µs. - A range with holes pays one refused copy on top of the old walk. 4 MiB with one hole went from ~158 µs to ~230 µs, and with every other 64 KiB page missing it is ~150 µs either way. - **Guard pages:** `ReadProcessMemory` on a guard page fails without clearing the guard. The new test `title_bytes_leave_guard_pages_alone` checks that a guard page and a no-access page read as zeros and that the guard is still set afterwards. **2. The coherent window is read in place with no protection check:** this is deliberate, and it predates #751. - XCL commits the coherent window as a whole when it makes it, and its `VirtualFree` never decommits there: `MEM_DECOMMIT` inside the window zeroes the block in place. - A title's `VirtualProtect` on that memory goes through kernelx. A no-access or guard page there would need the title to protect its own GPU heap memory, which I haven't seen. - I'd rather not add a per-read `VirtualQuery` back for a case nobody has hit, since that is exactly the cost in point 1. If a title does it, the read faults with a clear `0xC0000005` at a known site, and the fix is to route that title's window reads through the same copy. - It stays under **Not tested**. **3. `XCL_TRACE_FRAME` counts decommitted samples as zero bytes:** yes, that is intended. The sampler counts non-zero bytes. A page the title decommitted has none, and counting it as zero keeps the 16 samples a texture at a fixed weight, where skipping it gave fewer samples for some textures than others. A texture whose samples all fall on decommitted pages now shows as "all zero", which for the GPU it is: its upload reads zeros there too. It's diagnostic only; I'll add a line about it to the description. **4. `title_bytes_survive_concurrent_decommit` could pass vacuously:** fixed. - The mutator now asserts that every `VirtualFree(MEM_DECOMMIT)` and recommit succeeds. - The test counts the decommits made while the 2,000 hashes run and asserts there was at least one. - Each 4 KiB of the test memory now holds its own number, and every read is checked to contain those numbers or zeros (a page decommitted mid-copy may give its number and then zeros). So a read that returned garbage or stale bytes would fail. **Tested:** - `cargo test --workspace -- --test-threads=4` on `1a480bc`, RTX 3080 10 GB / Ryzen 5 7600X / Windows 11 26200, debug: 703 passed, 0 failed, 41 ignored. - `SKIPPED`: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). _Written with Claude Code (Claude Opus 5.5); the measurements are my own runs._
Author
Owner

@⁠luis-7654 on GitHub · 2026-11-24 16:53 UTC · original

Linux / NVIDIA data point for this fault, and the same tree with this PR.

Setup: RTX 2060 6 GB (NVIDIA 595.71.05, 32-lane waves), i7-13700K, 32 GB RAM, NixOS (kernel 6.18.60), GE-Proton11-14's Wine, vkd3d-proton v3.1 + #257's patch + dxil-spirv 53aac418, DXC 1.9.2609.5. XCL release, cross-built for x86_64-pc-windows-msvc: main b7aa9f3 + #793 #794 #640 (budget unset) #605 #1110 and local switches. Retail 1.0.2.1, XCL_NETWORK=0.

Without this PR: one of two runs on that tree crashed, at 62.6 s, at the start of the story load:

unhandled exception 0xc0000005 in ucrtbase.dll+0x171c6 (read at address 0xbb1d94a00)

Symbolized with that build's PDB, the stack is tiling::Chain::detile_level (the linear-row copy_from_slice) ← title_textures::title_bytes / subresources ← a subresources_on worker. The other run did not hit it (it ended at 160 s for a different reason), so it is intermittent here.

With 1a480bc merged: seven runs that got past that point (120–336 s, all of them into the story load) and none with this fault. They were not all configured alike (compute programs skipped, preload on or off), and each ended for other reasons (host memory, or my own memory limit), so this is supporting evidence, not proof.

Not tested: the PR's unit tests, its cost, Windows, AMD, a paired regression run.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on the owner's machine at their request, read the logs and wrote and posted this comment. The text was not reviewed line by line by a person before posting.

**@⁠luis-7654** on GitHub · 2026-11-24 16:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7138372693) Linux / NVIDIA data point for this fault, and the same tree with this PR. **Setup:** RTX 2060 6 GB (NVIDIA 595.71.05, 32-lane waves), i7-13700K, 32 GB RAM, NixOS (kernel 6.18.60), GE-Proton11-14's Wine, vkd3d-proton v3.1 + #257's patch + dxil-spirv `53aac418`, DXC 1.9.2609.5. XCL release, cross-built for `x86_64-pc-windows-msvc`: `main` `b7aa9f3` + #793 #794 #640 (budget unset) #605 #1110 and local switches. Retail 1.0.2.1, `XCL_NETWORK=0`. **Without this PR:** one of two runs on that tree crashed, at 62.6 s, at the start of the story load: ``` unhandled exception 0xc0000005 in ucrtbase.dll+0x171c6 (read at address 0xbb1d94a00) ``` Symbolized with that build's PDB, the stack is `tiling::Chain::detile_level` (the linear-row `copy_from_slice`) ← `title_textures::title_bytes` / `subresources` ← a `subresources_on` worker. The other run did not hit it (it ended at 160 s for a different reason), so it is intermittent here. **With `1a480bc` merged:** seven runs that got past that point (120–336 s, all of them into the story load) and none with this fault. They were not all configured alike (compute programs skipped, preload on or off), and each ended for other reasons (host memory, or my own memory limit), so this is supporting evidence, not proof. **Not tested:** the PR's unit tests, its cost, Windows, AMD, a paired regression run. AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on the owner's machine at their request, read the logs and wrote and posted this comment. The text was not reviewed line by line by a person before posting.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 19:20 UTC · original

Crash count on a retail title, main 64b3f35 (this PR's base) against this PR's head 1a480bc, 10 runs each in ABBA order: RTX 5070 Ti 16 GB (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 Pro 26200. Each run was scripts/smoke.ps1 for 85 s (the first 110 s), with the same walk and data. Each crash was symbolized with that build's pdb.

  • The race: 0 of 10 on main and 0 of 10 here. It didn't show on main within 85 s either, so this can't confirm the fix. On this machine it hit once in about 55 earlier 60 s runs, at 30.8 s (tiling::Chain::detile_level ← title_textures::subresources, on #1013).
  • Other ends on this PR's side (neither crash stack is in the code it changes; we did not check further):
    • run 03: the title's own read at +0xcedcee (address 0x1) at 61.7 s;
    • run 10: D3D12Core.dll in SetGraphicsRootSignature from bind::execute_indirect (bind.rs:237) at 76.5 s.
    • run 19 ran its 85 s cleanly but didn't exit; the job was ended at 360 s, so it has no block.
  • On main: its one crash was the title's watchdog write at +0x23cf683 (#846), at 90.4 s in the 110 s run. Run 09 ran its 85 s but its block shows exit 0x887a0006 (DXGI device hung).
  • Slow exits, both sides: 4 runs here and 2 on main took 53-128 s to exit or didn't (run 19). They are the same six runs that started slowly, so this looks like one run state on both sides, not this PR.
  • Cost: presents in the first 60 s were the same, 1251 on main and 1261 here (101 %), averaged over the 8 and 6 runs that loaded normally. The other 2 and 4 runs started slowly on both sides, with about 15-17 GB peak commit; with them, the averages are 1257 and 1215.

AI use: Claude Code (Claude Opus 5.5)

**@⁠Kalmarv** on GitHub · 2026-11-24 19:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7141958086) Crash count on a retail title, `main` `64b3f35` (this PR's base) against this PR's head `1a480bc`, 10 runs each in ABBA order: RTX 5070 Ti 16 GB (NVIDIA 610.74), Ryzen 9 9950X, Windows 11 Pro 26200. Each run was `scripts/smoke.ps1` for 85 s (the first 110 s), with the same walk and data. Each crash was symbolized with that build's pdb. - **The race:** 0 of 10 on `main` and 0 of 10 here. It didn't show on `main` within 85 s either, so this can't confirm the fix. On this machine it hit once in about 55 earlier 60 s runs, at 30.8 s (`tiling::Chain::detile_level` ← `title_textures::subresources`, on #1013). - **Other ends on this PR's side (neither crash stack is in the code it changes; we did not check further):** - run 03: the title's own read at `+0xcedcee` (address `0x1`) at 61.7 s; - run 10: `D3D12Core.dll` in `SetGraphicsRootSignature` from `bind::execute_indirect` (bind.rs:237) at 76.5 s. - run 19 ran its 85 s cleanly but didn't exit; the job was ended at 360 s, so it has no block. - **On `main`:** its one crash was the title's watchdog write at `+0x23cf683` (#846), at 90.4 s in the 110 s run. Run 09 ran its 85 s but its block shows exit `0x887a0006` (DXGI device hung). - **Slow exits, both sides:** 4 runs here and 2 on `main` took 53-128 s to exit or didn't (run 19). They are the same six runs that started slowly, so this looks like one run state on both sides, not this PR. - **Cost:** presents in the first 60 s were the same, 1251 on `main` and 1261 here (101 %), averaged over the 8 and 6 runs that loaded normally. The other 2 and 4 runs started slowly on both sides, with about 15-17 GB peak commit; with them, the averages are 1257 and 1215. **AI use:** Claude Code (Claude Opus 5.5)
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 23:57 UTC · original

RDNA3 data point, since the PR's reports are RDNA4, NVIDIA and Linux: the fault reproduces on an RX 7800 XT 16 GB (driver 32.0.32029.2010, 32 GB RAM, Windows 11 26300, release) and this PR's commit removes it.

  • main 689f2db, XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512 (the title's GPU heaps outside the coherent window), A at ~13 s: XCL ends at 44.2 s – 0xc0000005 read of 0xb6928f000 in title_textures::refresh (refresh < cpu_writes < q_execute_command_lists), one run.
  • main 20cf130 + this PR's 1a480bc cherry-picked (0d51637 locally, not a clean commit of the PR), same switches and input: the run goes to its 300 s end (XCL_RUN_SECONDS), 1 364 frames, 0 device removals, one run.
  • With the defaults (heaps in the window) the fault did not appear on this card in 300 s runs.

Not tested: the full suite on this tree, the PR alone on main.

AI use: Claude Code (Claude Fable 5.1) read the logs and wrote this; the runs were mine.

**@⁠Rednaxeh** on GitHub · 2026-11-24 23:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7147986386) RDNA3 data point, since the PR's reports are RDNA4, NVIDIA and Linux: the fault reproduces on an RX 7800 XT 16 GB (driver 32.0.32029.2010, 32 GB RAM, Windows 11 26300, release) and this PR's commit removes it. - `main` `689f2db`, `XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512` (the title's GPU heaps outside the coherent window), A at ~13 s: XCL ends at 44.2 s – `0xc0000005` read of `0xb6928f000` in `title_textures::refresh` (`refresh` < `cpu_writes` < `q_execute_command_lists`), one run. - `main` `20cf130` + this PR's `1a480bc` cherry-picked (`0d51637` locally, not a clean commit of the PR), same switches and input: the run goes to its 300 s end (`XCL_RUN_SECONDS`), 1 364 frames, 0 device removals, one run. - With the defaults (heaps in the window) the fault did not appear on this card in 300 s runs. Not tested: the full suite on this tree, the PR alone on `main`. AI use: Claude Code (Claude Fable 5.1) read the logs and wrote this; the runs were mine.
Author
Owner

@⁠Anon64 on GitHub · 2026-11-25 00:34 UTC · original

Two more occurrences of this crash on main, plus an alternative I tried locally that keeps the in-place read. I'm posting the alternative here instead of opening a second PR.

The crash, on an RTX 3060 12 GB (581.80), Windows 11 26200: two retail-title runs, release builds of main 20cf130 + #1818 and main 80f4819 + #253. Each has 0xc0000005 in VCRUNTIME140.dll+0x1cc66 (memcpy) ← Chain::detile_level ← title_textures::subresources, at 36.7 s and 36.8 s, reading at 0xc49076010 and 0xc490d0000 (the second is exactly a 64 KiB boundary). That's about 2 in 25 runs here. Details are on #1359.

The alternative (local branch, commit 866987b, not pushed), which keeps title_bytes' in-place borrow and stops the memory going while it is read:

  • a RwLock TITLE_MEMORY in title_textures. subresources and the unchanged-content hash hold its read side for as long as they read title memory;
  • kernelx::free_title, which holds the write side for the duration of the raw VirtualFree only. Every decommit / release XCL makes of title memory goes through it: the VirtualFree hook, the placeholder regions, XMemFreeDefault, physical-page homes (give_back_homes, release_at, the home release in FreeTitlePhysicalPages), and sparse::free;
  • a free waits for a read in progress, and the read after it finds the range unreadable, so title_bytes goes the read_committed way and gets zeros;
  • a test (title_memory_does_not_go_while_a_texture_read_of_it_runs): one thread holds the read side over a borrowed range, another decommits it through free_title, and the test checks that the decommit waits, the borrow stays valid, and the read after it gets zeros. It passes, along with read_committed_copies_committed_pages_and_zeroes_gaps.

Trade-off against this PR:

  • No copy for readable title memory outside the coherent window; that copy is what #602 removed.
  • A title thread's free can wait for a detile batch in progress.
  • Pages that leave without a VirtualFree through XCL are not covered. That means unmapping a view, which I did not find in kernelx's runtime paths, or the title calling the system directly. Your safe copy covers those.

If you or the maintainer prefer the lock, I can open it as a PR (or you can take the diff). Otherwise this PR's approach is fine by me, and I'll run it here: the crash is frequent enough on this machine to check it.

Written with Claude Code (Claude Opus 5.5) from runs on this machine.

**@⁠Anon64** on GitHub · 2026-11-25 00:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7148661543) Two more occurrences of this crash on `main`, plus an alternative I tried locally that keeps the in-place read. I'm posting the alternative here instead of opening a second PR. **The crash, on an RTX 3060 12 GB (581.80), Windows 11 26200:** two retail-title runs, release builds of `main` `20cf130` + #1818 and `main` `80f4819` + #253. Each has `0xc0000005` in `VCRUNTIME140.dll+0x1cc66` (memcpy) ← `Chain::detile_level` ← `title_textures::subresources`, at 36.7 s and 36.8 s, reading at `0xc49076010` and `0xc490d0000` (the second is exactly a 64 KiB boundary). That's about 2 in 25 runs here. Details are on #1359. **The alternative** (local branch, commit `866987b`, not pushed), which keeps `title_bytes`' in-place borrow and stops the memory going while it is read: - a `RwLock` `TITLE_MEMORY` in `title_textures`. `subresources` and the unchanged-content hash hold its read side for as long as they read title memory; - `kernelx::free_title`, which holds the write side for the duration of the raw `VirtualFree` only. Every decommit / release XCL makes of title memory goes through it: the `VirtualFree` hook, the placeholder regions, `XMemFreeDefault`, physical-page homes (`give_back_homes`, `release_at`, the home release in `FreeTitlePhysicalPages`), and `sparse::free`; - a free waits for a read in progress, and the read after it finds the range unreadable, so `title_bytes` goes the `read_committed` way and gets zeros; - a test (`title_memory_does_not_go_while_a_texture_read_of_it_runs`): one thread holds the read side over a borrowed range, another decommits it through `free_title`, and the test checks that the decommit waits, the borrow stays valid, and the read after it gets zeros. It passes, along with `read_committed_copies_committed_pages_and_zeroes_gaps`. **Trade-off against this PR:** - No copy for readable title memory outside the coherent window; that copy is what #602 removed. - A title thread's free can wait for a detile batch in progress. - Pages that leave without a `VirtualFree` through XCL are not covered. That means unmapping a view, which I did not find in kernelx's runtime paths, or the title calling the system directly. Your safe copy covers those. If you or the maintainer prefer the lock, I can open it as a PR (or you can take the diff). Otherwise this PR's approach is fine by me, and I'll run it here: the crash is frequent enough on this machine to check it. Written with Claude Code (Claude Opus 5.5) from runs on this machine.
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-25 00:45 UTC · original

@⁠Anon64 thanks, and two more hits on a 3060 is useful data. A run of this PR on your machine, where it shows up ~2 in 25, would be the best confirmation it's gone. I'd appreciate that.

On the lock vs the copy, my take:

  • Cost: the copy no longer costs what #602 removed. Since 1a480bc it does one ReadProcessMemory over the whole range first and only walks regions when that's refused. On a 7600X, 16 KiB reads take ~1.3 µs and 4 MiB ~128–156 µs, about the in-place read plus memcpy (table in the description). So keeping the in-place borrow wouldn't buy much now.
  • Coverage: the copy is safe against every way a page can go away, including ones that don't go through XCL's VirtualFree (an unmapped view, or the title calling the system directly). The lock only covers paths routed through free_title, so a future free path that skips it would bring the crash back silently.
  • Latency: with the lock, a title thread's free waits on a detile batch in progress; the copy never blocks the title.

So I'd keep this PR's approach, but it's the maintainer's call. The lock would be a reasonable follow-up if profiling ever shows the copy mattering.

Written with Claude Code (Claude Opus 5.5).

**@⁠grahamster2** on GitHub · 2026-11-25 00:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7148852897) @⁠Anon64 thanks, and two more hits on a 3060 is useful data. A run of this PR on your machine, where it shows up ~2 in 25, would be the best confirmation it's gone. I'd appreciate that. On the lock vs the copy, my take: - **Cost:** the copy no longer costs what #602 removed. Since 1a480bc it does one `ReadProcessMemory` over the whole range first and only walks regions when that's refused. On a 7600X, 16 KiB reads take ~1.3 µs and 4 MiB ~128–156 µs, about the in-place read plus memcpy (table in the description). So keeping the in-place borrow wouldn't buy much now. - **Coverage:** the copy is safe against every way a page can go away, including ones that don't go through XCL's `VirtualFree` (an unmapped view, or the title calling the system directly). The lock only covers paths routed through `free_title`, so a future free path that skips it would bring the crash back silently. - **Latency:** with the lock, a title thread's free waits on a detile batch in progress; the copy never blocks the title. So I'd keep this PR's approach, but it's the maintainer's call. The lock would be a reasonable follow-up if profiling ever shows the copy mattering. _Written with Claude Code (Claude Opus 5.5)._
Author
Owner

@⁠Anon64 on GitHub · 2026-11-25 02:29 UTC · original

@⁠grahamster2 I meant to run this against the detile crash here (about 2 in 25 runs on main), but 1a480bc no longer merges with main cbc296a: there is a conflict in crates/xcl/src/hle/d3d12x/title_textures.rs. GitHub shows the PR as conflicting too. Since its base, that file got fb9d059 (#1986: upload batches capped by count and 32 MiB) and 971c0e5 (3D textures with packed mip tails). Once it's rebased, I'll run a loop of world loads on it and post the crash count against main's.

Written with Claude Code (Claude Opus 5.5).

**@⁠Anon64** on GitHub · 2026-11-25 02:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7150783619) @⁠grahamster2 I meant to run this against the detile crash here (about 2 in 25 runs on `main`), but `1a480bc` no longer merges with `main` `cbc296a`: there is a conflict in `crates/xcl/src/hle/d3d12x/title_textures.rs`. GitHub shows the PR as conflicting too. Since its base, that file got `fb9d059` (#1986: upload batches capped by count and 32 MiB) and `971c0e5` (3D textures with packed mip tails). Once it's rebased, I'll run a loop of world loads on it and post the crash count against `main`'s. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-25 04:44 UTC · original

@⁠Anon64 rebased onto main cbc296a, head is now 59f8e7c. It merges cleanly. The only conflict was in the tests, and #1986's batch caps are kept. The suite and a fresh smoke pair are in the description.

your crash loop against main would be really welcome, since it hits ~2 in 25 on your 3060 and I can't reproduce it on demand here.

Written with Claude Code (Claude Opus 5.5).

**@⁠grahamster2** on GitHub · 2026-11-25 04:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7153120714) @⁠Anon64 rebased onto `main` cbc296a, head is now 59f8e7c. It merges cleanly. The only conflict was in the tests, and #1986's batch caps are kept. The suite and a fresh smoke pair are in the description. your crash loop against `main` would be really welcome, since it hits ~2 in 25 on your 3060 and I can't reproduce it on demand here. _Written with Claude Code (Claude Opus 5.5)._
Author
Owner

@⁠Alm0stSurely on GitHub · 2026-11-25 05:28 UTC · original

Tested the rebased 59f8e7c on Linux/Proton Experimental with an RTX 5080 (620.73.04), Ryzen 9 9950X3D and Arch Linux 7.3.5. I applied the one-file diff to the 14d7a3c integration build. The only merge conflict was in test context.

Both title_bytes_are_copied_outside_the_coherent_window and title_bytes_leave_guard_pages_alone passed under Proton. In a matched pair of retail runs, the control stopped during the loading illustration at 50.874 s in Chain::detile_level. The patched run passed that point and reached 119.571 s before a different failure, DXGI_ERROR_DEVICE_REMOVED with VK_ERROR_DEVICE_LOST on queue submission. The capture shows the loading illustration followed by a uniform screen. This is one pair for an intermittent fault, with no frame-rate conclusion.

Both runs used the same driver build, separate copies of the same cache seed, XCL_DIRECT_DXIL=1, XCL_HEAP_WINDOWS=1, XCL_UMA_SHADOW=1, XCL_PSO_WAIT_MS=250 and VKD3D_CONFIG=ignore_shared_fence.

AI assistance: Codex (GPT-6.2 Astra) integrated the patch, ran the tests and checked the traces.

**@⁠Alm0stSurely** on GitHub · 2026-11-25 05:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7153811156) Tested the rebased `59f8e7c` on Linux/Proton Experimental with an RTX 5080 (620.73.04), Ryzen 9 9950X3D and Arch Linux 7.3.5. I applied the one-file diff to the `14d7a3c` integration build. The only merge conflict was in test context. Both `title_bytes_are_copied_outside_the_coherent_window` and `title_bytes_leave_guard_pages_alone` passed under Proton. In a matched pair of retail runs, the control stopped during the loading illustration at 50.874 s in `Chain::detile_level`. The patched run passed that point and reached 119.571 s before a different failure, `DXGI_ERROR_DEVICE_REMOVED` with `VK_ERROR_DEVICE_LOST` on queue submission. The capture shows the loading illustration followed by a uniform screen. This is one pair for an intermittent fault, with no frame-rate conclusion. Both runs used the same driver build, separate copies of the same cache seed, `XCL_DIRECT_DXIL=1`, `XCL_HEAP_WINDOWS=1`, `XCL_UMA_SHADOW=1`, `XCL_PSO_WAIT_MS=250` and `VKD3D_CONFIG=ignore_shared_fence`. AI assistance: Codex (GPT-6.2 Astra) integrated the patch, ran the tests and checked the traces.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 06:03 UTC · original

Empirical test report (59f8e7c9)

PR #751, commit 59f8e7c992dda0044d18a660aad86fae1d94185f.

Hardware / environment

  • Windows x64 build 26200 on an AMD Family 23 Model 113 CPU. The focused tests use Windows virtual memory APIs and run outside the Arc test wrapper with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1.
  • rustc 1.100.0 (0ef1bc386 2026-11-09). DXC 1.9.2609.5 (01b62ad47). Cargo test profile, unoptimized, with debug info and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run exited 0 and finished in 1m 14s.
  • cargo test -p xcl --lib 'hle::d3d12x::title_textures::tests::title_bytes_' exited 0. 3 passed, 0 failed, 0 ignored, 0 skipped, 1123 filtered out. The focused run finished in 13.49s. Counts come from case-sensitive matches against the saved output.

Observed behavior

  • title_bytes_are_copied_outside_the_coherent_window passed. The assertions verified a separate copy outside the coherent window, zeros in a decommitted hole even after buffer reuse, and an in-place read inside the 512 MiB coherent window. The oversized-buffer assertion is conditional on a successful allocation and the fixture does not log that branch.
  • title_bytes_survive_concurrent_decommit passed. The fixture completed 2,000 read-and-hash iterations while another thread decommitted and recommitted pages. The read-content assertions passed and the test confirmed that decommits overlapped hashing.
  • title_bytes_leave_guard_pages_alone passed. The guard and no-access pages read as zeros, and Windows still reported the guard flag afterward.

Not tested

The full GPU workspace suite and game smoke runs were omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr751-focused.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 06:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7154389986) ### Empirical test report (59f8e7c9) PR #751, commit `59f8e7c992dda0044d18a660aad86fae1d94185f`. **Hardware / environment** - Windows x64 build 26200 on an AMD Family 23 Model 113 CPU. The focused tests use Windows virtual memory APIs and run outside the Arc test wrapper with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. - `rustc 1.100.0 (0ef1bc386 2026-11-09)`. DXC 1.9.2609.5 (01b62ad47). Cargo test profile, unoptimized, with debug info and incremental compilation disabled. **Commands and results** - `cargo test --workspace --no-run` exited 0 and finished in 1m 14s. - `cargo test -p xcl --lib 'hle::d3d12x::title_textures::tests::title_bytes_'` exited 0. 3 passed, 0 failed, 0 ignored, 0 skipped, 1123 filtered out. The focused run finished in 13.49s. Counts come from case-sensitive matches against the saved output. **Observed behavior** - `title_bytes_are_copied_outside_the_coherent_window` passed. The assertions verified a separate copy outside the coherent window, zeros in a decommitted hole even after buffer reuse, and an in-place read inside the 512 MiB coherent window. The oversized-buffer assertion is conditional on a successful allocation and the fixture does not log that branch. - `title_bytes_survive_concurrent_decommit` passed. The fixture completed 2,000 read-and-hash iterations while another thread decommitted and recommitted pages. The read-content assertions passed and the test confirmed that decommits overlapped hashing. - `title_bytes_leave_guard_pages_alone` passed. The guard and no-access pages read as zeros, and Windows still reported the guard flag afterward. **Not tested** The full GPU workspace suite and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr751-focused.log` and published.
Author
Owner

@⁠JRamos1993 on GitHub · 2026-11-25 07:08 UTC · original

Another instance of the fault this fixes, on current main 568e7db (RTX 5090, MSVC release, retail title, XCL_NETWORK=0).

One of two 300 s runs ended at 42.7 s with unhandled exception 0xc0000005 in VCRUNTIME140.dll (a read of an unmapped address). XCL's frames, named with the build's xcl.pdb:

VCRUNTIME140.dll (memcpy) < xcl::hle::d3d12x::title_textures::title_bytes < xcl::hle::d3d12x::title_textures::subresources < … subresources_on::closure (worker thread)

This is the path this PR moves to the safe copy. The other run, same build, did not hit it, so this is a race and one run doesn't give a rate. I have not run this PR's head to compare.

AI use: Claude Code with Claude Opus 5.5 ran the title, looked up the frames and wrote this. No title data beyond XCL's own frames.

**@⁠JRamos1993** on GitHub · 2026-11-25 07:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7155537731) **Another instance of the fault this fixes, on current `main` `568e7db` (RTX 5090, MSVC release, retail title, `XCL_NETWORK=0`).** One of two 300 s runs ended at 42.7 s with `unhandled exception 0xc0000005 in VCRUNTIME140.dll` (a read of an unmapped address). XCL's frames, named with the build's `xcl.pdb`: ``` VCRUNTIME140.dll (memcpy) < xcl::hle::d3d12x::title_textures::title_bytes < xcl::hle::d3d12x::title_textures::subresources < … subresources_on::closure (worker thread) ``` This is the path this PR moves to the safe copy. The other run, same build, did not hit it, so this is a race and one run doesn't give a rate. I have not run this PR's head to compare. AI use: Claude Code with Claude Opus 5.5 ran the title, looked up the frames and wrote this. No title data beyond XCL's own frames.
Author
Owner

@⁠imnicho on GitHub · 2026-11-25 08:09 UTC · original

RTX 5080: the same fault twice without this, none in two long runs with it

  • Without it: two runs of the retail title of #505 (my own copy) on trees based on #2057 at f862f5f (with #684, #266 and others that do not touch these files) ended 598 s and 680 s after the world's set-up with 0xc0000005 in a memory copy, a read of a page-aligned address in the title's own memory (above the coherent window). Resolved with each build's PDB, both are gpu::tiling::Chain::detile_level ← title_textures::subresources ← a subresources_on worker, the stack in the description.
  • With it: 59f8e7c cherry-picked onto #2057 at 41303e4 (+ #2067, #684, #266, #1515, #495, #1405). One conflict block in title_textures.rs, that branch's timing lines around the content hash against this PR's with_title_bytes; I kept the timing and read through with_title_bytes. Two runs, 1,351 s and 283 s in the world: no such fault. The second ended for another reason (the device was lost as video memory ran out on this 16 GB card).

Setup: RTX 5080 16 GB (driver 610.47), i7-7700K, 16 GB RAM, Windows 10 22H2, release, XCL_NETWORK=0, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, scripted pad, nothing skipped; XCL_UMA_SHADOW=1 in every run but the first.

Not tested: this head on main by itself, and the suite on it. Two runs do not show that the fault is gone, only that it did not come in 27 minutes of world where it came after 10 and 11 before.

AI use: Claude Code with Claude Fable 5.2 ran the title, resolved the stacks and wrote this.

**@⁠imnicho** on GitHub · 2026-11-25 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7156677660) **RTX 5080: the same fault twice without this, none in two long runs with it** - **Without it**: two runs of the retail title of #505 (my own copy) on trees based on #2057 at `f862f5f` (with #684, #266 and others that do not touch these files) ended 598 s and 680 s after the world's set-up with `0xc0000005` in a memory copy, a read of a page-aligned address in the title's own memory (above the coherent window). Resolved with each build's PDB, both are `gpu::tiling::Chain::detile_level` ← `title_textures::subresources` ← a `subresources_on` worker, the stack in the description. - **With it**: `59f8e7c` cherry-picked onto #2057 at `41303e4` (+ #2067, #684, #266, #1515, #495, #1405). One conflict block in `title_textures.rs`, that branch's timing lines around the content hash against this PR's `with_title_bytes`; I kept the timing and read through `with_title_bytes`. Two runs, 1,351 s and 283 s in the world: no such fault. The second ended for another reason (the device was lost as video memory ran out on this 16 GB card). Setup: RTX 5080 16 GB (driver 610.47), i7-7700K, 16 GB RAM, Windows 10 22H2, release, `XCL_NETWORK=0`, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`, scripted pad, nothing skipped; `XCL_UMA_SHADOW=1` in every run but the first. **Not tested**: this head on `main` by itself, and the suite on it. Two runs do not show that the fault is gone, only that it did not come in 27 minutes of world where it came after 10 and 11 before. AI use: Claude Code with Claude Fable 5.2 ran the title, resolved the stacks and wrote this.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 11:28 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 11:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7161101181) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠anes66 on GitHub · 2026-11-25 14:31 UTC · original

CPU-only lifetime checks passed on exact head 59f8e7c992dda0044d18a660aad86fae1d94185f. Optional test companion 8cc4513 adds one test directly on that head.

Tested

  • Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug.
  • The new isolated-process test allocates a plain readable region of 12,305 bytes and checks that with_title_bytes copies it before invoking the consumer. Changing and then decommitting the original region leaves the consumer's snapshot unchanged.
  • While that outer snapshot holds the thread-local buffer, a nested read of the decommitted region exercises the reentrant fallback: it returns zeros without changing the outer snapshot. The address reservation remains held until the test ends, preventing address reuse. The real D3D12 device pointer is null before and after the check.
  • cargo test --locked -p xcl --lib title_bytes_ -j 2 -- --nocapture --test-threads=1, with XCL_UMA_MB=1 and XCL_COHERENT_MB=1: 4 passed / 0 failed / 0 ignored / 0 skips, including the existing copy, concurrent-decommit and guard-page tests.
  • Negative control: temporarily restoring the readable-region borrow makes the new test fail at the pointer-alias assertion, before decommit. Restored before the final passing run and commit.

Not tested
GPU execution, a title, release, full workspace or integration onto newer main. This verifies snapshot lifetime and the nested fallback; it does not establish that a particular title crash is fixed.

**@⁠anes66** on GitHub · 2026-11-25 14:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7165407892) CPU-only lifetime checks passed on exact head `59f8e7c992dda0044d18a660aad86fae1d94185f`. Optional test companion [8cc4513](https://github.com/anes66/xcl/commit/8cc4513) adds one test directly on that head. **Tested** - Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. - The new isolated-process test allocates a plain readable region of 12,305 bytes and checks that `with_title_bytes` copies it before invoking the consumer. Changing and then decommitting the original region leaves the consumer's snapshot unchanged. - While that outer snapshot holds the thread-local buffer, a nested read of the decommitted region exercises the reentrant fallback: it returns zeros without changing the outer snapshot. The address reservation remains held until the test ends, preventing address reuse. The real D3D12 device pointer is null before and after the check. - `cargo test --locked -p xcl --lib title_bytes_ -j 2 -- --nocapture --test-threads=1`, with `XCL_UMA_MB=1` and `XCL_COHERENT_MB=1`: **4 passed / 0 failed / 0 ignored / 0 skips**, including the existing copy, concurrent-decommit and guard-page tests. - Negative control: temporarily restoring the readable-region borrow makes the new test fail at the pointer-alias assertion, before decommit. Restored before the final passing run and commit. **Not tested** GPU execution, a title, release, full workspace or integration onto newer main. This verifies snapshot lifetime and the nested fallback; it does not establish that a particular title crash is fixed.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 08:21 UTC · original · edited 2026-11-25 16:34 UTC

NVIDIA test report for 59f8e7c. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug. The PR is merged onto main 568e7db, with main run as a control on the same machine.

  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1155 passed, 1 failed, 46 ignored. main 568e7db: 1153 passed, 1 failed, 46 ignored.
    • The one failure is test_title_runs_and_game_folder_is_untouched in both, because my build step ran only cargo build --workspace --tests, so xcl_testtitle.exe and testgame_mw.dll, built from the repository's tests/testtitle, were missing (the panic says "build first: cargo build --workspace"). So the end-to-end test did not run here.
    • SKIPPED (25 in both): mostly no wave64, plus cannot disable the driver cache and no heap windows.

Added 16:34Z: whole workspace on this head, after cargo build --workspace (the earlier run's one failure was the end-to-end test missing the test title, which only that build makes). Head 59f8e7c as is (base cbc296a), RTX 3070 (616.56), Windows 11, debug, cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2:

  • 59f8e7c: 1147 passed, 0 failed, 46 ignored. The end-to-end title tests pass.
  • main 0829441 on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests).
  • Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. The PR doesn't touch it.
  • SKIPPED lines: 25: no wave64 on this card, f16/f32/integer forms the direct path refuses, no heap windows, and one PSO measurement that needs Developer Mode to turn the driver cache off.

AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.

**@⁠upipibi** on GitHub · 2026-11-25 08:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7156917485) · edited 2026-11-25 16:34 UTC NVIDIA test report for `59f8e7c`. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug. The PR is merged onto `main` `568e7db`, with `main` run as a control on the same machine. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: **1155 passed, 1 failed**, 46 ignored. `main` `568e7db`: 1153 passed, 1 failed, 46 ignored. - The one failure is `test_title_runs_and_game_folder_is_untouched` in both, because my build step ran only `cargo build --workspace --tests`, so `xcl_testtitle.exe` and `testgame_mw.dll`, built from the repository's `tests/testtitle`, were missing (the panic says "build first: cargo build --workspace"). So the end-to-end test did not run here. - SKIPPED (25 in both): mostly `no wave64`, plus `cannot disable the driver cache` and `no heap windows`. --- **Added 16:34Z: whole workspace on this head, after `cargo build --workspace`** (the earlier run's one failure was the end-to-end test missing the test title, which only that build makes). Head `59f8e7c` as is (base `cbc296a`), RTX 3070 (616.56), Windows 11, debug, `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: - `59f8e7c`: **1147 passed, 0 failed, 46 ignored**. The end-to-end title tests pass. - `main` `0829441` on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests). - Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. The PR doesn't touch it. - SKIPPED lines: 25: no wave64 on this card, f16/f32/integer forms the direct path refuses, no heap windows, and one PSO measurement that needs Developer Mode to turn the driver cache off. AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
Author
Owner

@⁠iggyvilla on GitHub · 2026-11-25 18:57 UTC · original

AMD (RDNA2) test report for 59f8e7c: on this card the walk hit the crash this PR fixes in 2 of 3 runs without it, and in 0 of 3 with it.

Tested (commit 59f8e7c of #751, merged onto a local branch (on main 55d64c2) that stops binds from building cold pipelines on the title thread (to be opened as its own PR); merge commit cdec05c, no conflicts)

  • AMD Radeon RX 6650 XT 8 GB (RDNA2), driver 32.0.21045.29003, Ryzen 7 5700X, 32 GB RAM + 64 GB pagefile, Windows 11 26300, rustc 1.100.0, release build.
  • cargo test -p xcl --lib title_textures -- --test-threads=4: 21 passed, 0 failed, 0 ignored (includes title_bytes_survive_concurrent_decommit, read_committed_tolerates_concurrent_decommit, title_bytes_are_copied_outside_the_coherent_window, title_bytes_leave_guard_pages_alone). The whole workspace suite was not run on the merged tree.
  • Retail title walk (restored save, no network, 360 s, 3 runs): 0 crashes, all 3 presented to the end. Before this change, the same walk on the same base without #751 died twice in 3 runs at 317 s and 321 s with 0xc0000005 in VCRUNTIME140 (memcpy of 8/16 bytes from a 64 KiB-aligned address, called from Chain::detile_level <- title_textures::subresources on a subresources_on worker thread), i.e. the crash this PR describes.
  • Small sample (3 vs 3); the walk also needs that local branch to get past the 126 s world-load stall at all, so main alone does not reach the point where the crash occurs.

Not tested

  • #751 on main alone (main stalls at ~126-142 s on this title before textures stream long enough); NVIDIA / other GPUs; the whole workspace suite and a scripts/smoke.ps1 regression run on the merged tree.

AI use

  • The walks, builds and tests were run, and the report drafted, by Claude Code (Claude Sonnet 5.5).
  • The crash stacks were resolved by Claude Code (Claude Sonnet 5.5 and Claude Opus 5.5); an agent on Muse Spark (Meta) matched them to this PR.
  • Claude Code (Claude Opus 5.5) edited the report, checked the three walk logs for crash lines, and posted it. The account owner did not read it before it was posted.
**@⁠iggyvilla** on GitHub · 2026-11-25 18:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7171630942) AMD (RDNA2) test report for `59f8e7c`: on this card the walk hit the crash this PR fixes in 2 of 3 runs without it, and in 0 of 3 with it. **Tested** (commit `59f8e7c` of #751, merged onto a local branch (on main `55d64c2`) that stops binds from building cold pipelines on the title thread (to be opened as its own PR); merge commit cdec05c, no conflicts) - AMD Radeon RX 6650 XT 8 GB (RDNA2), driver 32.0.21045.29003, Ryzen 7 5700X, 32 GB RAM + 64 GB pagefile, Windows 11 26300, rustc 1.100.0, release build. - `cargo test -p xcl --lib title_textures -- --test-threads=4`: 21 passed, 0 failed, 0 ignored (includes `title_bytes_survive_concurrent_decommit`, `read_committed_tolerates_concurrent_decommit`, `title_bytes_are_copied_outside_the_coherent_window`, `title_bytes_leave_guard_pages_alone`). The whole workspace suite was not run on the merged tree. - Retail title walk (restored save, no network, 360 s, 3 runs): **0 crashes, all 3 presented to the end**. Before this change, the same walk on the same base without #751 died twice in 3 runs at 317 s and 321 s with `0xc0000005` in VCRUNTIME140 (memcpy of 8/16 bytes from a 64 KiB-aligned address, called from `Chain::detile_level` <- `title_textures::subresources` on a `subresources_on` worker thread), i.e. the crash this PR describes. - Small sample (3 vs 3); the walk also needs that local branch to get past the 126 s world-load stall at all, so main alone does not reach the point where the crash occurs. **Not tested** - #751 on `main` alone (main stalls at ~126-142 s on this title before textures stream long enough); NVIDIA / other GPUs; the whole workspace suite and a `scripts/smoke.ps1` regression run on the merged tree. **AI use** - The walks, builds and tests were run, and the report drafted, by Claude Code (Claude Sonnet 5.5). - The crash stacks were resolved by Claude Code (Claude Sonnet 5.5 and Claude Opus 5.5); an agent on Muse Spark (Meta) matched them to this PR. - Claude Code (Claude Opus 5.5) edited the report, checked the three walk logs for crash lines, and posted it. The account owner did not read it before it was posted.
Author
Owner

@⁠ClosetPie107 on GitHub · 2026-11-25 20:04 UTC · original

Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head 59f8e7c992dda0044d18a660aad86fae1d94185f (merged cleanly onto main 2898511).

Hardware & environment

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux
  • Proton Experimental (experimental-11.0-20261112), vkd3d-proton master ec207194 (3.2.0) + dxil-spirv b540c8a2 + relaxed-vtable patch (-Db_ndebug=true), DXVK v3.1.1-209, DXC 1.9.2609.5, Rust x86_64-pc-windows-gnu (debug for tests, release for retail)

Unit / GPU tests (XCL_REQUIRE_GPU=wave64, XCL_DXC_DIR, VKD3D_CONFIG=ignore_shared_fence, --test-threads=1 --nocapture)

  • hle::d3d12x::title_textures: 21 passed, 0 failed, 0 ignored (0 skipped)
    • Includes title_bytes_survive_concurrent_decommit, title_bytes_leave_guard_pages_alone, and title_bytes_are_copied_outside_the_coherent_window.

Retail title (300 s, main 2898511 + #751)

  • Prior to testing #751, we independently hit this exact crash twice on main 2898511 without #751 (symbolized: core::ptr::copy_nonoverlapping ← title_textures::subresources ← subresources_on worker):
    • 161.8 s on clean main 2898511: two worker threads simultaneously faulted (0xc0000005 in ucrtbase.dll+0x1724d reading 0x7a0b15cb8 and 0x7a9b10000).
    • 268.4 s on main 2898511 + 4 unrelated PRs: 0xc0000005 in ucrtbase.dll+0x1724d reading 0x793a08000.
  • With #751 on main 2898511 (XCL_DIRECT_DXIL=1, XCL_TEXTURE_LEVEL_PAGES=1, XCL_PSO_WAIT_MS=50, XCL_SPLIT_MIDLIST_WAIT=0, XCL_COHERENT_MB=1024, VKD3D_CONFIG=ignore_shared_fence, XCL_PSO_PRELOAD=0, XCL_NETWORK=0):
    • Completed the full 300 s (exit=0) with 0 crashes and 0 device removals.
    • 26,998 translated draws, 71,832 dispatches (+ 1,591 chained split-compute across 190 split programs), 25,649 Opus packets (0 errors), 13.4 GiB peak VRAM (0 GTT spill), 15.7 GiB peak RSS.
    • (The decommit race is intermittent so one clean 300 s run is a positive data point rather than a statistical proof, alongside the deterministic title_bytes_survive_concurrent_decommit pass.)

Not tested

  • Full workspace test suite, native Windows, or multi-run statistical comparison of the intermittent decommit crash rate.

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) merged the PR onto main, ran the tests and 300 s retail run under Proton on this machine, symbolized the baseline crashes, and drafted this report.
**@⁠ClosetPie107** on GitHub · 2026-11-25 20:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7173159641) Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head `59f8e7c992dda0044d18a660aad86fae1d94185f` (merged cleanly onto `main` `2898511`). **Hardware & environment** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux - Proton Experimental (`experimental-11.0-20261112`), `vkd3d-proton` `master` `ec207194` (3.2.0) + `dxil-spirv` `b540c8a2` + relaxed-vtable patch (`-Db_ndebug=true`), DXVK `v3.1.1-209`, DXC `1.9.2609.5`, Rust `x86_64-pc-windows-gnu` (debug for tests, release for retail) **Unit / GPU tests** (`XCL_REQUIRE_GPU=wave64`, `XCL_DXC_DIR`, `VKD3D_CONFIG=ignore_shared_fence`, `--test-threads=1 --nocapture`) - `hle::d3d12x::title_textures`: **21 passed, 0 failed, 0 ignored** (0 skipped) - Includes `title_bytes_survive_concurrent_decommit`, `title_bytes_leave_guard_pages_alone`, and `title_bytes_are_copied_outside_the_coherent_window`. **Retail title (300 s, `main` `2898511` + `#751`)** - Prior to testing `#751`, we independently hit this exact crash twice on `main` `2898511` without `#751` (symbolized: `core::ptr::copy_nonoverlapping` ← `title_textures::subresources` ← `subresources_on` worker): - `161.8 s` on clean `main` `2898511`: two worker threads simultaneously faulted (`0xc0000005` in `ucrtbase.dll+0x1724d` reading `0x7a0b15cb8` and `0x7a9b10000`). - `268.4 s` on `main` `2898511` + 4 unrelated PRs: `0xc0000005` in `ucrtbase.dll+0x1724d` reading `0x793a08000`. - With `#751` on `main` `2898511` (`XCL_DIRECT_DXIL=1`, `XCL_TEXTURE_LEVEL_PAGES=1`, `XCL_PSO_WAIT_MS=50`, `XCL_SPLIT_MIDLIST_WAIT=0`, `XCL_COHERENT_MB=1024`, `VKD3D_CONFIG=ignore_shared_fence`, `XCL_PSO_PRELOAD=0`, `XCL_NETWORK=0`): - Completed the full **300 s (`exit=0`)** with **0 crashes** and **0 device removals**. - `26,998` translated draws, `71,832` dispatches (+ `1,591` chained split-compute across `190` split programs), `25,649` Opus packets (0 errors), `13.4 GiB` peak VRAM (0 GTT spill), `15.7 GiB` peak RSS. - (The decommit race is intermittent so one clean 300 s run is a positive data point rather than a statistical proof, alongside the deterministic `title_bytes_survive_concurrent_decommit` pass.) **Not tested** - Full workspace test suite, native Windows, or multi-run statistical comparison of the intermittent decommit crash rate. **AI use** - T3 Code / Antigravity (Gemini 4 Neon) merged the PR onto `main`, ran the tests and 300 s retail run under Proton on this machine, symbolized the baseline crashes, and drafted this report.
Author
Owner

@⁠treybertram06 on GitHub · 2026-11-25 22:44 UTC · original

Test report: #751 at 59f8e7c on an RTX 3080

Summary: the full suite passes, and a retail title runs with no regression I could measure. The crash this fixes is real on this machine. In 91 earlier runs of the same title on another tree (#2057's integration branch), 3 ended in an access violation in a memcpy reading a 64 KiB page the title had unmapped 3 ms before. That's the pattern @⁠MacieGx symbolized in title_textures::Source::bytes on #505. At that rate (about 3 %), a handful of runs can't show it's gone, so the retail part below is a regression check only.

Setup: RTX 3080 10 GB (driver 621.40 / 32.0.16.2140), Ryzen 9 5900X, Windows 11 26300, Rust 1.100.0. Tests in debug, runs in release, DXC 1.9.2609.5.

Tested

  • cargo test --workspace --no-fail-fast -- --test-threads=4 at 59f8e7c: 1156 passed, 0 failed, 46 ignored.
  • The PR's own tests pass:
    • title_bytes_are_copied_outside_the_coherent_window;
    • title_bytes_survive_concurrent_decommit;
    • title_bytes_leave_guard_pages_alone;
    • read_committed_tolerates_concurrent_decommit;
    • read_committed_copies_committed_pages_and_zeroes_gaps.
  • 24 SKIPPED:
    • 20 no wave64;
    • 1 no heap windows;
    • 3 refused for the #1426 f16 / VOP3 semantics.
  • scripts/smoke.ps1 (60 s) at 59f8e7c:
xcl-smoke v1
commit: 59f8e7c992dda0044d18a660aad86fae1d94185f
gpu: NVIDIA GeForce RTX 3080
title: 4ba6c38e
seconds: 60
exit: 0x0
frames shown: 1490 (PresentX 1490)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16493 MB
  • Retail world load, A/B: the PR's base cbc296a against 59f8e7c, the same title through world loading, 3 runs each, alternating, up to 600 s each, XCL_DIRECT_DXIL=1 XCL_UMA_SHADOW=1.
base cbc296a this PR 59f8e7c
access violations 0 / 3 0 / 3
0x887a0005 removals 1 / 3 (186 s) 2 / 3 (125 s, 415 s)
frames in the first minute 1335, 1255, 1386 1311, 1226, 1226
  • The removals are the silent driver one of #2403 (empty DRED, no event). They happen on both sides, and this PR doesn't touch that path.
  • The first-minute frames are 5 % lower on average with the PR. That's within the spread of three runs, so I don't read it as a cost of the copy.
  • I couldn't compare the detile and compare times directly. On main the texture submit cost lines print every 1,024 submits, and both builds stop submitting at the world load's whole-form stall (#2404) before that.

Not tested

  • That the crash is gone. It needs far more runs at a ~3 % rate, or a forced decommit during a read in the title.
  • AMD and Intel GPUs, and Linux / Wine.

AI use: Claude Code with Claude Opus 5.5. It ran the builds, tests and runs on this machine and wrote this report.

**@⁠treybertram06** on GitHub · 2026-11-25 22:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7176733413) ### Test report: #751 at `59f8e7c` on an RTX 3080 **Summary:** the full suite passes, and a retail title runs with no regression I could measure. The crash this fixes is real on this machine. In 91 earlier runs of the same title on another tree (#2057's integration branch), 3 ended in an access violation in a `memcpy` reading a 64 KiB page the title had unmapped 3 ms before. That's the pattern @⁠MacieGx symbolized in `title_textures::Source::bytes` on #505. At that rate (about 3 %), a handful of runs can't show it's gone, so the retail part below is a regression check only. **Setup:** RTX 3080 10 GB (driver 621.40 / 32.0.16.2140), Ryzen 9 5900X, Windows 11 26300, Rust 1.100.0. Tests in debug, runs in release, DXC 1.9.2609.5. **Tested** - `cargo test --workspace --no-fail-fast -- --test-threads=4` at `59f8e7c`: **1156 passed, 0 failed, 46 ignored**. - The PR's own tests pass: - `title_bytes_are_copied_outside_the_coherent_window`; - `title_bytes_survive_concurrent_decommit`; - `title_bytes_leave_guard_pages_alone`; - `read_committed_tolerates_concurrent_decommit`; - `read_committed_copies_committed_pages_and_zeroes_gaps`. - 24 `SKIPPED`: - 20 `no wave64`; - 1 `no heap windows`; - 3 refused for the #1426 f16 / VOP3 semantics. - `scripts/smoke.ps1` (60 s) at `59f8e7c`: ``` xcl-smoke v1 commit: 59f8e7c992dda0044d18a660aad86fae1d94185f gpu: NVIDIA GeForce RTX 3080 title: 4ba6c38e seconds: 60 exit: 0x0 frames shown: 1490 (PresentX 1490) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16493 MB ``` - **Retail world load, A/B:** the PR's base `cbc296a` against `59f8e7c`, the same title through world loading, 3 runs each, alternating, up to 600 s each, `XCL_DIRECT_DXIL=1 XCL_UMA_SHADOW=1`. | | base `cbc296a` | this PR `59f8e7c` | |---|---|---| | access violations | 0 / 3 | 0 / 3 | | `0x887a0005` removals | 1 / 3 (186 s) | 2 / 3 (125 s, 415 s) | | frames in the first minute | 1335, 1255, 1386 | 1311, 1226, 1226 | - The removals are the silent driver one of #2403 (empty DRED, no event). They happen on both sides, and this PR doesn't touch that path. - The first-minute frames are 5 % lower on average with the PR. That's within the spread of three runs, so I don't read it as a cost of the copy. - I couldn't compare the detile and compare times directly. On `main` the texture `submit cost` lines print every 1,024 submits, and both builds stop submitting at the world load's whole-form stall (#2404) before that. **Not tested** - That the crash is gone. It needs far more runs at a ~3 % rate, or a forced decommit during a read in the title. - AMD and Intel GPUs, and Linux / Wine. **AI use:** Claude Code with Claude Opus 5.5. It ran the builds, tests and runs on this machine and wrote this report.
Author
Owner

@⁠St5sz2Jk on GitHub · 2026-11-26 01:10 UTC · original

With #871 (AMD / Linux / Wine): one conflict in title_textures.rs, resolved, and a 25-minute run with no crash. One run.

The conflict: #871 reads the coherent window through copy_committed_region under Wine (its wine_coherent case in title_bytes). This PR reads it in place. I kept #871's rule under Wine:

  • In read_committed_into, the coherent-window branch calls copy_committed_region(at, out.as_mut_ptr(), len); return;.
  • In with_title_bytes, the in-place branch is !crate::util::under_wine() && … in_committed_window(at, len).
  • title_bytes_are_copied_outside_the_coherent_window then checks the in-place pointer only outside Wine.

Tests (Wine + vkd3d-proton, RX 9070 XT, RADV):

  • cargo test -p xcl --lib title_textures::: 21 passed when each test runs alone.
  • With --test-threads=4, placed_title_textures_share_vram_and_preserve_pixels fails ("reusing unaligned va must share extra_pages tile") and takes a lock-poisoning failure with it. It passes alone, and it also passes alone without this PR.

The title: main 55d64c2 + #871 + #684 + #2357 + #1993 (with one line, see there) + this PR at 59f8e7c.

  • It ran the full 1,500 s into the opening cutscene, exit 0.
  • Without this PR, three runs of very similar trees ended at 7–19 min in a ucrtbase memcpy. I symbolized one of them: it was under title_textures::subresources, the crash this PR is about.

AI use: Claude Code (Claude Opus 5.5) resolved the merge, ran the tests and the title, and wrote this.

**@⁠St5sz2Jk** on GitHub · 2026-11-26 01:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7179515812) **With #871 (AMD / Linux / Wine): one conflict in `title_textures.rs`, resolved, and a 25-minute run with no crash.** One run. **The conflict:** #871 reads the coherent window through `copy_committed_region` under Wine (its `wine_coherent` case in `title_bytes`). This PR reads it in place. I kept #871's rule under Wine: - In `read_committed_into`, the coherent-window branch calls `copy_committed_region(at, out.as_mut_ptr(), len); return;`. - In `with_title_bytes`, the in-place branch is `!crate::util::under_wine() && … in_committed_window(at, len)`. - `title_bytes_are_copied_outside_the_coherent_window` then checks the in-place pointer only outside Wine. **Tests** (Wine + vkd3d-proton, RX 9070 XT, RADV): - `cargo test -p xcl --lib title_textures::`: 21 passed when each test runs alone. - With `--test-threads=4`, `placed_title_textures_share_vram_and_preserve_pixels` fails ("reusing unaligned va must share extra_pages tile") and takes a lock-poisoning failure with it. It passes alone, and it also passes alone without this PR. **The title:** `main` `55d64c2` + #871 + #684 + #2357 + #1993 (with one line, see [there](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1993)) + this PR at `59f8e7c`. - It ran the full 1,500 s into the opening cutscene, exit 0. - Without this PR, three runs of very similar trees ended at 7–19 min in a `ucrtbase` memcpy. I symbolized one of them: it was under `title_textures::subresources`, the crash this PR is about. **AI use:** Claude Code (Claude Opus 5.5) resolved the merge, ran the tests and the title, and wrote this.
@ -1113,0 +1125,4 @@
// `ReadProcessMemory` refuses a range with a page that is not committed, no-access or a guard
// page (and leaves the guard in place: `title_bytes_leave_guard_pages_alone`).
let mut read = 0usize;
if len == 0 || ReadProcessMemory(GetCurrentProcess(), at as *const c_void, out.as_mut_ptr() as *mut c_void, len, &mut read) != 0 {
Author
Owner

@⁠pickles976 on GitHub · 2026-11-25 16:48 UTC · original

Wine 11 guard-page regression in the one-copy fast path, with a small correction tested locally.

I ported 59f8e7c992dda0044d18a660aad86fae1d94185f unchanged onto my existing XCL integration (base 06c9f5505f63f10c5ec49ef932d75b2c28177324, including #867/#1395/#1069/#1916/#615/#495/#1182/#2177). This is not a clean-head test. Host: Linux 6.17.0-40-generic, Wine 11.0, i7-13620H, RTX 4060 Laptop 8 GB, 16 GB RAM; Rust 1.98.1 MSVC cross-build. These focused tests are CPU memory tests, not GPU coverage.

Before this PR: a title-loading run crashed with 0xc0000005 in ucrtbase.dll. Its release PDB resolves the stack to Chain::detile_level (copy_from_slice) ← title_textures::subresources ← a subresources_on worker. Last successful GPU telemetry was 6,388 MiB. This matches the already reported intermittent fault; it is not an OOM diagnosis.

With this PR, before the suggestion below: cargo test -p xcl --lib --target x86_64-pc-windows-msvc title_bytes -- --test-threads=1 --nocapture under the Wine runner produced 2 passed, 1 failed. title_bytes_leave_guard_pages_alone failed at guard and no-access pages read as zeros; the copy/coherent-window and concurrent-decommit tests passed. XCL_UMA_MB=256 XCL_COHERENT_MB=64 were set, and the fixture reported a 256 MiB coherent window.

Wine 11's NtReadVirtualMemory implements the current-process pseudo-handle path as memmove inside exception handling. The unconditional read can therefore touch a guard before the fallback checks protections. Walking regions first on Wine avoids that; the existing util::under_wine() predicate is already present at this PR's head. Native Windows keeps the fast path.

    // Native Windows refuses a range containing an uncommitted, no-access or guard page.
    // Wine's current-process ReadProcessMemory uses memmove and consumes PAGE_GUARD on fault;
    // walk protections first there so existing guards are not touched.
    let mut read = 0usize;
    if len == 0 || (!crate::util::under_wine() && ReadProcessMemory(GetCurrentProcess(), at as *const c_void, out.as_mut_ptr() as *mut c_void, len, &mut read) != 0) {

With this suggestion, tests unchanged: the title_bytes filter passed 3/3, including guard preservation; the read_committed filter passed 2/2. No ignored/skipped tests; the coherent-window branch was exercised. The release build passed. I did not repeat the failing unmodified run or run the full suite. Native Windows and read-copy performance were not measured.

One title follow-up with this correction: last resource sample at 111.54 s, GPU 7,561 MiB; the external 7,500 MiB guard then stopped the launch (exit 143). Minimum available system RAM was 2,725.6 MiB and free disk stayed above 13.29 GiB. The log contains no unhandled-exception/device-loss/OOM marker; unrelated DXGI display diagnostics remain. Last captured frames are loading artwork, not gameplay. This short, resource-stopped run cannot establish that the intermittent title fault is eliminated or that 30 fps gameplay works.

AI assistance: omp / openai-codex/gpt-6-astra investigated the recorded crash, ported the existing PR, wrote and tested this small Wine correction, and drafted/submitted this report at the repository owner's request.

**@⁠pickles976** on GitHub · 2026-11-25 16:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#discussion_r4697977896) Wine 11 guard-page regression in the one-copy fast path, with a small correction tested locally. I ported `59f8e7c992dda0044d18a660aad86fae1d94185f` unchanged onto my existing XCL integration (base `06c9f5505f63f10c5ec49ef932d75b2c28177324`, including #867/#1395/#1069/#1916/#615/#495/#1182/#2177). This is **not a clean-head test**. Host: Linux 6.17.0-40-generic, Wine 11.0, i7-13620H, RTX 4060 Laptop 8 GB, 16 GB RAM; Rust 1.98.1 MSVC cross-build. These focused tests are CPU memory tests, not GPU coverage. **Before this PR:** a title-loading run crashed with `0xc0000005` in `ucrtbase.dll`. Its release PDB resolves the stack to `Chain::detile_level` (`copy_from_slice`) ← `title_textures::subresources` ← a `subresources_on` worker. Last successful GPU telemetry was 6,388 MiB. This matches the already reported intermittent fault; it is not an OOM diagnosis. **With this PR, before the suggestion below:** `cargo test -p xcl --lib --target x86_64-pc-windows-msvc title_bytes -- --test-threads=1 --nocapture` under the Wine runner produced **2 passed, 1 failed**. `title_bytes_leave_guard_pages_alone` failed at `guard and no-access pages read as zeros`; the copy/coherent-window and concurrent-decommit tests passed. `XCL_UMA_MB=256 XCL_COHERENT_MB=64` were set, and the fixture reported a 256 MiB coherent window. Wine 11's [`NtReadVirtualMemory`](https://github.com/wine-mirror/wine/blob/wine-11.0/dlls/ntdll/unix/virtual.c#L6558-L6593) implements the current-process pseudo-handle path as `memmove` inside exception handling. The unconditional read can therefore touch a guard before the fallback checks protections. Walking regions first on Wine avoids that; the existing `util::under_wine()` predicate is already present at this PR's head. Native Windows keeps the fast path. ```suggestion // Native Windows refuses a range containing an uncommitted, no-access or guard page. // Wine's current-process ReadProcessMemory uses memmove and consumes PAGE_GUARD on fault; // walk protections first there so existing guards are not touched. let mut read = 0usize; if len == 0 || (!crate::util::under_wine() && ReadProcessMemory(GetCurrentProcess(), at as *const c_void, out.as_mut_ptr() as *mut c_void, len, &mut read) != 0) { ``` **With this suggestion, tests unchanged:** the `title_bytes` filter passed **3/3**, including guard preservation; the `read_committed` filter passed **2/2**. No ignored/skipped tests; the coherent-window branch was exercised. The release build passed. I did not repeat the failing unmodified run or run the full suite. Native Windows and read-copy performance were not measured. **One title follow-up with this correction:** last resource sample at 111.54 s, GPU 7,561 MiB; the external 7,500 MiB guard then stopped the launch (exit 143). Minimum available system RAM was 2,725.6 MiB and free disk stayed above 13.29 GiB. The log contains no unhandled-exception/device-loss/OOM marker; unrelated DXGI display diagnostics remain. Last captured frames are loading artwork, **not gameplay**. This short, resource-stopped run cannot establish that the intermittent title fault is eliminated or that 30 fps gameplay works. AI assistance: omp / openai-codex/gpt-6-astra investigated the recorded crash, ported the existing PR, wrote and tested this small Wine correction, and drafted/submitted this report at the repository owner's request.
Author
Owner

@⁠itsSio on GitHub · 2026-11-26 04:45 UTC · original

Independent dual-PC NVIDIA full-workspace test report on clean head 59f8e7c992dda0044d18a660aad86fae1d94185f.

Tested

  • Machine 1: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200, rustc 1.97.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug build (XCL_ADAPTER=NVIDIA)
    • cargo build --workspace: exit 0
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1156 passed, 0 failed, 46 ignored (title_textures::tests::title_bytes_are_copied_outside_the_coherent_window, title_bytes_survive_concurrent_decommit, and title_bytes_leave_guard_pages_alone all pass)
    • SKIPPED: 25 (wave64-only GPU tests, #1426 wave32 f16/cvt refusals, heap_window_out_of_memory_falls_back_to_the_switch_form, pso_measurement_compiles_an_exact_synthetic_record)
  • Machine 2: NVIDIA GeForce RTX 2080 SUPER (driver 32.0.16.1088), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200, rustc 1.99.1 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100 DXC 1.8.2502.11, debug build (XCL_ADAPTER=NVIDIA)
    • cargo build --workspace: exit 0
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1156 passed, 0 failed, 46 ignored (all 3 new title_textures::tests pass)
    • SKIPPED: 27 (same 25 as Machine 1 plus 2 requiring d3d12SDKLayers.dll)

Not tested

  • Retail title / scripts/smoke.ps1 runs
  • Release builds (--release)
  • AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton

AI use
Ran via Samaritan:

  • Google Antigravity CLI (Claude Opus 5.5 (High)): built the branch and ran the workspace test suite on both NVIDIA machines.
  • Google Antigravity CLI (Gemini 4 Neon (High)): coordinated the runs and wrote this test report.
**@⁠itsSio** on GitHub · 2026-11-26 04:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#issuecomment-7182882043) Independent dual-PC NVIDIA full-workspace test report on clean head `59f8e7c992dda0044d18a660aad86fae1d94185f`. **Tested** - **Machine 1:** NVIDIA GeForce RTX 5080 (driver `32.0.16.1088`), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200, `rustc 1.97.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2609.5`, debug build (`XCL_ADAPTER=NVIDIA`) - `cargo build --workspace`: exit 0 - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1156 passed, 0 failed, 46 ignored** (`title_textures::tests::title_bytes_are_copied_outside_the_coherent_window`, `title_bytes_survive_concurrent_decommit`, and `title_bytes_leave_guard_pages_alone` all pass) - `SKIPPED`: 25 (wave64-only GPU tests, `#1426` wave32 f16/cvt refusals, `heap_window_out_of_memory_falls_back_to_the_switch_form`, `pso_measurement_compiles_an_exact_synthetic_record`) - **Machine 2:** NVIDIA GeForce RTX 2080 SUPER (driver `32.0.16.1088`), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200, `rustc 1.99.1` (`stable-x86_64-pc-windows-msvc`), Windows SDK 10.0.26100 DXC `1.8.2502.11`, debug build (`XCL_ADAPTER=NVIDIA`) - `cargo build --workspace`: exit 0 - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1156 passed, 0 failed, 46 ignored** (all 3 new `title_textures::tests` pass) - `SKIPPED`: 27 (same 25 as Machine 1 plus 2 requiring `d3d12SDKLayers.dll`) **Not tested** - Retail title / `scripts/smoke.ps1` runs - Release builds (`--release`) - AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton **AI use** Ran via Samaritan: - Google Antigravity CLI (Claude Opus 5.5 (High)): built the branch and ran the workspace test suite on both NVIDIA machines. - Google Antigravity CLI (Gemini 4 Neon (High)): coordinated the runs and wrote this test report.
Author
Owner

@⁠bmjask on GitHub · 2026-11-25 20:16 UTC · original · reviewed

No blocking code issue found. The safe-copy path correctly zeroes unreadable holes and keeps the detile consumer within the snapshot lifetime; the targeted stale-byte and concurrent-decommit tests are useful. Residual risk remains the existing unchecked coherent-window pointer invariant: changing that window to no-access/guard can still fault. This predates the PR but should stay explicit in the validation record.

**@⁠bmjask** on GitHub · 2026-11-25 20:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/751#pullrequestreview-6064332878) · **reviewed** No blocking code issue found. The safe-copy path correctly zeroes unreadable holes and keeps the detile consumer within the snapshot lifetime; the targeted stale-byte and concurrent-decommit tests are useful. Residual risk remains the existing unchecked coherent-window pointer invariant: changing that window to no-access/guard can still fault. This predates the PR but should stay explicit in the validation record.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/751/head:github-bot/gh-751'
git switch 'github-bot/gh-751'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-751'
git switch 'github-bot/gh-751'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-751'
git switch 'github-bot/gh-751'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-751'
git switch 'main'
git merge --squash 'github-bot/gh-751'
git switch 'main'
git merge --ff-only 'github-bot/gh-751'
git switch 'main'
git merge 'github-bot/gh-751'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.