kernelx: XMemMapPhysicalPagesScatter with no page array unmaps #495

Manually merged
github merged 1 commit from gh-pr/495/head into gh-pr/495/base 2026-11-26 04:23:35 +00:00
Owner

@⁠notdxbi on GitHub · 2026-11-24 01:02 UTC · original
notdxbi:pr-scatter-null-unmaps → main · +41 −3 · 1 files · 1 commits · merged 2026-11-25 16:29 UTC

A retail game unmaps addresses while it streams its world with XMemMapPhysicalPagesScatter(addresses, n, NULL). It checks the result and runs into its own int3 when the call fails (+0xb18de7; the function at +0xb18dc0 calls the scatter through its IAT slot and breaks on 0), then its crash reporter. XCL refused a NULL page array with ERROR_INVALID_PARAMETER. Page 0 already means "unmap this address" in a scatter, so no array is now taken as page 0 for every address. Part of #175 (https://github.com/ivall/xcl/issues/175#issuecomment-7118129089).

What is in it

  • hle/kernelx.rs: XMemMapPhysicalPagesScatter with a NULL page array unmaps each address (through the existing page-0 path).
  • Test scatter_without_pages_unmaps: two pages mapped and written, unmapped with no array (the call succeeds, the addresses are no longer committed), mapped again they read what was written. Without the change it fails ("no page array: unmapped, not refused").

Tested

  • RTX 5060 8 GB (NVIDIA 595.112.07), Ryzen 7 5700X, Linux under Wine 11.22 Staging (vkd3d-proton master with the two from_iface checks relaxed and -Db_ndebug=true, as in #257; DXVK 3.1.1 dxgi), Rust stable x86_64-pc-windows-gnu (cross-built), release
  • lib suite on this branch (main 2997c9a + this commit): CPU tests --skip gpu:: --test-threads=4: 364 passed, 0 failed, 3 ignored; GPU tests gpu:: --test-threads=1: 271 passed, 0 failed, 18 ignored (run serially: with 4 threads this card sometimes loses the device, NVRM Xid 109, in tests this change does not touch). mesh_dispatch::tests::gpu_* / paired_* were excluded: they hang this GPU on main too.
  • SKIPPED on this adapter: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)
  • Retail title (Series S profile, where the run reached it first): before, int3 at +0xb18de7 at ~113 s; after, the run went on past it.

Regression run

  • None: scripts/smoke.ps1 needs Windows (see Not tested).

Not tested

  • Windows: no Windows machine here, so no scripts/smoke.ps1 blocks and no MSVC build; this PR needs someone to run the regression on Windows before it can be merged.
  • AMD.
  • Once these unmaps succeed, the next stop on this 8 GB card was a GPU fault from tiles unmapped ahead of work in flight; that is fixed separately (#496).

AI use

  • Claude Code with Claude Opus 5.5: found the cause, wrote the change, the test and this description. The runs and numbers are real, on the hardware above; the PR is opened by me after checking them.

🤖 Generated with Claude Code

**@⁠notdxbi** on GitHub · 2026-11-24 01:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/495) `notdxbi:pr-scatter-null-unmaps` → `main` · +41 −3 · 1 files · 1 commits · merged 2026-11-25 16:29 UTC A retail game unmaps addresses while it streams its world with `XMemMapPhysicalPagesScatter(addresses, n, NULL)`. It checks the result and runs into its own `int3` when the call fails (`+0xb18de7`; the function at `+0xb18dc0` calls the scatter through its IAT slot and breaks on 0), then its crash reporter. XCL refused a NULL page array with `ERROR_INVALID_PARAMETER`. Page 0 already means "unmap this address" in a scatter, so no array is now taken as page 0 for every address. Part of #175 (https://github.com/ivall/xcl/issues/175#issuecomment-7118129089). **What is in it** - `hle/kernelx.rs`: `XMemMapPhysicalPagesScatter` with a NULL page array unmaps each address (through the existing page-0 path). - Test `scatter_without_pages_unmaps`: two pages mapped and written, unmapped with no array (the call succeeds, the addresses are no longer committed), mapped again they read what was written. Without the change it fails ("no page array: unmapped, not refused"). **Tested** - RTX 5060 8 GB (NVIDIA 595.112.07), Ryzen 7 5700X, **Linux under Wine 11.22 Staging** (vkd3d-proton master with the two `from_iface` checks relaxed and `-Db_ndebug=true`, as in #257; DXVK 3.1.1 dxgi), Rust stable `x86_64-pc-windows-gnu` (cross-built), release - lib suite on this branch (`main` `2997c9a` + this commit): CPU tests `--skip gpu:: --test-threads=4`: **364 passed, 0 failed, 3 ignored**; GPU tests `gpu:: --test-threads=1`: **271 passed, 0 failed, 18 ignored** (run serially: with 4 threads this card sometimes loses the device, NVRM Xid 109, in tests this change does not touch). `mesh_dispatch::tests::gpu_*` / `paired_*` were excluded: they hang this GPU on `main` too. - `SKIPPED` on this adapter: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) - Retail title (Series S profile, where the run reached it first): before, `int3` at `+0xb18de7` at ~113 s; after, the run went on past it. **Regression run** - None: `scripts/smoke.ps1` needs Windows (see Not tested). **Not tested** - **Windows**: no Windows machine here, so no `scripts/smoke.ps1` blocks and no MSVC build; this PR needs someone to run the regression on Windows before it can be merged. - AMD. - Once these unmaps succeed, the next stop on this 8 GB card was a GPU fault from tiles unmapped ahead of work in flight; that is fixed separately (#496). **AI use** - Claude Code with Claude Opus 5.5: found the cause, wrote the change, the test and this description. The runs and numbers are real, on the hardware above; the PR is opened by me after checking them. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A retail game unmaps addresses while it streams its world with
XMemMapPhysicalPagesScatter(addresses, n, NULL); it checks the result
and runs into its own int3 when the call fails (+0xb18de7, then its
crash reporter). XCL refused a NULL page array with
ERROR_INVALID_PARAMETER. Page 0 already means "unmap this address" in a
scatter, so no array is taken as page 0 for every address.

Test scatter_without_pages_unmaps: two pages mapped and written, unmapped
with no array (the call succeeds, the addresses are no longer committed),
mapped again they read what was written. It fails without the change
("refused").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:23:33 +00:00
github manually merged commit 3ae0841342 into gh-pr/495/base 2026-11-26 04:23:35 +00:00
Author
Owner

@⁠yyc160 on GitHub · 2026-11-24 01:31 UTC · original

Regression run, plus two review notes. Native Windows 11, RTX 5070 Ti (Blackwell, 32-lane, driver 32.0.16.1742), 32 GB. Same title, 180 s each, no uncommitted changes.

main@2997c9a

