Retail title reaches its title screen and menus: GPU title memory in large pages, to_zero pruned once #200

Closed
Sr-0w wants to merge 1 commit from upstream-pr/203 into main
Sr-0w commented 2026-11-23 20:40:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Sr-0w on 2026-11-23T20:40:47Z.


Retail title on screen

With this PR together with #163, #170, #164, #168, #169/#192 and #187, plus compute pipelines built at their first use (#162), the retail title shows its title screen and the Navigation menu, reacts to the pad (Y on the keyboard's E), and ran for more than 5 minutes without a crash on an RX 7800 XT:

Title screen Navigation menu
title menu

Still wrong, and visible above: full-screen quads draw only one triangle (the diagonal), and part of the text is missing. More on that in a follow-up.

The fixes in this PR

1. GPU title memory in large pages. The retail title allocates its index and vertex data with VirtualAlloc(MEM_LARGE_PAGES | MEM_RESERVE | MEM_COMMIT, protection 0x22004), in blocks of 1.2 GB, 0.6 GB and 0.6 GB. These carry neither MEM_GRAPHICS nor MEM_64K_PAGES, so they got plain process memory. The GPU then faulted on the index buffers there: a driver timeout (0x887a0006) about 50 s in. Radeon GPU Detective showed a page fault during a DrawIndexed, at an address with no resource, inside that VirtualAlloc.

Large-page allocations with protection bit 0x20000 now get a sparse window, like MEM_64K_PAGES ones. They are placed from the highest window down, so that the title's physical pages (6.3 GB in one piece) keep the lower windows. Without #187 (page homes out of GPU space), everything does not fit: AllocateTitlePhysicalPages(99776): no room in UMA, then the title's assertion.

2. sparse::decommit_tiles walked all of to_zero at every decommit that unmapped a tile. That list grows until the next ExecuteCommandLists. While the retail title maps gigabytes of physical pages during loading, this took seconds per page: rendering froze, and the title's watchdog ended the game (mov [0], 0 at +0x2215c35). The list is now pruned once, where the runs are taken. The unit test is adapted accordingly.