xcl-smoke v1
commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA6.Xbox.v1.0.2.1-CYBERLEEK
seconds: 180
exit: 0x0
frames shown: 1479 (PresentX 1480)
presents per 2 s (last 3): 25 26 26
device removals: 0
crashes: 0
peak commit: 15064 MB

This PR @1822092

xcl-smoke v1
commit: 1822092bbbeccf7c8927c792e25feeb6177c6d0c
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA6.Xbox.v1.0.2.1-CYBERLEEK
seconds: 180
exit: 0x0
frames shown: 1377 (PresentX 1377)
presents per 2 s (last 3): 12 10 9
device removals: 0
crashes: 0
peak commit: 15040 MB

Frames 1377 vs 1479 (93 %), peak commit 15040 vs 15064 MB (100 %), no device removal, no crash, exit 0x0. Inside the 80 % / 125 % bounds — but see the note at the end about the frame counts on this machine.

Not tested: neither build stopped on the NULL-scatter path, so this run does not confirm the fix fires. main should have failed on that call and did not, which means the title did not reach that stream-out point inside 180 s here.

1. -Seconds 60 is too short for this title on this hardware. The same commit measured 340 and 271 frames in two 60 s runs (±25 %), steady state 9/9/8 vs 6/7/6 per 2 s. At 180 s the same binary settles at 25-26 per 2 s. The 60 s window is still inside loading and shader compilation, so a low 60 s number here would not mean a regression.

2. Three points on the change itself (static read, not from a test):

  • vec![0u64; n] with n == 0 gives as_mut_ptr() a non-null dangling pointer, so the recursive call takes the "pages provided" branch instead of the null branch. Harmless only if nothing dereferences pages[0] when n == 0; the two paths disagree on that edge.
  • The temporary allocates 8 * n bytes before the UMA check, so a call that used to fail fast on "UMA not initialised" now allocates first. Reading the page id inside the existing loop needs neither: let page_id = if pages.is_null() { 0 } else { *pages.add(i) };
  • The assumption that NULL means "unmap" rather than "leave the mapping unchanged" rests on the Win32 AWE MapUserPhysicalPagesScatter analogue. The title only shows it expects success, not what success must do to the mapping. If the console contract cannot be pinned down, a compatibility switch may be safer than changing it globally.

All of this is one title on one GPU, and that machine had other heavy load on it during the runs — treat the frame counts as indicative and the review points as questions, not as a block.

**@⁠yyc160** on GitHub · 2026-11-24 01:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7119178171) **Regression run, plus two review notes.** Native Windows 11, RTX 5070 Ti (Blackwell, 32-lane, driver 32.0.16.1742), 32 GB. Same title, 180 s each, no uncommitted changes. **`main@2997c9a`** ``` xcl-smoke v1 commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA6.Xbox.v1.0.2.1-CYBERLEEK seconds: 180 exit: 0x0 frames shown: 1479 (PresentX 1480) presents per 2 s (last 3): 25 26 26 device removals: 0 crashes: 0 peak commit: 15064 MB ``` **This PR @`1822092`** ``` xcl-smoke v1 commit: 1822092bbbeccf7c8927c792e25feeb6177c6d0c gpu: NVIDIA GeForce RTX 5070 Ti title: GTA6.Xbox.v1.0.2.1-CYBERLEEK seconds: 180 exit: 0x0 frames shown: 1377 (PresentX 1377) presents per 2 s (last 3): 12 10 9 device removals: 0 crashes: 0 peak commit: 15040 MB ``` Frames 1377 vs 1479 (93 %), peak commit 15040 vs 15064 MB (100 %), no device removal, no crash, exit 0x0. Inside the 80 % / 125 % bounds — but see the note at the end about the frame counts on this machine. **Not tested:** neither build stopped on the NULL-scatter path, so this run does not confirm the fix fires. `main` should have failed on that call and did not, which means the title did not reach that stream-out point inside 180 s here. **1. `-Seconds 60` is too short for this title on this hardware.** The same commit measured 340 and 271 frames in two 60 s runs (±25 %), steady state 9/9/8 vs 6/7/6 per 2 s. At 180 s the same binary settles at 25-26 per 2 s. The 60 s window is still inside loading and shader compilation, so a low 60 s number here would not mean a regression. **2. Three points on the change itself** (static read, not from a test): - `vec![0u64; n]` with `n == 0` gives `as_mut_ptr()` a non-null dangling pointer, so the recursive call takes the "pages provided" branch instead of the null branch. Harmless only if nothing dereferences `pages[0]` when `n == 0`; the two paths disagree on that edge. - The temporary allocates `8 * n` bytes before the UMA check, so a call that used to fail fast on "UMA not initialised" now allocates first. Reading the page id inside the existing loop needs neither: `let page_id = if pages.is_null() { 0 } else { *pages.add(i) };` - The assumption that NULL means "unmap" rather than "leave the mapping unchanged" rests on the Win32 AWE `MapUserPhysicalPagesScatter` analogue. The title only shows it expects success, not what success must do to the mapping. If the console contract cannot be pinned down, a compatibility switch may be safer than changing it globally. All of this is one title on one GPU, and that machine had other heavy load on it during the runs — treat the frame counts as indicative and the review points as questions, not as a block.
Author
Owner

@⁠notdxbi on GitHub · 2026-11-24 01:59 UTC · original

@⁠yyc160 thanks for the regression run and the review. Pushed 3ae0841 (squashed into the one commit):

  • n == 0 / the dangling pointer, and the allocation before the UMA check: both gone. There is no temporary array any more. The page for address i is read in the existing loop as if pages.is_null() { 0 } else { *pages.add(i) }, after the UMA check, so with and without an array the call goes down the same path. The test now also checks that n == 0 gives the same answer with and without a page array.
  • NULL = unmap: the AWE analogue documents it outright. MapUserPhysicalPagesScatter: "If the PageArray parameter is NULL, the specified address ranges are unmapped." On the title's side I only know that it requires the call to succeed (it breaks on 0). I haven't traced what it does with those addresses afterwards. I don't have the console SDK text, so if the maintainer prefers a switch I'll add one, but I'd rather not make a guess the default the other way.
  • Not reaching that point in 180 s on your machine matches my runs: the title only gets there once it streams its world after the intro (here ~100–150 s after A on the account prompt).

Tested on 3ae0841 (Linux/Wine, RTX 5060): lib suite 373 passed / 0 failed / 3 ignored (CPU) + 274 / 0 / 18 (GPU, serial); scatter_without_pages_unmaps passes.

**@⁠notdxbi** on GitHub · 2026-11-24 01:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7119655194) @⁠yyc160 thanks for the regression run and the review. Pushed `3ae0841` (squashed into the one commit): - **`n == 0` / the dangling pointer**, and **the allocation before the UMA check**: both gone. There is no temporary array any more. The page for address `i` is read in the existing loop as `if pages.is_null() { 0 } else { *pages.add(i) }`, after the UMA check, so with and without an array the call goes down the same path. The test now also checks that `n == 0` gives the same answer with and without a page array. - **NULL = unmap**: the AWE analogue documents it outright. `MapUserPhysicalPagesScatter`: "If the PageArray parameter is NULL, the specified address ranges are unmapped." On the title's side I only know that it requires the call to succeed (it breaks on 0). I haven't traced what it does with those addresses afterwards. I don't have the console SDK text, so if the maintainer prefers a switch I'll add one, but I'd rather not make a guess the default the other way. - Not reaching that point in 180 s on your machine matches my runs: the title only gets there once it streams its world after the intro (here ~100–150 s after A on the account prompt). Tested on `3ae0841` (Linux/Wine, RTX 5060): lib suite 373 passed / 0 failed / 3 ignored (CPU) + 274 / 0 / 18 (GPU, serial); `scatter_without_pages_unmaps` passes.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 02:17 UTC · original

Regression run for this PR's head on Windows, as asked in #175.

Tested

  • Windows 11 Pro 25H2 (build 26200), AMD Ryzen 9 9950X, 32 GB RAM, NVIDIA GeForce RTX 5070 Ti (driver 610.74), Rust 1.99.0, release builds (cargo build --release -p xcl) from clean checkouts
  • main: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21 (this PR's base); PR head: 3ae08413426eee45cc95f2c3c7e3d2b169ed1142, no uncommitted changes
  • scripts/smoke.ps1 -Game <title folder> -Seconds 60 on a retail title, main first, after one 60 s warm-up run of main; both sides start from the same learned coherent-window size
  • PR 1417 frames vs main 1527 (93 %), peak commit 14541 vs 14538 MB (100 %); 0 crashes and 0 device removals on both sides, both exited 0x0; main 2997c9a's four runs in this batch (warm-up included) showed 1446-1527 frames

Regression run

main:

xcl-smoke v1
commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA VI
seconds: 60
exit: 0x0
frames shown: 1527 (PresentX 1528)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14538 MB

PR:

xcl-smoke v1
commit: 3ae08413426eee45cc95f2c3c7e3d2b169ed1142
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA VI
seconds: 60
exit: 0x0
frames shown: 1417 (PresentX 1417)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14541 MB

Not tested

  • The fix itself: XCL logs nothing for XMemMapPhysicalPagesScatter, and main's run did not crash either (no int3, no crash reporter) in its 60 s, so this run does not show whether the title made the call with no page array; it is a regression check only
  • cargo test --workspace (not run for this report)
  • AMD GPUs, other titles

🤖 Claude Opus 5.5

**@⁠Kalmarv** on GitHub · 2026-11-24 02:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7119964496) Regression run for this PR's head on Windows, as asked in #175. **Tested** - Windows 11 Pro 25H2 (build 26200), AMD Ryzen 9 9950X, 32 GB RAM, NVIDIA GeForce RTX 5070 Ti (driver 610.74), Rust 1.99.0, release builds (`cargo build --release -p xcl`) from clean checkouts - main: `2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21` (this PR's base); PR head: `3ae08413426eee45cc95f2c3c7e3d2b169ed1142`, no uncommitted changes - `scripts/smoke.ps1 -Game <title folder> -Seconds 60` on a retail title, main first, after one 60 s warm-up run of main; both sides start from the same learned coherent-window size - PR 1417 frames vs main 1527 (93 %), peak commit 14541 vs 14538 MB (100 %); 0 crashes and 0 device removals on both sides, both exited 0x0; main 2997c9a's four runs in this batch (warm-up included) showed 1446-1527 frames **Regression run** main: ``` xcl-smoke v1 commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA VI seconds: 60 exit: 0x0 frames shown: 1527 (PresentX 1528) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14538 MB ``` PR: ``` xcl-smoke v1 commit: 3ae08413426eee45cc95f2c3c7e3d2b169ed1142 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA VI seconds: 60 exit: 0x0 frames shown: 1417 (PresentX 1417) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14541 MB ``` **Not tested** - The fix itself: XCL logs nothing for `XMemMapPhysicalPagesScatter`, and main's run did not crash either (no int3, no crash reporter) in its 60 s, so this run does not show whether the title made the call with no page array; it is a regression check only - `cargo test --workspace` (not run for this report) - AMD GPUs, other titles 🤖 Claude Opus 5.5
Author
Owner

@⁠albertoglvn on GitHub · 2026-11-24 03:40 UTC · original

Tested on native Windows 11, RTX 4060 Laptop 8 GB (7956 MiB), driver 621.24, 15 GB RAM, release MSVC build. The newer retail title (TitleID 7952987A) with the Series S profile (device_type = "lockhart"), XCL_NETWORK=0, XCL_ACTIVITY=1. Build: #484 head (9783066) + #242, with this PR's commit (3ae0841) and #496's (409f40f) cherry-picked on top.

Without #495/#496: int3 at +0xb18de7 at 130.8 s, 4.7 s after the title's XStore query (XErrorReport 0x89240107). The function at +0xb18dc0 calls xmem.dll!XMemMapPhysicalPagesScatter with r8 = 0 and breaks on a 0 result, and rcx = 0x57 at the break, which matches this PR's description.

With both: the run went past that point (XStore query at 186 s) and played on until 354.5 s. No device removal and no failed scatter calls logged. scatter_without_pages_unmaps and unmapping_waits_for_work_on_title_queues pass here.

The run then ended on #333 (0x80000003 at +0x193e00f, rax = 0x8007000e, after 7× "no video memory for more pages of title textures"), at the same local video memory as on the Series X profile (10.2 GB):

Series X (277.5 s) Series S (354.5 s)
target pages at the menus 3577 MB 1916 MB
sparse pools at the menus 896 MB 4800 MB
local video memory at the menus 6143 MB 7310 MB
at the end: target pages / sparse / local 6623 / 1792 / 10207 MB 4910 / 4544 / 10204 MB

So on 8 GB the Series S profile trades target pages for sparse pools and starts 1.2 GB higher. It lasted about 12 s longer after the load point than Series X did. It is not a way around #333.

Caveats: one run, no scripts/smoke.ps1 blocks (two Windows regression runs are already above). Base is #484's, not current main.

AI use: the crash was traced and this comment drafted with Claude Opus 5.5; I ran the game and checked the results.