Testing

  • cargo test --release -p xcl --lib: 535 passed, and 1 failed, gpu_wave64_ps_whole_wave_reductions, which already fails on main on this machine.
  • Retail title, RX 7800 XT, driver 26.11.2: before, a GPU timeout at ~50 s. After, the title screen and menus, running for 5+ minutes.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5460859900 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/203). Originally posted by [Sr-0w](https://github.com/Sr-0w) on 2026-11-23T20:40:47Z. --- ## Retail title on screen With this PR together with #163, #170, #164, #168, #169/#192 and #187, plus compute pipelines built at their first use (#162), the retail title shows its **title screen** and the **Navigation menu**, reacts to the pad (Y on the keyboard's E), and ran for more than 5 minutes without a crash on an RX 7800 XT: | Title screen | Navigation menu | |---|---| | ![title](https://raw.githubusercontent.com/Sr-0w/xcl/media/gta6/gta6-title-screen.png) | ![menu](https://raw.githubusercontent.com/Sr-0w/xcl/media/gta6/gta6-navigation-menu.png) | Still wrong, and visible above: full-screen quads draw only one triangle (the diagonal), and part of the text is missing. More on that in a follow-up. ## The fixes in this PR **1. GPU title memory in large pages.** The retail title allocates its index and vertex data with `VirtualAlloc(MEM_LARGE_PAGES | MEM_RESERVE | MEM_COMMIT, protection 0x22004)`, in blocks of 1.2 GB, 0.6 GB and 0.6 GB. These carry neither `MEM_GRAPHICS` nor `MEM_64K_PAGES`, so they got plain process memory. The GPU then faulted on the index buffers there: a driver timeout (`0x887a0006`) about 50 s in. Radeon GPU Detective showed a page fault during a `DrawIndexed`, at an address with no resource, inside that `VirtualAlloc`. Large-page allocations with protection bit `0x20000` now get a sparse window, like `MEM_64K_PAGES` ones. They are placed from the highest window down, so that the title's physical pages (6.3 GB in one piece) keep the lower windows. Without #187 (page homes out of GPU space), everything does not fit: `AllocateTitlePhysicalPages(99776): no room in UMA`, then the title's assertion. **2. `sparse::decommit_tiles` walked all of `to_zero` at every decommit that unmapped a tile.** That list grows until the next `ExecuteCommandLists`. While the retail title maps gigabytes of physical pages during loading, this took seconds per page: rendering froze, and the title's watchdog ended the game (`mov [0], 0` at `+0x2215c35`). The list is now pruned once, where the runs are taken. The unit test is adapted accordingly. ## Testing - `cargo test --release -p xcl --lib`: 535 passed, and 1 failed, `gpu_wave64_ps_whole_wave_reductions`, which already fails on main on this machine. - Retail title, RX 7800 XT, driver 26.11.2: before, a GPU timeout at ~50 s. After, the title screen and menus, running for 5+ minutes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Kalmarv commented 2026-11-24 07:04:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-23T20:44:38Z.


Great result. The two problems still visible in your screenshots each have an open PR you could try on the same stack:

  • Full-screen quads drawing only one triangle (the diagonal): these are console rect lists (topology 17, PSO type 19).
    • #199 adds a geometry shader that completes each rect after the VS, so indexed draws and any corner order are covered too. Its GPU tests pass on NVIDIA (RTX 5070 Ti, and RTX 2060 under Wine). It hasn't run on AMD yet, so an RX 7800 XT run would be very useful.
    • #195 expands non-indexed rect draws on the CPU.
    • The two are being made to compose: #195 will skip pipelines that already have #199's GS (discussion).
  • Missing text: #201 counts DirectStorage BCPack refusals per mode in report.json. XCL refuses every BCPack chunk today, and the log shows only the first one. With XCL_DSTORAGE_BCPACK_FILL=1, #201 also fills each refused texture with solid magenta. If the missing letters turn into magenta boxes, they come from BCPack (most likely BC7). If they don't, the cause is elsewhere.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ivall/xcl:comment:7113495173 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/203#issuecomment-7113495173). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-23T20:44:38Z. --- Great result. The two problems still visible in your screenshots each have an open PR you could try on the same stack: - **Full-screen quads drawing only one triangle (the diagonal):** these are console rect lists (topology 17, PSO type 19). - #199 adds a geometry shader that completes each rect after the VS, so indexed draws and any corner order are covered too. Its GPU tests pass on NVIDIA (RTX 5070 Ti, and RTX 2060 under Wine). It hasn't run on AMD yet, so an RX 7800 XT run would be very useful. - #195 expands non-indexed rect draws on the CPU. - The two are being made to compose: #195 will skip pipelines that already have #199's GS ([discussion](https://github.com/ivall/xcl/pull/195#issuecomment-7113115279)). - **Missing text:** #201 counts DirectStorage BCPack refusals per mode in `report.json`. XCL refuses every BCPack chunk today, and the log shows only the first one. With `XCL_DSTORAGE_BCPACK_FILL=1`, #201 also fills each refused texture with solid magenta. If the missing letters turn into magenta boxes, they come from BCPack (most likely BC7). If they don't, the cause is elsewhere. AI-assisted (Claude Code).
WarmMilkCodes commented 2026-11-24 07:04:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WarmMilkCodes on 2026-11-23T20:45:34Z.


FYI on the one test failure: gpu_wave64_ps_whole_wave_reductions failing on main on an RX 7800 XT is a known AMD issue, fixed by #155. RDNA2 and RDNA3 report 32–64 lanes, but the driver runs wave64 pixel shaders in 32-lane waves, so v_readlane 32 wraps to lane 0 (the test sums twice: 928 vs 464). #155 gives VS / PS the upper_lanes 32-lane form whenever the GPU can run 32-lane waves. It has been confirmed on an RX 6600 XT and on two RX 7800 XTs (one at 32.0.32015.7029, one at 32.0.32029.2010), with no change on an RTX 4080 Super. It's on top of current main.

Not claiming it's related to the missing text, but with #155 that test should pass on your 7800 XT too, which takes it out of the picture when you narrow that down.

<!-- greyfinch-sync:ivall/xcl:comment:7113516956 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/203#issuecomment-7113516956). Originally posted by [WarmMilkCodes](https://github.com/WarmMilkCodes) on 2026-11-23T20:45:34Z. --- FYI on the one test failure: `gpu_wave64_ps_whole_wave_reductions` failing on main on an RX 7800 XT is a known AMD issue, fixed by #155. RDNA2 and RDNA3 report 32–64 lanes, but the driver runs wave64 pixel shaders in 32-lane waves, so `v_readlane` 32 wraps to lane 0 (the test sums twice: 928 vs 464). #155 gives VS / PS the `upper_lanes` 32-lane form whenever the GPU can run 32-lane waves. It has been confirmed on an RX 6600 XT and on two RX 7800 XTs (one at 32.0.32015.7029, one at 32.0.32029.2010), with no change on an RTX 4080 Super. It's on top of current main. Not claiming it's related to the missing text, but with #155 that test should pass on your 7800 XT too, which takes it out of the picture when you narrow that down.
Kalmarv commented 2026-11-24 07:04:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-23T21:20:20Z.


Two findings on a merge with main 6da33fa, neither blocking the menus:

  • Alignment: a tagged 2 MiB graphics allocation now gets 64 KiB alignment (address mod 2 MiB = 0x10000 when the first 64 KiB of window 2 is taken); kernelx.rs:196 passes 64 KiB where the existing graphics path asks for 2 MiB.
  • Stale clear on reuse (sparse.rs:191): after a full unmap and a new pool tile at the same VA, the old 4 KiB clear is kept. Redundant work only; reused tiles are fully cleared anyway.

The tagged allocation itself works: it lands in sparse window 2 and both GPU dispatches read the expected words, where main reads 0 instead of 1077.

Tested

The tagged allocation reached sparse window 2 and returned the expected 64 words in each of two GPU dispatches, including after replacing the input descriptor. I found a 2 MiB alignment regression and a stale clear on VA reuse.

Synthetic probe Main 6da33fa Main + #203 123538b Main + #203 + #187 390ef71
2 MiB, allocation flags 0x20003000, protection 0x22004 Coherent window 3 Sparse window 2 Sparse window 2
Same request with MEM_GRAPHICS, first 64 KiB of window 2 occupied Aligned Address mod 2 MiB = 0x10000 Same
2 GiB tagged VA reservation, 6 GiB mapping target, then 6 GiB physical home Succeeded Succeeded Succeeded
Old 4 KiB clear after full unmap and replacement at same VA Discarded Retained Retained

At PR-head crates/xcl/src/hle/kernelx.rs:196, the new branch passes 64 KiB alignment even when the existing graphics path would request 2 MiB. The fallback also aligns to 64 KiB. On all current-main builds, protection 0x2404 and the ordinary-page control went to coherent window 3. The 64 KiB page control went to sparse window 1.

At crates/xcl/src/hle/d3d12x/sparse.rs:191, decommitting one page, decommitting the rest of its tile, then installing a different pool tile at the same VA before pruning retained the old page clear. This demonstrates redundant work. Reused pool tiles already receive a full clear.

RTX 5070 Ti, 610.74, Windows x64. cargo test -p xcl --lib --no-run -j 2, then serial kernelx, sparse and tagged-dispatch tests. All three builds returned 27 passed, 3 failed, 1 ignored. On main, submit 1 read 0 instead of 1077 at lane 0 and two probes expected sparse placement. On both merges, the dispatch passed and the three failures were the two alignment checks and the stale clear. Direct head 7cbd008 also passed both dispatches. Against the original 956a476 control the tagged allocation was outside UMA, and the 6 GiB home required #187. On 6da33fa that capacity check succeeds without #187. The updated sparse unit test calls a helper absent on 956a476, so I used its original unit test and the same remap probe on the control. The local #187 stack uses 8c0346d's CPU-home implementation and preserves main's coherent-allocation branch.

Not tested

Retail boot, frame output, or pre-device timing. With the D3D12 debug layer enabled, the original baseline, PR and stack all hit CreateReservedResource(E_OUTOFMEMORY) before GPU readback. The reported readbacks used native D3D12 with the layer off.

AI use — Codex, GPT-6.2 Astra.

<!-- greyfinch-sync:ivall/xcl:comment:7114326511 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/203#issuecomment-7114326511). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-23T21:20:20Z. --- Two findings on a merge with main 6da33fa, neither blocking the menus: - **Alignment:** a tagged 2 MiB graphics allocation now gets 64 KiB alignment (address mod 2 MiB = 0x10000 when the first 64 KiB of window 2 is taken); `kernelx.rs:196` passes 64 KiB where the existing graphics path asks for 2 MiB. - **Stale clear on reuse** (`sparse.rs:191`): after a full unmap and a new pool tile at the same VA, the old 4 KiB clear is kept. Redundant work only; reused tiles are fully cleared anyway. The tagged allocation itself works: it lands in sparse window 2 and both GPU dispatches read the expected words, where main reads 0 instead of 1077. **Tested** The tagged allocation reached sparse window 2 and returned the expected 64 words in each of two GPU dispatches, including after replacing the input descriptor. I found a 2 MiB alignment regression and a stale clear on VA reuse. | Synthetic probe | Main `6da33fa` | Main + #203 `123538b` | Main + #203 + #187 `390ef71` | |---|---|---|---| | 2 MiB, allocation flags `0x20003000`, protection `0x22004` | Coherent window 3 | Sparse window 2 | Sparse window 2 | | Same request with `MEM_GRAPHICS`, first 64 KiB of window 2 occupied | Aligned | Address mod 2 MiB = `0x10000` | Same | | 2 GiB tagged VA reservation, 6 GiB mapping target, then 6 GiB physical home | Succeeded | Succeeded | Succeeded | | Old 4 KiB clear after full unmap and replacement at same VA | Discarded | Retained | Retained | At PR-head `crates/xcl/src/hle/kernelx.rs:196`, the new branch passes 64 KiB alignment even when the existing graphics path would request 2 MiB. The fallback also aligns to 64 KiB. On all current-main builds, protection `0x2404` and the ordinary-page control went to coherent window 3. The 64 KiB page control went to sparse window 1. At `crates/xcl/src/hle/d3d12x/sparse.rs:191`, decommitting one page, decommitting the rest of its tile, then installing a different pool tile at the same VA before pruning retained the old page clear. This demonstrates redundant work. Reused pool tiles already receive a full clear. RTX 5070 Ti, 610.74, Windows x64. `cargo test -p xcl --lib --no-run -j 2`, then serial kernelx, sparse and tagged-dispatch tests. All three builds returned 27 passed, 3 failed, 1 ignored. On main, submit 1 read 0 instead of 1077 at lane 0 and two probes expected sparse placement. On both merges, the dispatch passed and the three failures were the two alignment checks and the stale clear. Direct head `7cbd008` also passed both dispatches. Against the original `956a476` control the tagged allocation was outside UMA, and the 6 GiB home required #187. On `6da33fa` that capacity check succeeds without #187. The updated sparse unit test calls a helper absent on `956a476`, so I used its original unit test and the same remap probe on the control. The local #187 stack uses `8c0346d`'s CPU-home implementation and preserves main's coherent-allocation branch. **Not tested** Retail boot, frame output, or pre-device timing. With the D3D12 debug layer enabled, the original baseline, PR and stack all hit `CreateReservedResource(E_OUTOFMEMORY)` before GPU readback. The reported readbacks used native D3D12 with the layer off. **AI use** — Codex, GPT-6.2 Astra.
mrp1no commented 2026-11-24 07:04:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mrp1no on 2026-11-23T21:47:35Z.


NVIDIA + Intel result: with this PR and #187, GTA VI goes through its whole first-boot flow on an RTX 3060.

Setup:

  • RTX 3060 12 GB, driver 610.88; i7-11700K; 32 GB RAM; Windows 11 26300.
  • DXC from SDK 10.0.26100; release build.
  • XCL_NETWORK=0, Series X profile (the default).
  • XCL: main 0f34407 + this PR (7cbd008) + #187 (c74b03a) + #242. #242 is only needed on the Series S profile.

These are frames the title presented, written by XCL_FRAME_DUMP at a quarter of each side (960x540):

Account prompt Intro movie (green: zero YUV planes)
account movie
Navigation experience Brightness
navigation brightness
Legal notices
legal

A 420 s timed run presented 1,554 frames. The menus ran at 4–7 fps.

  1. Account prompt. A (Enter) picks PLAYER1.

  2. The intro movie plays, but every frame is solid green. That colour is exactly BT.601 YUV (0, 0, 0) → RGB (0, 136, 0), so the Bink planes the title registers (BinkGetFrameBuffersInfo / BinkRegisterFrameBuffers, decoded on the CPU and drawn by its PS_Bink* shaders) reach the GPU as zeros. I'm looking into it.

  3. The first-boot screens, with their text readable:

    • navigation experience (minimap);
    • brightness calibration;
    • legal notices;
    • Rockstar's privacy policy and terms of service, where text size could be adjusted too.
  4. After confirming those, a black screen while it loads:

    • up to 337 MB in 2 s through DirectStorage;
    • local video memory 8.8 → 13.7 GB, past the card's 12 GB;
    • process commit 19 → 28.4 GB.

    It was still loading when the timed run ended.

Without this PR on the same machine, the title's hang watchdog ends the game at ~32 s. At that point XCL's thread dump shows a thread in XMemMapPhysicalPagesScatter → sparse::decommit_tiles, walking to_zero, so this PR's second fix is what gets an Intel + NVIDIA machine past that point too.

No game files attached; the screenshots are XCL frame dumps. AI-assisted (Claude Code).

<!-- greyfinch-sync:ivall/xcl:comment:7114924728 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/203#issuecomment-7114924728). Originally posted by [mrp1no](https://github.com/mrp1no) on 2026-11-23T21:47:35Z. --- **NVIDIA + Intel result: with this PR and #187, GTA VI goes through its whole first-boot flow on an RTX 3060.** Setup: - RTX 3060 12 GB, driver 610.88; i7-11700K; 32 GB RAM; Windows 11 26300. - DXC from SDK 10.0.26100; release build. - `XCL_NETWORK=0`, Series X profile (the default). - XCL: main `0f34407` + this PR (`7cbd008`) + #187 (`c74b03a`) + #242. #242 is only needed on the Series S profile. These are frames the title presented, written by `XCL_FRAME_DUMP` at a quarter of each side (960x540): | Account prompt | Intro movie (green: zero YUV planes) | |---|---| | ![account](https://raw.githubusercontent.com/mrp1no/xcl/media/gta6/01-account-prompt.png) | ![movie](https://raw.githubusercontent.com/mrp1no/xcl/media/gta6/02-intro-movie-green.png) | | **Navigation experience** | **Brightness** | | ![navigation](https://raw.githubusercontent.com/mrp1no/xcl/media/gta6/03-navigation-experience.png) | ![brightness](https://raw.githubusercontent.com/mrp1no/xcl/media/gta6/04-brightness.png) | | **Legal notices** | | | ![legal](https://raw.githubusercontent.com/mrp1no/xcl/media/gta6/05-legal-notices.png) | | A 420 s timed run presented 1,554 frames. The menus ran at 4–7 fps. 1. Account prompt. A (Enter) picks PLAYER1. 2. The intro movie plays, but every frame is solid green. That colour is exactly BT.601 YUV (0, 0, 0) → RGB (0, 136, 0), so the Bink planes the title registers (`BinkGetFrameBuffersInfo` / `BinkRegisterFrameBuffers`, decoded on the CPU and drawn by its `PS_Bink*` shaders) reach the GPU as zeros. I'm looking into it. 3. The first-boot screens, with their text readable: - navigation experience (minimap); - brightness calibration; - legal notices; - Rockstar's privacy policy and terms of service, where text size could be adjusted too. 4. After confirming those, a black screen while it loads: - up to 337 MB in 2 s through DirectStorage; - local video memory 8.8 → 13.7 GB, past the card's 12 GB; - process commit 19 → 28.4 GB. It was still loading when the timed run ended. Without this PR on the same machine, the title's hang watchdog ends the game at ~32 s. At that point XCL's thread dump shows a thread in `XMemMapPhysicalPagesScatter` → `sparse::decommit_tiles`, walking `to_zero`, so this PR's second fix is what gets an Intel + NVIDIA machine past that point too. No game files attached; the screenshots are XCL frame dumps. AI-assisted (Claude Code).
shelbykb2 commented 2026-11-24 07:04:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shelbykb2 on 2026-11-23T22:20:42Z.


RDNA2 test report: AMD Radeon RX 6800 (16 GB), driver 32.0.21045.29003, Windows 11, release build, XCL_NETWORK=0, a newer retail game.

  • This stack – main 956a476 + #170 (aeadb23) + #164 (ce0cb0a) + #168 (070a737) + #192 (50cff5d) + #187 (8c0346d) + #162 (7db28b0) + this PR (7cbd008), with XCL_TRACE_FRAME=1: first PresentX at 6.0 s; at 48.4 s a write to address 0 inside the C runtime's memset, and the title ended. We traced it to GetGPUVirtualAddress answering 0 for some placed textures (#168 covered only those that become a resource of their own). main now gives those textures their title address, and the crash has not come back in our runs on main 0f34407 (with and without a local memory-routing change), which get past that point on this card.

  • Where the empty V#s point – main 0f34407 plus a local census logger (no routing change), 512 MB coherent window, at 30 s: 3 844 empty V#s. By the allocation their address lies in:

    • XMemVirtualAlloc type 0x20003000, protect 0x2404 (one call, 2.25 GB, committed): 3 103 SRV + 349 UAV
    • type 0x20402000, protect 0x2404 (a reservation): 129 UAV + 125 SRV
    • type 0x20003000, protect 0x22004 (three calls, 2.39 GB): 69 SRV + 69 UAV

    So the 0x2404 block is read by shaders too; the large-page rule here (protect bit 0x20000) covers the 0x22004 allocations only.

  • Not measured: the same census with the coherent window sized for the title's whole ask.

Report written with Claude Code, from our own runs.

<!-- greyfinch-sync:ivall/xcl:comment:7115635252 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/203#issuecomment-7115635252). Originally posted by [shelbykb2](https://github.com/shelbykb2) on 2026-11-23T22:20:42Z. --- RDNA2 test report: AMD Radeon RX 6800 (16 GB), driver 32.0.21045.29003, Windows 11, release build, `XCL_NETWORK=0`, a newer retail game. - **This stack** – main `956a476` + #170 (`aeadb23`) + #164 (`ce0cb0a`) + #168 (`070a737`) + #192 (`50cff5d`) + #187 (`8c0346d`) + #162 (`7db28b0`) + this PR (`7cbd008`), with `XCL_TRACE_FRAME=1`: first `PresentX` at 6.0 s; at 48.4 s a write to address 0 inside the C runtime's `memset`, and the title ended. We traced it to `GetGPUVirtualAddress` answering 0 for some placed textures (#168 covered only those that become a resource of their own). `main` now gives those textures their title address, and the crash has not come back in our runs on `main` `0f34407` (with and without a local memory-routing change), which get past that point on this card. - **Where the empty V#s point** – `main` `0f34407` plus a local census logger (no routing change), 512 MB coherent window, at 30 s: 3 844 empty V#s. By the allocation their address lies in: - `XMemVirtualAlloc` type 0x20003000, protect 0x2404 (one call, 2.25 GB, committed): 3 103 SRV + 349 UAV - type 0x20402000, protect 0x2404 (a reservation): 129 UAV + 125 SRV - type 0x20003000, protect 0x22004 (three calls, 2.39 GB): 69 SRV + 69 UAV So the 0x2404 block is read by shaders too; the large-page rule here (protect bit 0x20000) covers the 0x22004 allocations only. - **Not measured:** the same census with the coherent window sized for the title's whole ask. Report written with Claude Code, from our own runs.
simnJS commented 2026-11-24 07:04:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by simnJS on 2026-11-23T22:39:29Z.


Tested on Linux (Wine, NVIDIA): as is the title does not start; merged on current main it runs, same picture as main.

Tested commits: 7cbd008 (head of #203; its base 956a476 is 126 commits behind main 9ab7d76) and a local merge of main + #203, e7c27cc (no conflict). Compared with main at 9ab7d76, same machine, same protocol.

Tested

  • Ubuntu 26.04.1, RTX 4080 SUPER (NVIDIA 595.99.02), Ryzen 9 7950X3D. Proton Experimental 11.0 Wine (not Windows), vkd3d-proton v3.1 (patched as in #257), DXVK 3.1.1, DXC 1.9.2609. Rust 1.99.1, release, x86_64-pc-windows-gnu.
  • Both builds compile with cargo build --release --locked --target x86_64-pc-windows-gnu -p xcl.
  • 7cbd008 as is: the game dies 2.9 s in, unhandled exception 0x80000003 in game_scarlett_master.exe+0x19f5291, right after AllocateTitlePhysicalPages(99776): no room in UMA (WARN). The branch lacks the commits merged since its base, so I do not know whether this is #203's own doing.
  • main + #203 (e7c27cc): starts, 70 s without a crash, 60 presents per 2 s (30 fps), draws per 2 s 360 → 1320 (main: 360 → 1920; this run was cut at 70 s before the Brightness panel was drawn, so the higher count was not reached). The log now says AllocateTitlePhysicalPages(99776): no room in unified memory – their home is plain memory (INFO), once. No new WARN / ERROR against main (same 64 distinct lines, 75 total).
  • Frame dumps: black → green (the intro video, (0,135,0)) → grey (63,63,63) at the last dump, which shows only the grey background and the white diagonal (the "Brightness Level" panel was not drawn yet when the 70 s run ended), so I could not judge the text of this build from the dumps.
  • The title reaching its title screen / menus (the PR's goal) is not shown by this run: 70 s, first menus only. The video is still green, as on main.
  • Also tried #252 + #203 together (local merge 7e33aac, no conflict): starts, no crash in 70 s, no new WARN / ERROR, the same "Brightness Level" screen with the same missing letters as main.

Not tested

  • Windows, AMD (including RDNA4). The test suite and scripts/smoke.ps1 were not run.
  • Anything past the first menus; the press time of A was not recorded.

AI use

  • Written with an AI coding agent from real runs (it built and launched each version; a person pressed A), then checked by the author.
<!-- greyfinch-sync:ivall/xcl:comment:7116025288 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/203#issuecomment-7116025288). Originally posted by [simnJS](https://github.com/simnJS) on 2026-11-23T22:39:29Z. --- **Tested on Linux (Wine, NVIDIA): as is the title does not start; merged on current `main` it runs, same picture as `main`.** Tested commits: `7cbd008` (head of #203; its base `956a476` is 126 commits behind `main` `9ab7d76`) and a local merge of `main` + #203, `e7c27cc` (no conflict). Compared with `main` at `9ab7d76`, same machine, same protocol. **Tested** - Ubuntu 26.04.1, RTX 4080 SUPER (NVIDIA 595.99.02), Ryzen 9 7950X3D. Proton Experimental 11.0 Wine (not Windows), vkd3d-proton v3.1 (patched as in #257), DXVK 3.1.1, DXC 1.9.2609. Rust 1.99.1, release, `x86_64-pc-windows-gnu`. - Both builds compile with `cargo build --release --locked --target x86_64-pc-windows-gnu -p xcl`. - `7cbd008` as is: the game dies 2.9 s in, `unhandled exception 0x80000003 in game_scarlett_master.exe+0x19f5291`, right after `AllocateTitlePhysicalPages(99776): no room in UMA` (WARN). The branch lacks the commits merged since its base, so I do not know whether this is #203's own doing. - `main` + #203 (`e7c27cc`): starts, 70 s without a crash, 60 presents per 2 s (30 fps), draws per 2 s 360 → 1320 (`main`: 360 → 1920; this run was cut at 70 s before the Brightness panel was drawn, so the higher count was not reached). The log now says `AllocateTitlePhysicalPages(99776): no room in unified memory – their home is plain memory` (INFO), once. No new `WARN` / `ERROR` against `main` (same 64 distinct lines, 75 total). - Frame dumps: black → green (the intro video, `(0,135,0)`) → grey `(63,63,63)` at the last dump, which shows only the grey background and the white diagonal (the "Brightness Level" panel was not drawn yet when the 70 s run ended), so I could not judge the text of this build from the dumps. - The title reaching its title screen / menus (the PR's goal) is not shown by this run: 70 s, first menus only. The video is still green, as on `main`. - Also tried #252 + #203 together (local merge `7e33aac`, no conflict): starts, no crash in 70 s, no new `WARN` / `ERROR`, the same "Brightness Level" screen with the same missing letters as `main`. **Not tested** - Windows, AMD (including RDNA4). The test suite and `scripts/smoke.ps1` were not run. - Anything past the first menus; the press time of A was not recorded. **AI use** - Written with an AI coding agent from real runs (it built and launched each version; a person pressed A), then checked by the author.
GreemSC commented 2026-11-24 12:05:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by GreemSC on 2026-11-24T11:38:33Z.


Test report (Linux, RDNA3): the to_zero part shortens the freeze after the intro from 6.1 s to 4.5 s. No crash, and the title screen is unchanged.

Setup

  • RX 7900 XT (RADV, Mesa 26.2.5), i7-12700K, 16 GB RAM, CachyOS (kernel 7.3.5).
  • Proton-CachyOS Wine with its own vkd3d-proton (0bb64c5).
  • Retail 1.0.2.1, XCL_NETWORK=0, XCL_PSO_PRELOAD=0 (see #1035).
  • x86_64-pc-windows-msvc release, built on Linux with the xwin SDK.
  • Base: main 384f7f7 + #871 + #684, with and without this PR's head 7cbd008. It applies with git apply --3way and no conflict.
  • Each run is 120 s with no input: intro, load, title screen.
  • Frame times come from MangoHud. "Freeze" is the longest frame of the run, the load after the intro.
freeze title screen at 30 fps from p99 after 15 s crashes
base 6191 / 6058 ms ~20 s 39.3 / 39.5 ms 0 / 0
base + #203 4432 / 4612 ms ~18 s 35.4 / 38.7 ms 0 / 0

The long frames right after the freeze are there on both sides (base: 1023 and 390 ms; with #203: one of 368 ms). The game's memory (RAM + swap) peaked at 5.0–5.4 GB on both sides.

Why it helps, measured on the base

  • 28 thread dumps (XCL_THREAD_DUMP_AT, every 0.25 s through the freeze) put the title's thread in MapTitlePhysicalPages → move_away for most of it.
  • A temporary counter in decommit_tiles showed that to_zero stays at ~10 770 entries for the whole load, because nothing submits to empty it. It was walked end to end about 9 300 times a second: 441 M mapped lookups in 4.4 s.
  • This PR prunes it once where the runs are taken, which is what its comment says.
  • A narrower local variant gave 5.1 s: on each decommit, drop only the entries of the tiles it just unmapped. This PR does better.

What is left of the freeze (dumps with this PR)

  • ~2 s of page moves: tile mappings through vkd3d-proton, VirtualFree under Wine, and the page copies.
  • ~0.5 s of the title's own work.
  • ~1.3 s in which the presenting thread waits in WaitFrameEventX while no CPU thread is busy.

Not tested: the suite (no Windows here), the large-page half of the PR on its own (it changed nothing visible in these runs: no GPU fault, same video memory), world loading (this setup stops at #505), other GPUs.

AI use: Claude Code (Claude Opus 5.5) ran the runs and the dumps, added the temporary counter (not in any PR), and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7130359860 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/203#issuecomment-7130359860). Originally posted by [GreemSC](https://github.com/GreemSC) on 2026-11-24T11:38:33Z. --- **Test report (Linux, RDNA3): the `to_zero` part shortens the freeze after the intro from 6.1 s to 4.5 s. No crash, and the title screen is unchanged.** **Setup** - RX 7900 XT (RADV, Mesa 26.2.5), i7-12700K, 16 GB RAM, CachyOS (kernel 7.3.5). - Proton-CachyOS Wine with its own vkd3d-proton (`0bb64c5`). - Retail 1.0.2.1, `XCL_NETWORK=0`, `XCL_PSO_PRELOAD=0` (see #1035). - `x86_64-pc-windows-msvc` release, built on Linux with the xwin SDK. - Base: `main` `384f7f7` + #871 + #684, with and without this PR's head `7cbd008`. It applies with `git apply --3way` and no conflict. - Each run is 120 s with no input: intro, load, title screen. - Frame times come from MangoHud. "Freeze" is the longest frame of the run, the load after the intro. | | freeze | title screen at 30 fps from | p99 after 15 s | crashes | |---|---|---|---|---| | base | 6191 / 6058 ms | ~20 s | 39.3 / 39.5 ms | 0 / 0 | | base + #203 | 4432 / 4612 ms | ~18 s | 35.4 / 38.7 ms | 0 / 0 | The long frames right after the freeze are there on both sides (base: 1023 and 390 ms; with #203: one of 368 ms). The game's memory (RAM + swap) peaked at 5.0–5.4 GB on both sides. **Why it helps, measured on the base** - 28 thread dumps (`XCL_THREAD_DUMP_AT`, every 0.25 s through the freeze) put the title's thread in `MapTitlePhysicalPages` → `move_away` for most of it. - A temporary counter in `decommit_tiles` showed that `to_zero` stays at ~10 770 entries for the whole load, because nothing submits to empty it. It was walked end to end about 9 300 times a second: 441 M `mapped` lookups in 4.4 s. - This PR prunes it once where the runs are taken, which is what its comment says. - A narrower local variant gave 5.1 s: on each decommit, drop only the entries of the tiles it just unmapped. This PR does better. **What is left of the freeze** (dumps with this PR) - ~2 s of page moves: tile mappings through vkd3d-proton, `VirtualFree` under Wine, and the page copies. - ~0.5 s of the title's own work. - ~1.3 s in which the presenting thread waits in `WaitFrameEventX` while no CPU thread is busy. **Not tested:** the suite (no Windows here), the large-page half of the PR on its own (it changed nothing visible in these runs: no GPU fault, same video memory), world loading (this setup stops at #505), other GPUs. AI use: Claude Code (Claude Opus 5.5) ran the runs and the dumps, added the temporary counter (not in any PR), and wrote this report.
DavidM1911 commented 2026-11-25 16:12:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T15:19:46Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7166670468 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/203#issuecomment-7166670468). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T15:19:46Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
DavidM1911 commented 2026-11-26 03:06:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:46:03Z.


Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7181100530 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/203#issuecomment-7181100530). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T02:46:03Z. --- Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!200
No description provided.