**@⁠albertoglvn** on GitHub · 2026-11-24 03:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7121320825) Tested on native Windows 11, RTX 4060 Laptop 8 GB (7956 MiB), driver 621.24, 15 GB RAM, release MSVC build. The newer retail title (TitleID 7952987A) with the Series S profile (`device_type = "lockhart"`), `XCL_NETWORK=0`, `XCL_ACTIVITY=1`. Build: #484 head (9783066) + #242, with this PR's commit (3ae0841) and #496's (409f40f) cherry-picked on top. **Without #495/#496:** `int3` at `+0xb18de7` at 130.8 s, 4.7 s after the title's XStore query (`XErrorReport 0x89240107`). The function at `+0xb18dc0` calls `xmem.dll!XMemMapPhysicalPagesScatter` with `r8 = 0` and breaks on a 0 result, and `rcx = 0x57` at the break, which matches this PR's description. **With both:** the run went past that point (XStore query at 186 s) and played on until 354.5 s. No device removal and no failed scatter calls logged. `scatter_without_pages_unmaps` and `unmapping_waits_for_work_on_title_queues` pass here. The run then ended on #333 (`0x80000003` at `+0x193e00f`, `rax = 0x8007000e`, after 7× "no video memory for more pages of title textures"), at the same local video memory as on the Series X profile (10.2 GB): | | Series X (277.5 s) | Series S (354.5 s) | |---|---|---| | target pages at the menus | 3577 MB | 1916 MB | | sparse pools at the menus | 896 MB | 4800 MB | | local video memory at the menus | 6143 MB | 7310 MB | | at the end: target pages / sparse / local | 6623 / 1792 / 10207 MB | 4910 / 4544 / 10204 MB | So on 8 GB the Series S profile trades target pages for sparse pools and starts 1.2 GB higher. It lasted about 12 s longer after the load point than Series X did. It is not a way around #333. Caveats: one run, no `scripts/smoke.ps1` blocks (two Windows regression runs are already above). Base is #484's, not current main. AI use: the crash was traced and this comment drafted with Claude Opus 5.5; I ran the game and checked the results.
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 04:23 UTC · original

Native Windows 11 / RX 7900 XT, retail 1.0.2.1, Series S profile. The local control accepted A, then took 0x80000003 at title+0xb18de7 at 41.473 s (RCX 0x57, R8 zero). Adding 3ae0841 plus #615's presentation overlay to the same integration build, with the same saved profile, input and initial application caches, got past that breakpoint and into world streaming. The isolated scatter_without_pages_unmaps regression passed in the combined workspace suite. I did not instrument the scatter return value in the retail run.

The follow-up run ended at 168.731 s at the separate title+0x23cf683 watchdog, with zero device removals. The full combined suite passed 730 tests, 0 failed, 41 ignored; one nominal pass reported SKIPPED for missing xgameruntime.dll. Commands: cargo build --workspace --offline --locked and cargo test --workspace --offline --locked -- --test-threads=4 --nocapture, followed by a release hardware run. Codex (GPT-6) ran the checks and summarized the local logs.

**@⁠crosettiremi** on GitHub · 2026-11-24 04:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7121980496) Native Windows 11 / RX 7900 XT, retail 1.0.2.1, Series S profile. The local control accepted A, then took 0x80000003 at title+0xb18de7 at 41.473 s (RCX 0x57, R8 zero). Adding 3ae0841 plus #615's presentation overlay to the same integration build, with the same saved profile, input and initial application caches, got past that breakpoint and into world streaming. The isolated scatter_without_pages_unmaps regression passed in the combined workspace suite. I did not instrument the scatter return value in the retail run. The follow-up run ended at 168.731 s at the separate title+0x23cf683 watchdog, with zero device removals. The full combined suite passed 730 tests, 0 failed, 41 ignored; one nominal pass reported SKIPPED for missing xgameruntime.dll. Commands: cargo build --workspace --offline --locked and cargo test --workspace --offline --locked -- --test-threads=4 --nocapture, followed by a release hardware run. Codex (GPT-6) ran the checks and summarized the local logs.
Author
Owner

@⁠MrEjecutor on GitHub · 2026-11-24 05:56 UTC · original

Test report on Windows + NVIDIA for 3ae0841 (this PR's head): the +0xb18de7 assert is the one I hit, and with this PR the title runs past it

On the Series S profile (device_type = "lockhart") the retail title 1.0.2.1 stops at +0xb18de7 (0x80000003) about 5 s after its XStore query, on Windows too. The function at +0xb18dc0 calls XMemMapPhysicalPagesScatter through its IAT slot with a NULL page array, as described above. #242 is needed to get there on NVIDIA (the earlier format-67 assert at +0xcc2834), so I tested this PR together with #242.

Tested

  • RTX 5060 Ti 16 GB (wave32), driver 621.24; Intel Core Ultra 5 225F; 32 GB; Windows 11 Pro 26200; Rust 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.8.2505.32 (SDK 10.0.28000); release
  • Tree: main e50836b + #242 (e54a0d4) + this PR (3ae0841), merged locally without conflicts (073bd69)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 705 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • Retail title, lockhart, XCL_NETWORK=0, 180 s: the XStore query at 73 s, then no assert; the title runs to the end of the 180 s and starts streaming its world (BCPack refusals from 86 s on, BC5 / BC7)
  • With #242 alone (e54a0d4), same setup: 0x80000003 at +0xb18de7 at 51.6 s (report on #242)

Regression run

xcl-smoke v1
commit: 073bd69f1d2c0012864c44f3d12d800c56004a14
gpu: NVIDIA GeForce RTX 5060 Ti
title: GTAVI
seconds: 180
exit: 0x0
frames shown: 1169 (PresentX 1169)
presents per 2 s (last 3): 8 8 8
device removals: 0
crashes: 0
peak commit: 18333 MB

This block is from the local merge, not from this PR's head alone: on this card the title does not reach the scatter without #242, so a run of this PR alone would only show the earlier assert.

Not tested

  • This PR without #242 on the title (it stops before the call); AMD GPUs and CPUs; the Series X profile.
  • The screen content: the frame rate is 8–9 fps with ~57 000 pipelines still queued, so I cannot tell what the title shows past the menus.

AI use

  • Claude Code (Claude Opus 5.5) found the call site, ran the builds, tests and runs and wrote this report; checked by mrejecutor.
**@⁠MrEjecutor** on GitHub · 2026-11-24 05:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7123417366) **Test report on Windows + NVIDIA for `3ae0841` (this PR's head): the `+0xb18de7` assert is the one I hit, and with this PR the title runs past it** On the Series S profile (`device_type = "lockhart"`) the retail title 1.0.2.1 stops at `+0xb18de7` (`0x80000003`) about 5 s after its `XStore` query, on Windows too. The function at `+0xb18dc0` calls `XMemMapPhysicalPagesScatter` through its IAT slot with a NULL page array, as described above. #242 is needed to get there on NVIDIA (the earlier format-67 assert at `+0xcc2834`), so I tested this PR together with #242. **Tested** - RTX 5060 Ti 16 GB (wave32), driver 621.24; Intel Core Ultra 5 225F; 32 GB; Windows 11 Pro 26200; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.8.2505.32 (SDK 10.0.28000); release - Tree: `main` `e50836b` + #242 (`e54a0d4`) + this PR (`3ae0841`), merged locally without conflicts (`073bd69`) - `cargo test --workspace --release --no-fail-fast -- --test-threads=4`: 705 passed, 0 failed, 41 ignored; `SKIPPED` (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - Retail title, `lockhart`, `XCL_NETWORK=0`, 180 s: the `XStore` query at 73 s, then no assert; the title runs to the end of the 180 s and starts streaming its world (BCPack refusals from 86 s on, BC5 / BC7) - With #242 alone (`e54a0d4`), same setup: `0x80000003` at `+0xb18de7` at 51.6 s (report on #242) **Regression run** ``` xcl-smoke v1 commit: 073bd69f1d2c0012864c44f3d12d800c56004a14 gpu: NVIDIA GeForce RTX 5060 Ti title: GTAVI seconds: 180 exit: 0x0 frames shown: 1169 (PresentX 1169) presents per 2 s (last 3): 8 8 8 device removals: 0 crashes: 0 peak commit: 18333 MB ``` This block is from the local merge, not from this PR's head alone: on this card the title does not reach the scatter without #242, so a run of this PR alone would only show the earlier assert. **Not tested** - This PR without #242 on the title (it stops before the call); AMD GPUs and CPUs; the Series X profile. - The screen content: the frame rate is 8–9 fps with ~57 000 pipelines still queued, so I cannot tell what the title shows past the menus. **AI use** - Claude Code (Claude Opus 5.5) found the call site, ran the builds, tests and runs and wrote this report; checked by mrejecutor.
Author
Owner

@⁠volkan12a-bot on GitHub · 2026-11-24 06:44 UTC · original

Test report: retail title, a run confirming the problem this PR fixes

Not a run of this PR's head (3ae0841): it is a run of my local patch with the same behaviour (no page array → page 0 for every address), on main 7ebf1b8. I post it because it shows the failing call and the effect of the fix on real hardware.

Hardware / build

  • NVIDIA GeForce RTX 4070 Laptop GPU 8 GB, driver 32.0.16.1692; Intel Core i7-14700HX, 40 GB RAM; Windows 11 Pro 26200
  • Rust 1.97.1, cargo build --release
  • Retail title 930.048.020, Lockhart (Series S) profile

Without the fix

  • About 6 s after the first gamepad button on the start screen, the title stopped at game_scarlett_master.exe+0xb18de7: unhandled exception 0x80000003, exit 0x80000003.
  • The code there is mov edx,[count] / lea rcx,[address array] / xor r8d,r8d / call XMemMapPhysicalPagesScatter / test eax,eax / jne / int3. So the call is (addresses, n, NULL), and the int3 fires when it returns FALSE.

With the fix

  • The same button press no longer stops the title. One run stayed up for more than 7 minutes; the next one ran for 1006 s, about 21 000 frames at about 27 fps.
  • The 1006 s run ended in an access violation in a title-texture read while pages were being decommitted. That is the race main fixed in #484, not something this PR adds.
  • cargo test -p xcl --lib kernelx passed: 26 passed, 0 failed, 1 ignored (with my own test of a scatter call without pages).

Not tested

  • This PR's own commit.
  • smoke.ps1 blocks; AMD GPUs.

AI use

  • Claude Code with Claude Opus 5.5: found the call site from the crash address, wrote the local patch and this report. The run is mine.
**@⁠volkan12a-bot** on GitHub · 2026-11-24 06:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7124248425) **Test report: retail title, a run confirming the problem this PR fixes** Not a run of this PR's head (`3ae0841`): it is a run of my local patch with the same behaviour (no page array → page 0 for every address), on `main` `7ebf1b8`. I post it because it shows the failing call and the effect of the fix on real hardware. **Hardware / build** - NVIDIA GeForce RTX 4070 Laptop GPU 8 GB, driver 32.0.16.1692; Intel Core i7-14700HX, 40 GB RAM; Windows 11 Pro 26200 - Rust 1.97.1, `cargo build --release` - Retail title 930.048.020, Lockhart (Series S) profile **Without the fix** - About 6 s after the first gamepad button on the start screen, the title stopped at `game_scarlett_master.exe+0xb18de7`: `unhandled exception 0x80000003`, exit 0x80000003. - The code there is `mov edx,[count]` / `lea rcx,[address array]` / `xor r8d,r8d` / `call XMemMapPhysicalPagesScatter` / `test eax,eax` / `jne` / `int3`. So the call is (addresses, n, NULL), and the `int3` fires when it returns FALSE. **With the fix** - The same button press no longer stops the title. One run stayed up for more than 7 minutes; the next one ran for 1006 s, about 21 000 frames at about 27 fps. - The 1006 s run ended in an access violation in a title-texture read while pages were being decommitted. That is the race `main` fixed in #484, not something this PR adds. - `cargo test -p xcl --lib kernelx` passed: 26 passed, 0 failed, 1 ignored (with my own test of a scatter call without pages). **Not tested** - This PR's own commit. - `smoke.ps1` blocks; AMD GPUs. **AI use** - Claude Code with Claude Opus 5.5: found the call site from the crash address, wrote the local patch and this report. The run is mine.
Author
Owner

@⁠rrrarrra9 on GitHub · 2026-11-24 16:21 UTC · original

Windows validation on a GTX 1650 (4 GB)

Retail 1.0.2.1 in the Series S profile. I compared main b7aa9f3 + #605 (e21849e, local) with the same tree plus this PR's 3ae0841 (15d6e71, local). The latter cherry-pick resolved a conflict between adjacent tests in kernelx.rs.

Build Result
e21849e 0x80000003 at game+0xb18de7 at 82.63 s. Final exit 0xc0000005.
15d6e71 Ran to the 150 s smoke limit and exited 0x0. XCL counted 1,773 frames shown and 1,775 PresentX calls. Peak process commit was 18,196 MiB.

The final sampled 1920×1080 frame had 0 of 129,600 non-dark samples. The report also recorded 45 calls to queue slot #31 (the case tracked in #1031). This is Windows runtime evidence that the scatter change clears the assertion at game+0xb18de7 in this stack.

AI use

Codex (GPT-6) prepared the local cherry-pick, ran the comparison, and wrote the report from the generated logs.

**@⁠rrrarrra9** on GitHub · 2026-11-24 16:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7137543822) **Windows validation on a GTX 1650 (4 GB)** Retail 1.0.2.1 in the Series S profile. I compared `main` `b7aa9f3` + #605 (`e21849e`, local) with the same tree plus this PR's `3ae0841` (`15d6e71`, local). The latter cherry-pick resolved a conflict between adjacent tests in `kernelx.rs`. | Build | Result | | --- | --- | | `e21849e` | `0x80000003` at `game+0xb18de7` at 82.63 s. Final exit `0xc0000005`. | | `15d6e71` | Ran to the 150 s smoke limit and exited `0x0`. XCL counted 1,773 frames shown and 1,775 PresentX calls. Peak process commit was 18,196 MiB. | The final sampled 1920×1080 frame had 0 of 129,600 non-dark samples. The report also recorded 45 calls to queue slot #31 (the case tracked in #1031). This is Windows runtime evidence that the scatter change clears the assertion at `game+0xb18de7` in this stack. **AI use** Codex (GPT-6) prepared the local cherry-pick, ran the comparison, and wrote the report from the generated logs.
Author
Owner

@⁠gavinnolan on GitHub · 2026-11-24 22:47 UTC · original

Confirming the diagnosis on Series S (device_type = "lockhart"), retail title 1.0.2.1: the title asserts at +0xb18de7 after XMemMapPhysicalPagesScatter(addresses, n, NULL) returns 0 with ERROR_INVALID_PARAMETER (rcx=0x57 at the int3). Disassembly matches: the function at +0xb18dc0 calls the IAT slot for xmem.dll!XMemMapPhysicalPagesScatter with r8 = 0 and breaks on 0.

Setup: NVIDIA GeForce RTX 2060 Laptop 6 GB (driver 595.79), i7-10750H, 16 GB RAM, Windows 11 10.0.26200, release build. main 689f2db plus #615, #833, #751, #1792.

  • Without this change: 0x80000003 at +0xb18de7 at 208 s, twice (two runs).
  • With this PR's XMemMapPhysicalPagesScatter change applied by hand (it no longer merges with main: the function is unchanged, the conflict is elsewhere in kernelx.rs): no assert there; the title reached its world loading screens at ~218 s. It then stopped at 246 s on video memory (0x8007000e, +0x193e00f, 6 GB card), which is #333, not this.

I did not port the test.

**@⁠gavinnolan** on GitHub · 2026-11-24 22:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7146642744) Confirming the diagnosis on Series S (`device_type = "lockhart"`), retail title 1.0.2.1: the title asserts at `+0xb18de7` after `XMemMapPhysicalPagesScatter(addresses, n, NULL)` returns 0 with `ERROR_INVALID_PARAMETER` (`rcx=0x57` at the `int3`). Disassembly matches: the function at `+0xb18dc0` calls the IAT slot for `xmem.dll!XMemMapPhysicalPagesScatter` with `r8 = 0` and breaks on 0. **Setup:** NVIDIA GeForce RTX 2060 Laptop 6 GB (driver 595.79), i7-10750H, 16 GB RAM, Windows 11 10.0.26200, release build. `main` `689f2db` plus #615, #833, #751, #1792. - Without this change: `0x80000003` at `+0xb18de7` at 208 s, twice (two runs). - With this PR's `XMemMapPhysicalPagesScatter` change applied by hand (it no longer merges with `main`: the function is unchanged, the conflict is elsewhere in `kernelx.rs`): no assert there; the title reached its world loading screens at ~218 s. It then stopped at 246 s on video memory (`0x8007000e`, `+0x193e00f`, 6 GB card), which is #333, not this. I did not port the test.
Author
Owner

@⁠yinx080 on GitHub · 2026-11-25 00:44 UTC · original

Test report from Windows: the same assert reproduces here and the same change fixes it.

  • Windows 11 Pro 26200, RTX 3060 Laptop 6 GB (NVIDIA 610.91), Ryzen 7 5800H, Rust 1.99, release build of
    c160d86 plus an equivalent change (a NULL page array goes through the page-0 path).
  • Retail title in Series S mode (device_type = "lockhart"). After A on the account prompt, without the change:
    int3 at +0xb18de7 with identical registers in two runs (+0xb18dc0 calls the scatter with
    (its address table, n, NULL) and breaks on FALSE). With it, the title goes on to its loading screen and
    starts streaming (it later stops on this card's video memory, see #345).
  • The PR now conflicts with main; happy to retest after a rebase.

AI use: Claude Code (Claude Opus 5.5) found the assert, wrote the local change and this report.

**@⁠yinx080** on GitHub · 2026-11-25 00:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7148833032) Test report from Windows: the same assert reproduces here and the same change fixes it. - Windows 11 Pro 26200, RTX 3060 Laptop 6 GB (NVIDIA 610.91), Ryzen 7 5800H, Rust 1.99, release build of `c160d86` plus an equivalent change (a NULL page array goes through the page-0 path). - Retail title in Series S mode (`device_type = "lockhart"`). After A on the account prompt, without the change: `int3` at `+0xb18de7` with identical registers in two runs (`+0xb18dc0` calls the scatter with `(its address table, n, NULL)` and breaks on FALSE). With it, the title goes on to its loading screen and starts streaming (it later stops on this card's video memory, see #345). - The PR now conflicts with `main`; happy to retest after a rebase. AI use: Claude Code (Claude Opus 5.5) found the assert, wrote the local change and this report.
Author
Owner

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

RTX 5080, Series S profile: the title stops at this int3 without the change and goes on with it

  • Without it: the retail title of #505 (my own copy) with device_type = "lockhart" on #2057 at f862f5f + #684 + #266 + #1515: two runs, both ended at the title's own 0x80000003 of the description, at 51 s and at 73 s, before the world's set-up.
  • With it: 3ae0841 cherry-picked onto #2057 at 41303e4 (+ #2067, #684, #266, #1515, #1405, #751): one run of 900 s in the same profile got past that point and reached the world's set-up at 200.8 s. It ended at 726 s for another reason (a GPU hang after the tile queue made no progress for 10 s, with local video memory 3 GB over this 16 GB card's budget).
  • The conflict with main: for me it was only in the test module of kernelx.rs. mapping_fresh_pages_does_not_query_each_page with what follows it on main's side and scatter_without_pages_unmaps on this side were added at the same place and share the test's last lines; keeping both tests whole resolves it, and scatter_without_pages_unmaps passes on that tree.

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; XCL_UMA_SHADOW=1 in the run with the change and in one of the two without. In the Series X profile I have not seen this int3 in any run.

Not tested: this head rebased on main by itself, and the suite on it. One run with the change.

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

**@⁠imnicho** on GitHub · 2026-11-25 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7156678180) **RTX 5080, Series S profile: the title stops at this `int3` without the change and goes on with it** - **Without it**: the retail title of #505 (my own copy) with `device_type = "lockhart"` on #2057 at `f862f5f` + #684 + #266 + #1515: two runs, both ended at the title's own `0x80000003` of the description, at 51 s and at 73 s, before the world's set-up. - **With it**: `3ae0841` cherry-picked onto #2057 at `41303e4` (+ #2067, #684, #266, #1515, #1405, #751): one run of 900 s in the same profile got past that point and reached the world's set-up at 200.8 s. It ended at 726 s for another reason (a GPU hang after the tile queue made no progress for 10 s, with local video memory 3 GB over this 16 GB card's budget). - **The conflict with `main`**: for me it was only in the test module of `kernelx.rs`. `mapping_fresh_pages_does_not_query_each_page` with what follows it on `main`'s side and `scatter_without_pages_unmaps` on this side were added at the same place and share the test's last lines; keeping both tests whole resolves it, and `scatter_without_pages_unmaps` passes on that tree. 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; `XCL_UMA_SHADOW=1` in the run with the change and in one of the two without. In the Series X profile I have not seen this `int3` in any run. **Not tested**: this head rebased on `main` by itself, and the suite on it. One run with the change. AI use: Claude Code with Claude Fable 5.2 ran the title and wrote this.
Author
Owner

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

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-25 14:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7164736862) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
Author
Owner

@⁠427001 on GitHub · 2026-11-25 13:54 UTC · original · edited 2026-11-25 14:07 UTC

Test report for 3ae0841 merged into main 379725a: the Series S assert at +0xb18de7 is gone; and how the conflict with main resolves

The conflict. 3ae0841 conflicts with main 379725a in the tests of crates/xcl/src/hle/kernelx.rs only: main added tests at the place where this PR adds scatter_without_pages_unmaps (mapping_fresh_pages_does_not_query_each_page, sparse_pages, the two pages_mapped_again_… tests, mapping_lazy_pages_again_does_not_query_each_page). Keeping both sides resolves it: main's tests as they are and this PR's test after them, before scatter_matches_a_model_of_physical_pages. The change to XMemMapPhysicalPagesScatter itself applies as it is, and the merged diff against main is the PR's +41/−3.

Tested

  • NVIDIA GeForce RTX 3080 10 GB (32-lane waves), driver 616.92; Intel Core i9-10900K; 16 GB RAM, system-managed page file; Windows 11 Pro 26200.9974; rustc 1.100.0 stable-x86_64-pc-windows-msvc; tests in debug, runs in release.
  • Tree with this PR: main 379725a + this PR (3ae0841, resolved as above) + #615 (9251d80, adapted to main's presenter), a local merge. #615 is in it so that the Series S window shows a picture; it does not touch kernelx.rs.
  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4 on that tree: 1257 passed, 0 failed, 46 ignored. scatter_without_pages_unmaps passes. 27 SKIPPED lines of 17 tests: 20 "no wave64", 3 per-lane f16 forms refused, 1 "no heap windows", 2 without the D3D12 debug layer, 1 that cannot turn the driver cache off (no Developer Mode).
  • Retail title 1.0.2.1, device_type = "lockhart" / console_type_raw = 5, XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=100 XCL_PRESS_A_AT=40,55, the same saved state:
main 379725a with this PR (tree above), 2 runs
0x80000003 at +0xb18de7 at 44.6 s, 4.6 s after the first scripted A press none
how it ended that assert the title's check at +0x193e00f with 0x8007000e (#333) at 118.2 s and 145.5 s
  • In the run without this PR the registers at the int3 have rcx=0x57 (ERROR_INVALID_PARAMETER), as in the description and in @⁠gavinnolan's report.
  • The stop at +0x193e00f is the one of #333, not this PR: a pool heap for title textures is refused with about 12.5 GB of local video memory in use on this 10 GB card. (Corrected: I first put it down to the system's commit, which was nearly used up in these runs; a later run with a larger page file and 31.8 GB of commit free stops the same way at 127.4 s.)

Not tested

  • This PR alone on main (the tree with it also has #615); AMD; the Series X profile; a smoke.ps1 pair.

AI use

  • Claude Code (Claude Fable 5.2) made the local merge, ran the builds, tests and runs, read the logs and wrote this report.
**@⁠427001** on GitHub · 2026-11-25 13:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7164456423) · edited 2026-11-25 14:07 UTC **Test report for `3ae0841` merged into `main` `379725a`: the Series S assert at `+0xb18de7` is gone; and how the conflict with `main` resolves** **The conflict.** `3ae0841` conflicts with `main` `379725a` in the tests of `crates/xcl/src/hle/kernelx.rs` only: `main` added tests at the place where this PR adds `scatter_without_pages_unmaps` (`mapping_fresh_pages_does_not_query_each_page`, `sparse_pages`, the two `pages_mapped_again_…` tests, `mapping_lazy_pages_again_does_not_query_each_page`). Keeping both sides resolves it: `main`'s tests as they are and this PR's test after them, before `scatter_matches_a_model_of_physical_pages`. The change to `XMemMapPhysicalPagesScatter` itself applies as it is, and the merged diff against `main` is the PR's +41/−3. **Tested** - NVIDIA GeForce RTX 3080 10 GB (32-lane waves), driver 616.92; Intel Core i9-10900K; 16 GB RAM, system-managed page file; Windows 11 Pro 26200.9974; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; tests in debug, runs in release. - Tree with this PR: `main` `379725a` + this PR (`3ae0841`, resolved as above) + #615 (`9251d80`, adapted to `main`'s presenter), a local merge. #615 is in it so that the Series S window shows a picture; it does not touch `kernelx.rs`. - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4` on that tree: 1257 passed, 0 failed, 46 ignored. `scatter_without_pages_unmaps` passes. 27 `SKIPPED` lines of 17 tests: 20 "no wave64", 3 per-lane f16 forms refused, 1 "no heap windows", 2 without the D3D12 debug layer, 1 that cannot turn the driver cache off (no Developer Mode). - Retail title 1.0.2.1, `device_type = "lockhart"` / `console_type_raw = 5`, `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=100 XCL_PRESS_A_AT=40,55`, the same saved state: | | `main` `379725a` | with this PR (tree above), 2 runs | |---|---|---| | `0x80000003` at `+0xb18de7` | at 44.6 s, 4.6 s after the first scripted A press | none | | how it ended | that assert | the title's check at `+0x193e00f` with `0x8007000e` (#333) at 118.2 s and 145.5 s | - In the run without this PR the registers at the `int3` have `rcx=0x57` (`ERROR_INVALID_PARAMETER`), as in the description and in @⁠gavinnolan's report. - The stop at `+0x193e00f` is the one of #333, not this PR: a pool heap for title textures is refused with about 12.5 GB of local video memory in use on this 10 GB card. (Corrected: I first put it down to the system's commit, which was nearly used up in these runs; a later run with a larger page file and 31.8 GB of commit free stops the same way at 127.4 s.) **Not tested** - This PR alone on `main` (the tree with it also has #615); AMD; the Series X profile; a `smoke.ps1` pair. **AI use** - Claude Code (Claude Fable 5.2) made the local merge, ran the builds, tests and runs, read the logs and wrote this report.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-25 15:18 UTC · original

Additional Linux/Wine + RTX 4060 Laptop validation of the change and regression from 3ae08413426eee45cc95f2c3c7e3d2b169ed1142.

Scope: the function change and scatter_without_pages_unmaps test were ported unchanged into a mixed local integration based on 06c9f5505f63f10c5ec49ef932d75b2c28177324, including #867/#1395 (stock-vkd3d vtable compatibility), #1069, #1916 and #615. This is not a clean-head or Windows smoke report, and not a competing fix.

Environment: Linux 6.17.0-40-generic, Wine 11.0, stock/assert-enabled vkd3d-proton 3.2.0 (2576c0b4adfae4a), DXVK 3.1.1-209; RTX 4060 Laptop 8 GiB, NVIDIA 590.48.01; i7-13620H, 16 GiB RAM; Rust 1.98.1, Windows MSVC cross-target.

Observed before the change: retail 1.0.2.1, Series S profile, stopped at +0xb18de7, rax=0, rcx=0x57, rdx=14, r8=0. Bounded disassembly resolves the call through thunk 0x145f3fd20 / IAT 0x146793a48 to xmem.dll!XMemMapPhysicalPagesScatter; the caller breaks when the call returns zero. This matches the report here.

Regression: ran cargo +1.98.1 test -p xcl --lib --target x86_64-pc-windows-msvc scatter_without_pages_unmaps -- --test-threads=1 --nocapture, through the Wine runner, once with XCL_DEFER_PRIVATE_HOME_TILES=0 and once with =1. Both passed (one unique test, two executions); UMA initialized in both, so its early-return skip was not taken. The test checks inaccessible unmapped addresses, preserved data after remapping and zero-count parity. Release MSVC-target build passed.

Bounded title follow-up: XCL_COHERENT_MB=3408 XCL_ACTIVITY=1 XCL_PSO_PRELOAD=0 XCL_DEFER_PRIVATE_HOME_TILES=1 XCL_FRAME_DUMP=300 XCL_PRESS_A_AT=40,55, same Series S profile, offline. The resource guard terminated the process at 60.44 s when board-wide GPU usage reached 7,233 MiB (7,200 MiB guard); available RAM was 4,462.8 MiB and free disk 13.527 GiB. The log reached DirectStorage request #16384 and its first successful BC7 BCPack unpack, with no +0xb18de7 exception recorded. The scatter call itself was not instrumented, and this short guarded run does not establish sustained world loading or gameplay. Last captured backbuffer was still the account picker. Offline XStore errors and command-list resubmission warnings remained, so this is not an error-free run.

Not tested: native Windows, AMD, clean PR head, full suite, or 15-minute gameplay/30fps. No proprietary assets or frame dumps attached.

AI assistance: omp / openai-codex/gpt-6-astra performed the local integration, commands, inspection and report. Existing PR authors retain credit for the fix and test.

**@⁠pickles976** on GitHub · 2026-11-25 15:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7166628594) Additional Linux/Wine + RTX 4060 Laptop validation of the change and regression from `3ae08413426eee45cc95f2c3c7e3d2b169ed1142`. **Scope:** the function change and `scatter_without_pages_unmaps` test were ported unchanged into a mixed local integration based on `06c9f5505f63f10c5ec49ef932d75b2c28177324`, including #867/#1395 (stock-vkd3d vtable compatibility), #1069, #1916 and #615. This is **not** a clean-head or Windows smoke report, and not a competing fix. **Environment:** Linux 6.17.0-40-generic, Wine 11.0, stock/assert-enabled vkd3d-proton 3.2.0 (`2576c0b4adfae4a`), DXVK 3.1.1-209; RTX 4060 Laptop 8 GiB, NVIDIA 590.48.01; i7-13620H, 16 GiB RAM; Rust 1.98.1, Windows MSVC cross-target. **Observed before the change:** retail 1.0.2.1, Series S profile, stopped at `+0xb18de7`, `rax=0`, `rcx=0x57`, `rdx=14`, `r8=0`. Bounded disassembly resolves the call through thunk `0x145f3fd20` / IAT `0x146793a48` to `xmem.dll!XMemMapPhysicalPagesScatter`; the caller breaks when the call returns zero. This matches the report here. **Regression:** ran `cargo +1.98.1 test -p xcl --lib --target x86_64-pc-windows-msvc scatter_without_pages_unmaps -- --test-threads=1 --nocapture`, through the Wine runner, once with `XCL_DEFER_PRIVATE_HOME_TILES=0` and once with `=1`. Both passed (one unique test, two executions); UMA initialized in both, so its early-return skip was not taken. The test checks inaccessible unmapped addresses, preserved data after remapping and zero-count parity. Release MSVC-target build passed. **Bounded title follow-up:** `XCL_COHERENT_MB=3408 XCL_ACTIVITY=1 XCL_PSO_PRELOAD=0 XCL_DEFER_PRIVATE_HOME_TILES=1 XCL_FRAME_DUMP=300 XCL_PRESS_A_AT=40,55`, same Series S profile, offline. The resource guard terminated the process at 60.44 s when board-wide GPU usage reached 7,233 MiB (7,200 MiB guard); available RAM was 4,462.8 MiB and free disk 13.527 GiB. The log reached DirectStorage request #16384 and its first successful BC7 BCPack unpack, with no `+0xb18de7` exception recorded. **The scatter call itself was not instrumented, and this short guarded run does not establish sustained world loading or gameplay.** Last captured backbuffer was still the account picker. Offline XStore errors and command-list resubmission warnings remained, so this is not an error-free run. Not tested: native Windows, AMD, clean PR head, full suite, or 15-minute gameplay/30fps. No proprietary assets or frame dumps attached. AI assistance: omp / openai-codex/gpt-6-astra performed the local integration, commands, inspection and report. Existing PR authors retain credit for the fix and test.
Author
Owner

@⁠ivall on GitHub · 2026-11-25 16:29 UTC · original

Merged into main (65fc114); the only conflict was in the tests (both kept).

  • Tested: AMD RDNA4, Windows, DXC 1.8.2502.11: the suite on the merged tree, 1279 passed, 2 failed (#2115, as on main), 46 ignored. Without the change, scatter_without_pages_unmaps fails on Windows with your assertion ("no page array: unmapped, not refused"); with it, it passes.
  • In a title: a retail title in Series S mode stopped on its own int3 after the failed call; with this it goes on (in a tree with other open PRs).
  • For #2307 / #2308: with XCL_PAGE_ALIAS=1 the NULL array crashes: that branch reads pages.add(i), and the second page is read at address 8. The test here does not see it because it runs without aliasing. In my tree every page is unmapped with one page 0.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this on the maintainer's behalf.

**@⁠ivall** on GitHub · 2026-11-25 16:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/495#issuecomment-7168062705) Merged into `main` (`65fc114`); the only conflict was in the tests (both kept). - **Tested:** AMD RDNA4, Windows, DXC 1.8.2502.11: the suite on the merged tree, 1279 passed, 2 failed (#2115, as on `main`), 46 ignored. Without the change, `scatter_without_pages_unmaps` fails on Windows with your assertion ("no page array: unmapped, not refused"); with it, it passes. - **In a title:** a retail title in Series S mode stopped on its own `int3` after the failed call; with this it goes on (in a tree with other open PRs). - **For #2307 / #2308:** with `XCL_PAGE_ALIAS=1` the NULL array crashes: that branch reads `pages.add(i)`, and the second page is read at address 8. The test here does not see it because it runs without aliasing. In my tree every page is unmapped with one page 0. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this on the maintainer's behalf.
This discussion has been locked. Commenting is limited to contributors.
No description provided.