Title textures: a PC copy per placement, never shared or let go – video memory grows past the card while a retail game streams its world (0x887a0007) #248

Closed
opened 2026-11-26 04:17:27 +00:00 by github-bot · 13 comments
Owner

@⁠gw1337x on GitHub · 2026-11-23 21:49 UTC · original

What happens

The retail title (retail, Series build) on main d4f17ca + a retry equivalent to #244, RX 7800 XT 16 GB, 31.6 GB RAM. After the menus and the first movie the game starts streaming its world. From then on video memory grows by ~0.35 GB/s until the driver resets the device:

D3D12 device removed: 0x887a0007 The GPU will not respond to more commands ...

at 106 s and 116 s in two runs; a third, ended at 100 s, had reached 23.8 GB. The menus were walked with XCL_PRESS_A_AT=14,17,21, no other input.

Measured

A local counter on the activity memory line (XCL_ACTIVITY=1): the textures title_textures keeps in step, the sum of their sizes, and the title memory they cover (overlapping ranges counted once):

time textures kept their bytes title memory covered overlapping an earlier one released so far video memory (local)
30 s 933 1.0 GB 0.8 GB 154 4 9.7 GB
60 s 21 885 3.5 GB 1.6 GB 7 513 11 13.5 GB
80 s 32 830 10.7 GB 3.9 GB 16 654 11 21.6 GB
90 s 35 553 12.7 GB 4.0 GB 18 940 11 23.8 GB

The target pages (3.2 GB), arenas and sparse pools stay flat over the same time; the growth is the kept textures.

Cause

The title streams by placing new textures in memory it used before (as the console allows: a placed resource over another's memory aliases it). Each CreatePlacedResourceX texture that is kept in step gets its own committed PC texture (device_x.rs, the title_textures::register arm), and the older ones at the same addresses stay – the title releases almost none of them (11 in 90 s). So video memory holds the sum of every texture ever placed (12.7 GB at 90 s) while the title only uses the 4.0 GB it covers.

Suggestion

Render targets already avoid this: since 38b05b7 they are reserved resources on 64 KiB pages of video memory, one per page of the title's address, shared by every target there (vram.rs, Pages). Kept-in-step textures on the same pages would cost the memory the title covers instead of the sum, and match the console: a texture placed over another one overwrites its memory. The upload path (title_textures::upload_all) would copy into the reserved texture as it does into the committed one.

I have not tried this; the numbers above are from a counting patch only (happy to share it).

Not this issue

  • #104 (overlapping arenas) is about render-target heaps; #225 changed those.
  • The lazy-page race (#244) crashed this title earlier, at 70–150 s; these runs have a retry equivalent to #244 applied.
**@⁠gw1337x** on GitHub · 2026-11-23 21:49 UTC · [original](https://github.com/xcl-dev/xcl/issues/248) ## What happens The retail title (retail, Series build) on `main` d4f17ca + a retry equivalent to #244, RX 7800 XT 16 GB, 31.6 GB RAM. After the menus and the first movie the game starts streaming its world. From then on video memory grows by ~0.35 GB/s until the driver resets the device: ``` D3D12 device removed: 0x887a0007 The GPU will not respond to more commands ... ``` at 106 s and 116 s in two runs; a third, ended at 100 s, had reached 23.8 GB. The menus were walked with `XCL_PRESS_A_AT=14,17,21`, no other input. ## Measured A local counter on the activity memory line (`XCL_ACTIVITY=1`): the textures `title_textures` keeps in step, the sum of their sizes, and the title memory they cover (overlapping ranges counted once): | time | textures kept | their bytes | title memory covered | overlapping an earlier one | released so far | video memory (local) | |---|---|---|---|---|---|---| | 30 s | 933 | 1.0 GB | 0.8 GB | 154 | 4 | 9.7 GB | | 60 s | 21 885 | 3.5 GB | 1.6 GB | 7 513 | 11 | 13.5 GB | | 80 s | 32 830 | 10.7 GB | 3.9 GB | 16 654 | 11 | 21.6 GB | | 90 s | 35 553 | 12.7 GB | 4.0 GB | 18 940 | 11 | 23.8 GB | The target pages (3.2 GB), arenas and sparse pools stay flat over the same time; the growth is the kept textures. ## Cause The title streams by placing new textures in memory it used before (as the console allows: a placed resource over another's memory aliases it). Each `CreatePlacedResourceX` texture that is kept in step gets its own committed PC texture (`device_x.rs`, the `title_textures::register` arm), and the older ones at the same addresses stay – the title releases almost none of them (11 in 90 s). So video memory holds the sum of every texture ever placed (12.7 GB at 90 s) while the title only uses the 4.0 GB it covers. ## Suggestion Render targets already avoid this: since 38b05b7 they are reserved resources on 64 KiB pages of video memory, one per page of the title's address, shared by every target there (`vram.rs`, `Pages`). Kept-in-step textures on the same pages would cost the memory the title covers instead of the sum, and match the console: a texture placed over another one overwrites its memory. The upload path (`title_textures::upload_all`) would copy into the reserved texture as it does into the committed one. I have not tried this; the numbers above are from a counting patch only (happy to share it). ## Not this issue - #104 (overlapping arenas) is about render-target heaps; #225 changed those. - The lazy-page race (#244) crashed this title earlier, at 70–150 s; these runs have a retry equivalent to #244 applied.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:17:27 +00:00
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-23 22:06 UTC · original

A synthetic repro and a plan, before I write it.

Repro on main (9ab7d76, RTX 5070 Ti, driver 610.74). A new check in the test title places 16 RGBA8 2048×2048 textures (16 MiB each) one after another over the same 17 MiB of title memory with CreatePlacedResourceX, keeps the older objects, and reads each new one back. The contents are right every time, and local video memory (QueryVideoMemoryInfo) grows by 268,435,456 bytes = 16 × 16 MiB. By the rule in title_textures::refresh_once, each placement also uploads every older texture on the written pages again: 1 + 2 + … + 16 = 136 uploads (read from the code, not counted in the run).

XCL does not keep them alive. TEXTURES holds raw pointers, an upload holds a reference only while its batch runs, and real::res_release at refcount 0 calls vram::forget and title_textures::forget. In the same check the growth is back to 0 bytes once the 16 objects are released. So what grows in the retail game is textures the title has not released yet when it reuses their memory; on the console they cost nothing, because they alias.

Plan (about 300 lines in device_x.rs, vram.rs, title_textures.rs; the arenas of #225 are not touched):

  1. A kept-in-step texture at a 64 KiB-aligned address is made as a reserved texture on the vram.rs Pages tiles of its title pages (38b05b7), so textures over the same memory share video memory. The others (unaligned address, or a texture the tiled-resources tier cannot make) stay committed as today.
  2. A new placement over an older kept texture's range, at another address or with another description, ends the uploads of the older one (an exact alias keeps them). That removes the repeated uploads, and shared tiles need it: the older texture's texels would be written over the newer one's.
  3. The first version unmaps nothing early: pages go back when the objects are released, as for render targets.

Two questions:

  • @⁠gw1337x: in your run, how many of the kept-in-step placements are at 64 KiB-aligned addresses, and what share of their bytes? (va & 0xFFFF over the CreatePlacedResourceX calls.) That decides whether step 1 covers the growth.
  • @⁠ivall: Pages is your design. Do you want kept-in-step textures on it, or would you rather do this your own way? I will hold the PR if so.

🤖 Claude Fable 5.2

**@⁠Kalmarv** on GitHub · 2026-11-23 22:06 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7115343025) A synthetic repro and a plan, before I write it. **Repro on main (9ab7d76, RTX 5070 Ti, driver 610.74).** A new check in the test title places 16 RGBA8 2048×2048 textures (16 MiB each) one after another over the same 17 MiB of title memory with CreatePlacedResourceX, keeps the older objects, and reads each new one back. The contents are right every time, and local video memory (`QueryVideoMemoryInfo`) grows by 268,435,456 bytes = 16 × 16 MiB. By the rule in `title_textures::refresh_once`, each placement also uploads every older texture on the written pages again: 1 + 2 + … + 16 = 136 uploads (read from the code, not counted in the run). **XCL does not keep them alive.** `TEXTURES` holds raw pointers, an upload holds a reference only while its batch runs, and `real::res_release` at refcount 0 calls `vram::forget` and `title_textures::forget`. In the same check the growth is back to 0 bytes once the 16 objects are released. So what grows in the retail game is textures the title has not released yet when it reuses their memory; on the console they cost nothing, because they alias. **Plan** (about 300 lines in `device_x.rs`, `vram.rs`, `title_textures.rs`; the arenas of #225 are not touched): 1. A kept-in-step texture at a 64 KiB-aligned address is made as a reserved texture on the `vram.rs` `Pages` tiles of its title pages (38b05b7), so textures over the same memory share video memory. The others (unaligned address, or a texture the tiled-resources tier cannot make) stay committed as today. 2. A new placement over an older kept texture's range, at another address or with another description, ends the uploads of the older one (an exact alias keeps them). That removes the repeated uploads, and shared tiles need it: the older texture's texels would be written over the newer one's. 3. The first version unmaps nothing early: pages go back when the objects are released, as for render targets. Two questions: - @⁠gw1337x: in your run, how many of the kept-in-step placements are at 64 KiB-aligned addresses, and what share of their bytes? (`va & 0xFFFF` over the CreatePlacedResourceX calls.) That decides whether step 1 covers the growth. - @⁠ivall: `Pages` is your design. Do you want kept-in-step textures on it, or would you rather do this your own way? I will hold the PR if so. 🤖 Claude Fable 5.2
Author
Owner

@⁠gw1337x on GitHub · 2026-11-23 22:11 UTC · original

@⁠Kalmarv thanks – the repro matches what we see.

Aligned share. In a run with your steps 1–2 applied locally (kept-in-step textures at 64 KiB-aligned addresses as reserved textures on Pages, older overlapped ones no longer uploaded), about 10 000 of the ~42 500 kept-in-step placements in the first ~110 s went on the pages – roughly a quarter by count. I did not measure the byte share. Most of the title's streamed textures are packed at 4 KiB, so steps 1–2 alone leave most of them committed. In that run video memory still reached 26.6 GB on a 16 GB card.

Step 3 is what keeps it flat here. A second local change on top:

  • the unaligned kept-in-step textures are reserved too, on tiles of their own (not shared);
  • a texture placed over an older kept one's range – the exact same range included – unmaps the older one's tiles (UpdateTileMappings with D3D12_TILE_RANGE_FLAG_NULL on the Pages queue, then the fence) and gives them back to the pools. The title keeps the object; it reads zeros from then on.

main 9ab7d76 + #244, RX 7800 XT 16 GB, GTA VI, menus walked with XCL_PRESS_A_AT=14,17,21. Both runs were stopped by an external kill-switch at 28 GB of process commit:

main + #244 + steps 1–3
stopped at 71 s 127 s
video memory (local) at 70 s 11.2 GB, rising ~0.3 GB/s 10.1 GB
video memory at 120 s – 13.3 GB, rising ~0.1 GB/s
kept-in-step bytes vs title memory they cover (end) 12.7 GB vs 4.0 GB (earlier run, 90 s) 5.8 GB vs 5.8 GB
superseded / tiles given back – 38 180 textures / 17.7 GB

No device removal and no crash in the second run.

Not solved by this:

  • Process commit still rises (15 → 28 GB from 30 s to 126 s) while video memory stays near 13 GB. Something other than these textures is growing; I have not measured what.
  • Each unaligned texture takes at least one 64 KiB tile. The pages hold 9.5 GB for 5.8 GB of textures.
  • I did not check the picture during world loading: the frames there are a dark loading fade, so a wrongly superseded texture would not show yet. Superseding exact same-range placements (where your plan keeps the uploads) is the riskiest part.

The two commits are local (about 130 lines in vram.rs, title_textures.rs, device_x.rs). Happy to share the diff if it helps your PR.

**@⁠gw1337x** on GitHub · 2026-11-23 22:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7115443171) @⁠Kalmarv thanks – the repro matches what we see. **Aligned share.** In a run with your steps 1–2 applied locally (kept-in-step textures at 64 KiB-aligned addresses as reserved textures on `Pages`, older overlapped ones no longer uploaded), about 10 000 of the ~42 500 kept-in-step placements in the first ~110 s went on the pages – roughly a quarter by count. I did not measure the byte share. Most of the title's streamed textures are packed at 4 KiB, so steps 1–2 alone leave most of them committed. In that run video memory still reached 26.6 GB on a 16 GB card. **Step 3 is what keeps it flat here.** A second local change on top: - the unaligned kept-in-step textures are reserved too, on tiles of their own (not shared); - a texture placed over an older kept one's range – the exact same range included – unmaps the older one's tiles (`UpdateTileMappings` with `D3D12_TILE_RANGE_FLAG_NULL` on the `Pages` queue, then the fence) and gives them back to the pools. The title keeps the object; it reads zeros from then on. `main` 9ab7d76 + #244, RX 7800 XT 16 GB, GTA VI, menus walked with `XCL_PRESS_A_AT=14,17,21`. Both runs were stopped by an external kill-switch at 28 GB of process commit: | | `main` + #244 | + steps 1–3 | |---|---|---| | stopped at | 71 s | 127 s | | video memory (local) at 70 s | 11.2 GB, rising ~0.3 GB/s | 10.1 GB | | video memory at 120 s | – | 13.3 GB, rising ~0.1 GB/s | | kept-in-step bytes vs title memory they cover (end) | 12.7 GB vs 4.0 GB (earlier run, 90 s) | 5.8 GB vs 5.8 GB | | superseded / tiles given back | – | 38 180 textures / 17.7 GB | No device removal and no crash in the second run. **Not solved by this:** - Process commit still rises (15 → 28 GB from 30 s to 126 s) while video memory stays near 13 GB. Something other than these textures is growing; I have not measured what. - Each unaligned texture takes at least one 64 KiB tile. The pages hold 9.5 GB for 5.8 GB of textures. - I did not check the picture during world loading: the frames there are a dark loading fade, so a wrongly superseded texture would not show yet. Superseding exact same-range placements (where your plan keeps the uploads) is the riskiest part. The two commits are local (about 130 lines in `vram.rs`, `title_textures.rs`, `device_x.rs`). Happy to share the diff if it helps your PR.
Author
Owner

@⁠iliassgm on GitHub · 2026-11-23 22:11 UTC · original

Taking a look at this. Plan:

  1. Back non-GPU-owned placed textures (CreatePlacedResourceX) on vram::Pages reserved resources (sharing 64 KiB pages for every page boundary strictly inside [va, va + console_bytes) and sharing any extra/sub-page tiles by (va, tile) so repeated placements at the same address do not leak), falling back to committed resources when reserved creation is unsupported.
  2. Synchronize title_textures::upload_all (and probe_gpu_content) against tile mappings via vram::before_execute on the upload queue, and retire superseded overlapping entries in title_textures so dead older placements do not re-upload over or corrupt shared VRAM tiles.
  3. Add unit + real D3D12 GPU tests (RTX 3060 12 GB, including D3D12 debug-layer validation for mip chains / arrays / overlap / bounded VRAM) and open a draft PR since I do not have a retail title here for scripts/smoke.ps1.
**@⁠iliassgm** on GitHub · 2026-11-23 22:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7115450298) Taking a look at this. Plan: 1. Back non-GPU-owned placed textures (`CreatePlacedResourceX`) on `vram::Pages` reserved resources (sharing 64 KiB pages for every page boundary strictly inside `[va, va + console_bytes)` and sharing any extra/sub-page tiles by `(va, tile)` so repeated placements at the same address do not leak), falling back to committed resources when reserved creation is unsupported. 2. Synchronize `title_textures::upload_all` (and `probe_gpu_content`) against tile mappings via `vram::before_execute` on the upload queue, and retire superseded overlapping entries in `title_textures` so dead older placements do not re-upload over or corrupt shared VRAM tiles. 3. Add unit + real D3D12 GPU tests (RTX 3060 12 GB, including D3D12 debug-layer validation for mip chains / arrays / overlap / bounded VRAM) and open a draft PR since I do not have a retail title here for `scripts/smoke.ps1`.
Author
Owner

@⁠iliassgm on GitHub · 2026-11-23 22:28 UTC · original

Draft PR is up at #288 (876557cfce22). All 654 workspace tests pass on RTX 3060 12 GB, including a GPU test showing 512 unreleased 1 MiB placements over a 16 MiB window staying bounded at 16 MiB (+0 B after fill) with bit-exact readback across RGBA8/BC7 mips, cubemaps, 3D volumes, and 4 KiB-aligned neighbours.

@⁠gw1337x — since I don't have a retail game folder here for scripts/smoke.ps1, if you have a chance to test #288 against your retail streaming repro, I'd love to see the XCL_ACTIVITY=1 VRAM curve and add the xcl-smoke blocks!

**@⁠iliassgm** on GitHub · 2026-11-23 22:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7115798799) Draft PR is up at #288 (`876557cfce22`). All 654 workspace tests pass on RTX 3060 12 GB, including a GPU test showing 512 unreleased 1 MiB placements over a 16 MiB window staying bounded at 16 MiB (`+0 B` after fill) with bit-exact readback across RGBA8/BC7 mips, cubemaps, 3D volumes, and 4 KiB-aligned neighbours. @⁠gw1337x — since I don't have a retail game folder here for `scripts/smoke.ps1`, if you have a chance to test #288 against your retail streaming repro, I'd love to see the `XCL_ACTIVITY=1` VRAM curve and add the `xcl-smoke` blocks!
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-23 22:45 UTC · original

The three PRs for this, run against one check on one machine. Facts per PR, no preference; I stopped building my own when #269 opened.

What ran. Each head merged onto main 9ab7d76 locally (no conflicts): #269 at 8111cf9, #288 at 876557c, #292 at bf8e16c (stacked on #269). Debug builds, MSVC toolchain, RTX 5070 Ti, driver 610.74, Ryzen 9 9950X, Windows 11 26200. The test title through xcl run, as e2e.rs runs it, with one more check in it (the one from my note above, grown): CreatePlacedResourceX of RGBA8 2048×2048 textures (16 MiB each) in XMemAlloc graphics memory, every texture read back through the GPU. The same test-title binary for all four.

main #269 #288 #292
the test title's 50 existing checks pass pass pass pass
the PR's own vram / title_textures tests on this GPU – 12 passed, 0 failed 11 passed, 0 failed 14 passed, 0 failed (with its cache test in real.rs)
1. 16 textures placed in turn over 17 MiB, old objects kept, from a 64 KiB address: more local video memory 268 435 456 67 108 864 (one pool heap) 67 108 864 67 108 864
2. the same from 4 KiB past a 64 KiB address 268 435 456 268 435 456 0 (inside the pool heap of row 1) 268 435 456
3. each new texture read back right right right right
4. the older object at the same address read back after a newer placement (row 1 / row 2) right / right right / right right / right right / wrong
5. B placed over all but the first 1 MiB of A, one byte written in that first 1 MiB: B read back right wrong from row 0 right right
6. a second object placed at a texture's address and released, then the memory rewritten: the first object read back right right wrong wrong
wall time of the whole test title 74 s, 75 s 76 s, 76 s 26 s, 27 s 23 s

Why the rows come out that way (from the diffs):

  • #269 puts kept-in-step textures at 64 KiB-aligned addresses on pages of their own space, apart from render targets; unaligned ones stay committed (row 2). It has no rule for older textures: every texture with a written page is uploaded, oldest first. In row 5 only A has a written page, so A's upload lands on tiles B shares and B is not uploaded after it. The wall time is the same as main's because each write still uploads every older texture on its pages.
  • #288 puts kept-in-step textures on pages at any address: a page for each 64 KiB boundary inside the texture's range, the remaining tiles keyed by (address, tile), so placements at one address share them (row 2). Render targets use the same page map. A new placement, or a render target placed there, takes every older overlapping texture out of the kept set for good (two committed textures with exactly the same range excepted). That is row 5 right and row 6 wrong: the first object is not kept in step again after the second one is released.
  • #292 is #269 plus the same kind of rule: a new placement takes every older overlapping texture out of the kept set for good, the same range included, and gives up its page claims. Unaligned textures are committed as in #269 (row 2), and an older committed object there is no longer uploaded (row 4, second value). It also evicts retired entries from the by-address view cache, cleans up on device and queue release and adds counters to the XCL_ACTIVITY line. Its description says it was not built or run on Windows; here it builds, and its tests and the 50 checks pass.

The 4 KiB-packed textures (three quarters of the placements by gw1337x's count): committed in #269 and #292, on pages in #288. Row 2 is the only measurement of that here, with one texture size.

A fourth approach we tried locally, not a PR. 64 KiB-aligned textures on pages, and for older textures a count instead of removal: a texture is not uploaded while a later one on its pages lives, and is read from the memory again when that one is released. It is the only build here with rows 1, 5 and 6 all right (row 1: 67 108 864; row 2: 268 435 456, unaligned textures stay committed; 51 s and 52 s). About 80 lines; I can send it as a patch on top of whichever PR goes in.

Not tested

  • AMD, a retail title, the whole suite on any of the merges (the test title and each PR's own vram / title_textures tests only).
  • Mip chains, arrays and BC formats: the check uses one RGBA8 level.
  • Rows 4 to 6 are things the console allows a title to do; whether the retail title does them is not known to me.

🤖 Claude Fable 5.2

**@⁠Kalmarv** on GitHub · 2026-11-23 22:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7116136485) The three PRs for this, run against one check on one machine. Facts per PR, no preference; I stopped building my own when #269 opened. **What ran.** Each head merged onto `main` 9ab7d76 locally (no conflicts): #269 at 8111cf9, #288 at 876557c, #292 at bf8e16c (stacked on #269). Debug builds, MSVC toolchain, RTX 5070 Ti, driver 610.74, Ryzen 9 9950X, Windows 11 26200. The test title through `xcl run`, as `e2e.rs` runs it, with one more check in it (the one from my note above, grown): CreatePlacedResourceX of RGBA8 2048×2048 textures (16 MiB each) in XMemAlloc graphics memory, every texture read back through the GPU. The same test-title binary for all four. | | `main` | #269 | #288 | #292 | |---|---|---|---|---| | the test title's 50 existing checks | pass | pass | pass | pass | | the PR's own `vram` / `title_textures` tests on this GPU | – | 12 passed, 0 failed | 11 passed, 0 failed | 14 passed, 0 failed (with its cache test in `real.rs`) | | 1. 16 textures placed in turn over 17 MiB, old objects kept, from a 64 KiB address: more local video memory | 268 435 456 | 67 108 864 (one pool heap) | 67 108 864 | 67 108 864 | | 2. the same from 4 KiB past a 64 KiB address | 268 435 456 | 268 435 456 | 0 (inside the pool heap of row 1) | 268 435 456 | | 3. each new texture read back | right | right | right | right | | 4. the older object at the same address read back after a newer placement (row 1 / row 2) | right / right | right / right | right / right | right / wrong | | 5. B placed over all but the first 1 MiB of A, one byte written in that first 1 MiB: B read back | right | wrong from row 0 | right | right | | 6. a second object placed at a texture's address and released, then the memory rewritten: the first object read back | right | right | wrong | wrong | | wall time of the whole test title | 74 s, 75 s | 76 s, 76 s | 26 s, 27 s | 23 s | **Why the rows come out that way** (from the diffs): - **#269** puts kept-in-step textures at 64 KiB-aligned addresses on pages of their own space, apart from render targets; unaligned ones stay committed (row 2). It has no rule for older textures: every texture with a written page is uploaded, oldest first. In row 5 only A has a written page, so A's upload lands on tiles B shares and B is not uploaded after it. The wall time is the same as `main`'s because each write still uploads every older texture on its pages. - **#288** puts kept-in-step textures on pages at any address: a page for each 64 KiB boundary inside the texture's range, the remaining tiles keyed by (address, tile), so placements at one address share them (row 2). Render targets use the same page map. A new placement, or a render target placed there, takes every older overlapping texture out of the kept set for good (two committed textures with exactly the same range excepted). That is row 5 right and row 6 wrong: the first object is not kept in step again after the second one is released. - **#292** is #269 plus the same kind of rule: a new placement takes every older overlapping texture out of the kept set for good, the same range included, and gives up its page claims. Unaligned textures are committed as in #269 (row 2), and an older committed object there is no longer uploaded (row 4, second value). It also evicts retired entries from the by-address view cache, cleans up on device and queue release and adds counters to the `XCL_ACTIVITY` line. Its description says it was not built or run on Windows; here it builds, and its tests and the 50 checks pass. **The 4 KiB-packed textures** (three quarters of the placements by gw1337x's count): committed in #269 and #292, on pages in #288. Row 2 is the only measurement of that here, with one texture size. **A fourth approach we tried locally, not a PR.** 64 KiB-aligned textures on pages, and for older textures a count instead of removal: a texture is not uploaded while a later one on its pages lives, and is read from the memory again when that one is released. It is the only build here with rows 1, 5 and 6 all right (row 1: 67 108 864; row 2: 268 435 456, unaligned textures stay committed; 51 s and 52 s). About 80 lines; I can send it as a patch on top of whichever PR goes in. **Not tested** - AMD, a retail title, the whole suite on any of the merges (the test title and each PR's own `vram` / `title_textures` tests only). - Mip chains, arrays and BC formats: the check uses one RGBA8 level. - Rows 4 to 6 are things the console allows a title to do; whether the retail title does them is not known to me. 🤖 Claude Fable 5.2
Author
Owner

@⁠ExMoha on GitHub · 2026-11-23 22:55 UTC · original

Regression data point for #248 (RX 9070 16 GB, AMD Ryzen 7 7800X3D 8-Core Processor, 31.2 GB RAM, Windows 11). Written with Claude Code (Claude Sonnet 5.5); the runs and numbers are from my machine.

Setup: main 9ab7d76, then main + #244 + #269 (8111cf9), then those + #292 (bf8e16c), each applied as plain diffs, same settings: XCL_NETWORK=0 XCL_DSTORAGE_BCPACK_FILL=1 XCL_ACTIVITY=1 XCL_PRESS_A_AT=14,17,21, one run each. An external kill-switch stopped each run at 90-94% system RAM.

Process commit / local video memory from xcl's own memory lines, compared at the same line number (the lines carry no timestamps, so alignment is approximate):

memory line main +#244 +#269 +#244 +#269 +#292
35 22.8 / 10.3 GB 20.9 / 8.7 GB 19.1 / 8.1 GB
45 29.7 / 15.1 GB 27.6 / 12.4 GB 22.5 / 10.5 GB
66 - 35.7 / 16.3 GB 25.9 / 12.1 GB
last 30.4 / 15.4 GB (line 45) 35.7 / 16.3 GB (line 66) 28.2 / 13.0 GB (line 84)
  • Each PR slows the growth; #292 on top of #269 kept local video memory under the card's 16 GB for the whole run. Commit and video memory still rise, so no run reached a steady state.
  • No device removal and no crash in any run.
  • Afterwards the title stopped submitting work (0 submits, 0 draws per activity line) with a dark screen; that is not memory and looks like the failed DirectStorage / BCPack loads.

Tests on main + #244 + #269 + #292 together: cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 658 passed, 0 failed, 40 ignored; no SKIPPED GPU tests.

Not tested: each PR alone; the xcl-smoke blocks (the stack is uncommitted, so no valid per-PR block); runs longer than the kill-switch allowed.

**@⁠ExMoha** on GitHub · 2026-11-23 22:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7116345141) Regression data point for #248 (RX 9070 16 GB, AMD Ryzen 7 7800X3D 8-Core Processor, 31.2 GB RAM, Windows 11). Written with Claude Code (Claude Sonnet 5.5); the runs and numbers are from my machine. Setup: `main` 9ab7d76, then `main` + #244 + #269 (8111cf9), then those + #292 (bf8e16c), each applied as plain diffs, same settings: `XCL_NETWORK=0 XCL_DSTORAGE_BCPACK_FILL=1 XCL_ACTIVITY=1 XCL_PRESS_A_AT=14,17,21`, one run each. An external kill-switch stopped each run at 90-94% system RAM. Process commit / local video memory from xcl's own memory lines, compared at the same line number (the lines carry no timestamps, so alignment is approximate): | memory line | main | +#244 +#269 | +#244 +#269 +#292 | |---|---|---|---| | 35 | 22.8 / 10.3 GB | 20.9 / 8.7 GB | 19.1 / 8.1 GB | | 45 | 29.7 / 15.1 GB | 27.6 / 12.4 GB | 22.5 / 10.5 GB | | 66 | - | 35.7 / 16.3 GB | 25.9 / 12.1 GB | | last | 30.4 / 15.4 GB (line 45) | 35.7 / 16.3 GB (line 66) | 28.2 / 13.0 GB (line 84) | - Each PR slows the growth; #292 on top of #269 kept local video memory under the card's 16 GB for the whole run. Commit and video memory still rise, so no run reached a steady state. - No device removal and no crash in any run. - Afterwards the title stopped submitting work (`0 submits, 0 draws` per activity line) with a dark screen; that is not memory and looks like the failed DirectStorage / BCPack loads. Tests on main + #244 + #269 + #292 together: `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: 658 passed, 0 failed, 40 ignored; no SKIPPED GPU tests. Not tested: each PR alone; the `xcl-smoke` blocks (the stack is uncommitted, so no valid per-PR block); runs longer than the kill-switch allowed.
Author
Owner

@⁠iliassgm on GitHub · 2026-11-23 23:02 UTC · original

Thanks @⁠Kalmarv for the side-by-side matrix and @⁠gw1337x for the 4 KiB-packed retail data!

Updated #288 (ad799324d6e6) to address both findings:

  1. Row 6 (reactivation on release): overlapped older textures are moved to a dormant shadowed map (still tracking transitions/states, never scanned by refresh_once) and promoted back to active (newest first) when a covering placement is released — keeping rows 1–5 + the ~3× upload speedup while fixing row 6.
  2. 4 KiB-packed < 64 KiB reclamation (for @⁠gw1337x's retail churn without breaking exact aliases): when a texture is superseded by a different range ((ova, oend) != (va, end) — or a GPU-owned target), its tiles are unmapped (D3D12_TILE_RANGE_FLAG_NULL) and unshared extra_pages / tail pages go straight to cooling (and are transparently remapped via remap_if_unmapped if the newer placement is ever released). Exact same-range aliases stay mapped and share all tiles (row 4 stays right/right).

Verified locally on RTX 3060 12 GB (cargo test --workspace -- --test-threads=4: 654 passed, 0 failed, 40 ignored; release build clean), including GPU readback tests for rows 4, 5, 6, different-range unmap/remap, and immediate extra_pages reclamation.

**@⁠iliassgm** on GitHub · 2026-11-23 23:02 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7116486940) Thanks @⁠Kalmarv for the side-by-side matrix and @⁠gw1337x for the 4 KiB-packed retail data! Updated #288 (`ad799324d6e6`) to address both findings: 1. **Row 6 (reactivation on release):** overlapped older textures are moved to a dormant `shadowed` map (still tracking transitions/states, never scanned by `refresh_once`) and promoted back to active (newest first) when a covering placement is released — keeping rows 1–5 + the ~3× upload speedup while fixing row 6. 2. **4 KiB-packed `< 64 KiB` reclamation (for @⁠gw1337x's retail churn without breaking exact aliases):** when a texture is superseded by a *different* range (`(ova, oend) != (va, end)` — or a GPU-owned target), its tiles are unmapped (`D3D12_TILE_RANGE_FLAG_NULL`) and unshared `extra_pages` / tail pages go straight to `cooling` (and are transparently remapped via `remap_if_unmapped` if the newer placement is ever released). Exact same-range aliases stay mapped and share all tiles (row 4 stays right/right). Verified locally on RTX 3060 12 GB (`cargo test --workspace -- --test-threads=4`: 654 passed, 0 failed, 40 ignored; release build clean), including GPU readback tests for rows 4, 5, 6, different-range unmap/remap, and immediate `extra_pages` reclamation.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-23 23:38 UTC · original

A baseline on current main (after #244 / #252 / #283), RDNA4, for the next round of these PRs: all three (#269, #288, #292) conflict with main since #252 / #283 went in.

Setup: main db1ddb2, release; RX 9060 XT 16 GB (driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM (commit limit 38 GB), Windows 11 Pro 26300. Same title, warm caches, XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=60, A pressed by hand on the first menu. A kill-switch stops the run when the xcl processes' private bytes pass 28 GB.

What it reaches: the intro movie plays with its picture (3.7–5.6 fps on this card while it plays), then the loading screen with its artwork. No crash, no device removal before the kill-switch.

While the world streams in (from the XCL_ACTIVITY memory line; process commit / local video memory):

time commit local VRAM
190 s (loading screen up) 16.4 GB 7.1 GB
200 s 18.7 GB 8.3 GB
210 s 22.2 GB 10.1 GB
220 s 25.9 GB 11.9 GB
230 s 28.5 GB 13.4 GB

Stopped at 232 s (28.3 GB). So on main it still grows by ~1.6 GB of video memory and ~3.2 GB of commit per 10 s, as in the 9ab7d76 runs above.

Not done: the PR heads (they need a rebase first); past 232 s.

AI-assisted: Claude Code (Claude Opus 5.5) read the run's log and wrote this comment from my run.

**@⁠emirduran707** on GitHub · 2026-11-23 23:38 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7117193155) A baseline on current `main` (after #244 / #252 / #283), RDNA4, for the next round of these PRs: all three (#269, #288, #292) conflict with `main` since #252 / #283 went in. **Setup:** `main` db1ddb2, release; RX 9060 XT 16 GB (driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM (commit limit 38 GB), Windows 11 Pro 26300. Same title, warm caches, `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=60`, A pressed by hand on the first menu. A kill-switch stops the run when the xcl processes' private bytes pass 28 GB. **What it reaches:** the intro movie plays with its picture (3.7–5.6 fps on this card while it plays), then the loading screen with its artwork. No crash, no device removal before the kill-switch. **While the world streams in** (from the `XCL_ACTIVITY` memory line; process commit / local video memory): | time | commit | local VRAM | |---|---|---| | 190 s (loading screen up) | 16.4 GB | 7.1 GB | | 200 s | 18.7 GB | 8.3 GB | | 210 s | 22.2 GB | 10.1 GB | | 220 s | 25.9 GB | 11.9 GB | | 230 s | 28.5 GB | 13.4 GB | Stopped at 232 s (28.3 GB). So on `main` it still grows by ~1.6 GB of video memory and ~3.2 GB of commit per 10 s, as in the 9ab7d76 runs above. **Not done:** the PR heads (they need a rebase first); past 232 s. AI-assisted: Claude Code (Claude Opus 5.5) read the run's log and wrote this comment from my run.
Author
Owner

@⁠grahamster2 on GitHub · 2026-11-23 23:03 UTC · original · edited 2026-11-24 00:18 UTC

Retail streaming runs of the three #248 PRs and main, on a 10 GB NVIDIA card. #288 asked for a retail VRAM curve; none of the PRs had a run on NVIDIA yet.

Setup

  • RTX 3080 10 GB, driver 610.88, 32 GB RAM (commit limit ~59 GB), Windows 11 Pro 26200, DXC 1.8.2502 (SDK 10.0.26100), release builds.
  • the retail title, Series 1.0.2.1. Warm caches: the coherent window was already learned (4.8 GB), and the DXIL and driver caches were filled by earlier runs.
  • Heads: main 9ab7d76, #269 8111cf9, #288 876557c, #292 bf8e16c (#292 contains #269's commit).
  • 180 s runs: XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=180 XCL_PRESS_A_AT=30,40,50,60,70,80,95,110. With this timing, every run below started streaming the world at ~48 s. One more main run stayed in the menus (an earlier screen differed before the first press) and is left out.
  • VRAM is "video memory … local" from the activity line and commit is the process's commit, both in GiB.

Two runs per head

head VRAM 30 s 60 s 90 s 120 s 150 s max VRAM max commit first 0x8007000e end frames BCPack refused BC1/BC5/BC6H/BC7
main 6.2 7.5 11.2 17.6 – 19.8 37.1 127 s AV write +0x13936, 128 s 1688 379/107/1/117
main 6.2 7.5 11.5 17.9 – 19.8 37.6 128 s 0x80000003 at +0x193e00f (rax 0x8007000e), 138 s 1688 528/107/1/127
#269 6.2 7.4 9.8 14.8 – 14.8 31.6 none AV write +0x61bbd6, 120 s 1749 541/107/1/113
#269 6.2 7.4 10.0 15.0 16.0 17.4 38.2 none timer, 180 s, exit 0 1706 1462/108/1/157
#288 6.1 7.1 10.2 11.9 – 12.6 25.5 none AV write +0x35a47bc, 141 s 1659 904/107/1/117
#288 6.1 7.1 8.8 11.5 12.7 14.1 28.5 none timer, 180 s, exit 0 1924 2028/109/1/202
#292 6.2 6.9 7.7 11.4 – 12.3 25.1 none AV write +0x2926872, 145 s 2168 899/107/1/135
#292 6.2 7.4 9.1 – – 9.3 20.9 none AV write +0x13936, 95 s 1774 385/107/1/49

("–": the run had ended.)

What the numbers show

  • main: local video memory goes past the card (19.8 GiB on 10 GB). Then CreatePlacedResourceX fails with 0x8007000e, texture uploads fail, and the title stops 1–10 s later, in both runs.

  • With any of the three PRs: no 0x8007000e in any run. Growth from 60 s to 120 s:

    • main: 10.1–10.4 GiB.
    • #269: 7.4–7.6 GiB.
    • #288: 4.4–4.8 GiB.
    • #292: 4.5 GiB (one run; the other ended at 95 s).

    Video memory still grows while the world streams with all three.

  • 4 of the 6 PR runs still end in an access violation (write) in the title, between 95 and 145 s, at four different addresses. None of them follows a failed allocation in the log.

    • +0x13936 is also one of the two main endings here, and with +0x35a47bc it is in MaurycyBartczak's earlier main runs (#156).
    • #292's run at 95 s ended there at only 9.3 GiB of VRAM.
    • So these endings don't look caused by the PRs or by VRAM running out, but two runs per head can't rule that out.
  • No device removal in any run.

  • No new warning kinds compared with main's runs. The only new lines are DirectStorage failures for other files, because these runs got further into streaming. The refused BCPack counts depend on how far streaming got.

  • Correctness not checked: the frames during loading are a dark loading fade, and I can't look at them. Wrong or zeroed textures from shared or retired pages would not show up in any of these counters.

Smoke, 60 s, no input (scripts/smoke.ps1; its gpu: line comes from #281, since without it the script names this machine's iGPU)

main 9ab7d76
xcl-smoke v1
commit: 9ab7d763197c7f420bff10cd9bf1310f07e2a9aa
gpu: NVIDIA GeForce RTX 3080
title: the retail title.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1496 (PresentX 1497)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14808 MB
#269 8111cf9
xcl-smoke v1
commit: 8111cf945fb38f53a4856edfb63bcba46b524b29
gpu: NVIDIA GeForce RTX 3080
title: the retail title.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1463 (PresentX 1463)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14812 MB
#288 876557c
xcl-smoke v1
commit: 876557cfce22f5231a4f63449463b1ed6e7ac2dc
gpu: NVIDIA GeForce RTX 3080
title: the retail title.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1517 (PresentX 1518)
presents per 2 s (last 3): 61 59 60
device removals: 0
crashes: 0
peak commit: 14667 MB
#292 bf8e16c
xcl-smoke v1
commit: bf8e16cdc2faf0cf5a5994c381890a0c5170376e
gpu: NVIDIA GeForce RTX 3080
title: the retail title.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1482 (PresentX 1482)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14770 MB

Claude Code (Claude Opus 5.5) ran the tests and wrote this report. Crash addresses and XCL's counters only; no game files attached.

**@⁠grahamster2** on GitHub · 2026-11-23 23:03 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7116498970) · edited 2026-11-24 00:18 UTC Retail streaming runs of the three #248 PRs and `main`, on a 10 GB NVIDIA card. #288 asked for a retail VRAM curve; none of the PRs had a run on NVIDIA yet. **Setup** - RTX 3080 10 GB, driver 610.88, 32 GB RAM (commit limit ~59 GB), Windows 11 Pro 26200, DXC 1.8.2502 (SDK 10.0.26100), release builds. - the retail title, Series 1.0.2.1. Warm caches: the coherent window was already learned (4.8 GB), and the DXIL and driver caches were filled by earlier runs. - Heads: `main` `9ab7d76`, #269 `8111cf9`, #288 `876557c`, #292 `bf8e16c` (#292 contains #269's commit). - 180 s runs: `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=180 XCL_PRESS_A_AT=30,40,50,60,70,80,95,110`. With this timing, every run below started streaming the world at ~48 s. One more `main` run stayed in the menus (an earlier screen differed before the first press) and is left out. - VRAM is "video memory … local" from the activity line and commit is the process's commit, both in GiB. **Two runs per head** | head | VRAM 30 s | 60 s | 90 s | 120 s | 150 s | max VRAM | max commit | first `0x8007000e` | end | frames | BCPack refused BC1/BC5/BC6H/BC7 | |---|---|---|---|---|---|---|---|---|---|---|---| | main | 6.2 | 7.5 | 11.2 | 17.6 | – | 19.8 | 37.1 | 127 s | AV write `+0x13936`, 128 s | 1688 | 379/107/1/117 | | main | 6.2 | 7.5 | 11.5 | 17.9 | – | 19.8 | 37.6 | 128 s | `0x80000003` at `+0x193e00f` (rax `0x8007000e`), 138 s | 1688 | 528/107/1/127 | | #269 | 6.2 | 7.4 | 9.8 | 14.8 | – | 14.8 | 31.6 | none | AV write `+0x61bbd6`, 120 s | 1749 | 541/107/1/113 | | #269 | 6.2 | 7.4 | 10.0 | 15.0 | 16.0 | 17.4 | 38.2 | none | timer, 180 s, exit 0 | 1706 | 1462/108/1/157 | | #288 | 6.1 | 7.1 | 10.2 | 11.9 | – | 12.6 | 25.5 | none | AV write `+0x35a47bc`, 141 s | 1659 | 904/107/1/117 | | #288 | 6.1 | 7.1 | 8.8 | 11.5 | 12.7 | 14.1 | 28.5 | none | timer, 180 s, exit 0 | 1924 | 2028/109/1/202 | | #292 | 6.2 | 6.9 | 7.7 | 11.4 | – | 12.3 | 25.1 | none | AV write `+0x2926872`, 145 s | 2168 | 899/107/1/135 | | #292 | 6.2 | 7.4 | 9.1 | – | – | 9.3 | 20.9 | none | AV write `+0x13936`, 95 s | 1774 | 385/107/1/49 | ("–": the run had ended.) **What the numbers show** - **`main`:** local video memory goes past the card (19.8 GiB on 10 GB). Then `CreatePlacedResourceX` fails with `0x8007000e`, texture uploads fail, and the title stops 1–10 s later, in both runs. - **With any of the three PRs:** no `0x8007000e` in any run. Growth from 60 s to 120 s: - `main`: 10.1–10.4 GiB. - #269: 7.4–7.6 GiB. - #288: 4.4–4.8 GiB. - #292: 4.5 GiB (one run; the other ended at 95 s). Video memory still grows while the world streams with all three. - **4 of the 6 PR runs still end in an access violation (write) in the title,** between 95 and 145 s, at four different addresses. None of them follows a failed allocation in the log. - `+0x13936` is also one of the two `main` endings here, and with `+0x35a47bc` it is in MaurycyBartczak's earlier `main` runs (#156). - #292's run at 95 s ended there at only 9.3 GiB of VRAM. - So these endings don't look caused by the PRs or by VRAM running out, but two runs per head can't rule that out. - **No device removal in any run.** - **No new warning kinds** compared with `main`'s runs. The only new lines are DirectStorage failures for other files, because these runs got further into streaming. The refused BCPack counts depend on how far streaming got. - **Correctness not checked:** the frames during loading are a dark loading fade, and I can't look at them. Wrong or zeroed textures from shared or retired pages would not show up in any of these counters. **Smoke, 60 s, no input** (`scripts/smoke.ps1`; its `gpu:` line comes from #281, since without it the script names this machine's iGPU) <details><summary>main 9ab7d76</summary> ``` xcl-smoke v1 commit: 9ab7d763197c7f420bff10cd9bf1310f07e2a9aa gpu: NVIDIA GeForce RTX 3080 title: the retail title.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1496 (PresentX 1497) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14808 MB ``` </details> <details><summary>#269 8111cf9</summary> ``` xcl-smoke v1 commit: 8111cf945fb38f53a4856edfb63bcba46b524b29 gpu: NVIDIA GeForce RTX 3080 title: the retail title.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1463 (PresentX 1463) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14812 MB ``` </details> <details><summary>#288 876557c</summary> ``` xcl-smoke v1 commit: 876557cfce22f5231a4f63449463b1ed6e7ac2dc gpu: NVIDIA GeForce RTX 3080 title: the retail title.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1517 (PresentX 1518) presents per 2 s (last 3): 61 59 60 device removals: 0 crashes: 0 peak commit: 14667 MB ``` </details> <details><summary>#292 bf8e16c</summary> ``` xcl-smoke v1 commit: bf8e16cdc2faf0cf5a5994c381890a0c5170376e gpu: NVIDIA GeForce RTX 3080 title: the retail title.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1482 (PresentX 1482) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14770 MB ``` </details> Claude Code (Claude Opus 5.5) ran the tests and wrote this report. Crash addresses and XCL's counters only; no game files attached.
Author
Owner

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

A data point from Linux / Wine, RTX 5060 8 GB (NVIDIA 595.112.07, 31 GB RAM), main a6f5f7a + #494/#495/#496, Series X profile, XCL_ACTIVITY=1, A pressed at the account prompt. On this card the growth ends the run, so it is the stop here.

From the memory: line while the title streams its world (Wine reports 0 for the process commit):

time local VRAM non-local target pages (pools) sparse pools (mapped)
93 s 6 418 MB 5 272 MB 4 536 (4 608) MB 1 152 (1 119) MB
109 s 6 450 MB 7 955 MB 6 492 (6 656) MB 1 792 (1 738) MB
125 s 6 450 MB 9 939 MB 8 441 (8 640) MB 1 792 (1 764) MB
155 s 6 450 MB 11 171 MB 9 526 (9 664) MB 1 984 (1 926) MB
  • Almost all of the growth is target pages: +5 GB in 60 s. They never come down within the run. Arenas stay at 264 / 304 MB, and the sparse pools grow far less.
  • Local video memory caps at ~6.45 GB. Everything after that goes to non-local (system) memory, until the system's free memory drops from ~14 GB to < 0.5 GB in about 30 s.
  • The NVIDIA driver then logs NV_ERR_NO_MEMORY for system memory. The run ends in msvcrt memcpy from read_committed (write fault), which looks like what #454 handles.

I'm looking at why target pages aren't given back (where GPU-owned targets placed over the same title memory again get new pages). I'll post here if I find something concrete.

**@⁠notdxbi** on GitHub · 2026-11-24 01:03 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7118712496) A data point from **Linux / Wine, RTX 5060 8 GB** (NVIDIA 595.112.07, 31 GB RAM), `main` `a6f5f7a` + #494/#495/#496, Series X profile, `XCL_ACTIVITY=1`, A pressed at the account prompt. On this card the growth ends the run, so it is the stop here. From the `memory:` line while the title streams its world (Wine reports 0 for the process commit): | time | local VRAM | non-local | target pages (pools) | sparse pools (mapped) | |---|---|---|---|---| | 93 s | 6 418 MB | 5 272 MB | 4 536 (4 608) MB | 1 152 (1 119) MB | | 109 s | 6 450 MB | 7 955 MB | 6 492 (6 656) MB | 1 792 (1 738) MB | | 125 s | 6 450 MB | 9 939 MB | 8 441 (8 640) MB | 1 792 (1 764) MB | | 155 s | 6 450 MB | 11 171 MB | 9 526 (9 664) MB | 1 984 (1 926) MB | - Almost all of the growth is **target pages**: +5 GB in 60 s. They never come down within the run. Arenas stay at 264 / 304 MB, and the sparse pools grow far less. - Local video memory caps at ~6.45 GB. Everything after that goes to non-local (system) memory, until the system's free memory drops from ~14 GB to < 0.5 GB in about 30 s. - The NVIDIA driver then logs `NV_ERR_NO_MEMORY` for system memory. The run ends in `msvcrt` memcpy from `read_committed` (write fault), which looks like what #454 handles. I'm looking at why target pages aren't given back (where GPU-owned targets placed over the same title memory again get new pages). I'll post here if I find something concrete.
Author
Owner

@⁠MicaelHernandes on GitHub · 2026-11-24 01:34 UTC · original

Retail streaming on a 12 GB AMD card: frames stop once local video memory passes the card's size, with or without #490 / #435 / #501 / #522 / #483

A data point for #248 on current main, where the memory growth while the world streams is still there. The PRs that speed up the streaming path move the stall earlier or later, but in every run it begins when local video memory reaches the card's 12 GB.

Setup

  • AMD Radeon RX 6750 XT 12 GB (RDNA2), driver 32.0.21045.29003; Ryzen 7 5700X; 32 GB RAM; Windows 11 Home build 26300; release builds.
  • The newer retail title (Series 1.0.2.1), device_type = "anaconda", XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1, one A press on the first menu, runs up to 320 s.
  • Builds, one run each:
    • A: main 7ebf1b8 + #451 1f282c7
    • B: main 508a0c7 + #451 1f282c7 + #490 7695539 + #435 a94e151
    • C: B + #501 c73b0c8 + #522 638c039 + #483 3462d40

All merges were clean.

Frames and memory (cumulative presents from the activity lines; process commit / local video memory from the memory lines)

time A B C
30 s 448 f, 15 GB / 6.2 GB 527 f, 15 GB / 6.3 GB 474 f, 15 GB / 6.3 GB
60 s 1316 f, 17 GB / 7.1 GB 1415 f, 17 GB / 7.4 GB 1358 f, 17 GB / 7.4 GB
90 s 2064 f, 20 GB / 8.0 GB 1909 f, 22 GB / 11.0 GB 1991 f, 20 GB / 9.1 GB
120 s 2134 f, 25 GB / 9.6 GB 1950 f, 25 GB / 12.5 GB 2014 f, 25 GB / 12.4 GB
150 s 2139 f, 29 GB / 11.4 GB 2020 f, 28 GB / 13.7 GB 2077 f, 28 GB / 13.6 GB
180 s 2170 f, 33 GB / 12.2 GB – –
270 s 2323 f, 42 GB / 13.6 GB – –
end null write at 275 s null write at 167 s null write at 170 s
  • All three ends are the stall watchdog's null write from #232: +0x23cf683, with +0x4e4ba89, +0x2215c35 and +0x2215eca on the stack.
  • In all three runs the intro and menus play at 28–30 fps (#451 and #486 together; before #451 the intro ran at 3–5 fps on this card), and the world starts streaming at about 90 s.
  • After that, local video memory grows by about 1.5 GB per 10 s in every build. Presents stop once it passes the card's 12 GB: at about 120 s in B and C, and at about 180 s in A, where it grew more slowly between 90 s and 150 s. With one run per build I can't tell whether that difference comes from #490 / #435 or from run-to-run variation.
  • #435 shows in process commit (28 GB in B and C against 29 GB in A at 150 s). Nothing in B or C changes the video memory curve.
  • On this card the stall looks like a video memory limit, not a CPU-side cost: in C, with the sweep (#490), the used() totals (#522), the bounded search (#483) and the sparse-window write check (#501) all in, it stalls at the same video memory and the same time as B.

Also seen

  • With device_type = "lockhart" (A's build, console_type_raw left at 6), the title stayed on a black screen at a steady 30 fps for over 3 minutes, at 19.3 GB commit / 7.5 GB local video memory, with no DirectStorage traffic. It started loading again after an A press, and 8 s later stopped on 0x80000003 at +0xb18de7. I don't know whether that comes from the Series S memory budget or from the mismatch with console_type_raw.
  • BCPack requests are refused throughout (BC1 up to ~2,000 in a run, BC5, BC6H, BC7), as on main.

I can rerun any of these with other settings or diagnostics.

AI use: Claude Code (Claude Opus 5.5) ran the builds and the runs and drafted this comment; the numbers come from the logs of these runs on my machine.

**@⁠MicaelHernandes** on GitHub · 2026-11-24 01:34 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7119230337) **Retail streaming on a 12 GB AMD card: frames stop once local video memory passes the card's size, with or without #490 / #435 / #501 / #522 / #483** A data point for #248 on current `main`, where the memory growth while the world streams is still there. The PRs that speed up the streaming path move the stall earlier or later, but in every run it begins when local video memory reaches the card's 12 GB. **Setup** - AMD Radeon RX 6750 XT 12 GB (RDNA2), driver 32.0.21045.29003; Ryzen 7 5700X; 32 GB RAM; Windows 11 Home build 26300; release builds. - The newer retail title (Series 1.0.2.1), `device_type = "anaconda"`, `XCL_ACTIVITY=1 XCL_TRACE_FAULTS=1`, one A press on the first menu, runs up to 320 s. - Builds, one run each: - **A**: `main` `7ebf1b8` + #451 `1f282c7` - **B**: `main` `508a0c7` + #451 `1f282c7` + #490 `7695539` + #435 `a94e151` - **C**: B + #501 `c73b0c8` + #522 `638c039` + #483 `3462d40` All merges were clean. **Frames and memory** (cumulative presents from the activity lines; process commit / local video memory from the memory lines) | time | A | B | C | |---|---|---|---| | 30 s | 448 f, 15 GB / 6.2 GB | 527 f, 15 GB / 6.3 GB | 474 f, 15 GB / 6.3 GB | | 60 s | 1316 f, 17 GB / 7.1 GB | 1415 f, 17 GB / 7.4 GB | 1358 f, 17 GB / 7.4 GB | | 90 s | 2064 f, 20 GB / 8.0 GB | 1909 f, 22 GB / 11.0 GB | 1991 f, 20 GB / 9.1 GB | | 120 s | 2134 f, 25 GB / 9.6 GB | 1950 f, 25 GB / 12.5 GB | 2014 f, 25 GB / 12.4 GB | | 150 s | 2139 f, 29 GB / 11.4 GB | 2020 f, 28 GB / 13.7 GB | 2077 f, 28 GB / 13.6 GB | | 180 s | 2170 f, 33 GB / 12.2 GB | – | – | | 270 s | 2323 f, 42 GB / 13.6 GB | – | – | | end | null write at 275 s | null write at 167 s | null write at 170 s | - All three ends are the stall watchdog's null write from #232: `+0x23cf683`, with `+0x4e4ba89`, `+0x2215c35` and `+0x2215eca` on the stack. - In all three runs the intro and menus play at 28–30 fps (#451 and #486 together; before #451 the intro ran at 3–5 fps on this card), and the world starts streaming at about 90 s. - After that, local video memory grows by about 1.5 GB per 10 s in every build. Presents stop once it passes the card's 12 GB: at about 120 s in B and C, and at about 180 s in A, where it grew more slowly between 90 s and 150 s. With one run per build I can't tell whether that difference comes from #490 / #435 or from run-to-run variation. - #435 shows in process commit (28 GB in B and C against 29 GB in A at 150 s). Nothing in B or C changes the video memory curve. - On this card the stall looks like a video memory limit, not a CPU-side cost: in C, with the sweep (#490), the `used()` totals (#522), the bounded search (#483) and the sparse-window write check (#501) all in, it stalls at the same video memory and the same time as B. **Also seen** - With `device_type = "lockhart"` (A's build, `console_type_raw` left at 6), the title stayed on a black screen at a steady 30 fps for over 3 minutes, at 19.3 GB commit / 7.5 GB local video memory, with no DirectStorage traffic. It started loading again after an A press, and 8 s later stopped on `0x80000003` at `+0xb18de7`. I don't know whether that comes from the Series S memory budget or from the mismatch with `console_type_raw`. - BCPack requests are refused throughout (BC1 up to ~2,000 in a run, BC5, BC6H, BC7), as on `main`. I can rerun any of these with other settings or diagnostics. AI use: Claude Code (Claude Opus 5.5) ran the builds and the runs and drafted this comment; the numbers come from the logs of these runs on my machine.
Author
Owner

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

Follow-up to my numbers above, same setup (Linux/Wine, RTX 5060 8 GB), main 7ebf1b8 + #454 + #494–#496. These are experiments, not PRs.

Where the targets come from: a counter on the XCL_ACTIVITY line shows 62 000 live targets at 170 s, growing ~300/s, none released. Most are made by real::resource_at: the console's views of memory (#70/#71) have no object, so XCL makes a placed resource per (va, desc) and keeps it in MADE for good. Each one holds its pages.

Two things I tried:

  1. Give a target's tiles back when the title unmaps all the physical pages under it (hooked into kernelx::unmap_away, remapped on the next map there). Correct, but it barely matters: 422 targets in a whole run. The title rarely unmaps under its targets.
  2. An opt-in budget for view-made targets (XCL_TARGET_PAGES_MB). Past it, the oldest view-made targets have their tiles unmapped (TILE_RANGE_FLAG_NULL, after a GPU wait on the title queues) but keep their object, so a stale descriptor reads zeros instead of faulting. ~40 000 were given back, with no GPU faults. Target pages still reached 5.2–5.6 GB with a budget of 3 GB or 1.5 GB. What's left is mostly the title's own placed resources (CreatePlacedResourceX), which it also never releases while streaming.

So on an 8 GB card the total is still too much: local VRAM full at ~6.6 GB, 7–8 GB non-local, plus the title's memory. System RAM runs out at ~135–150 s, and the run ends with a write fault in memcpy into a title page whose commit failed.

My reading: a bound has to cover the title's placed targets too. One way is to unmap tiles of targets not used recently (by last bind / last time a descriptor naming them was copied) rather than by creation order. Happy to test anyone's approach on this card; the experiment's diff is available if useful.

**@⁠notdxbi** on GitHub · 2026-11-24 01:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7119342710) Follow-up to my numbers above, same setup (Linux/Wine, RTX 5060 8 GB), `main` `7ebf1b8` + #454 + #494–#496. These are experiments, not PRs. **Where the targets come from:** a counter on the `XCL_ACTIVITY` line shows **62 000 live targets at 170 s, growing ~300/s**, none released. Most are made by `real::resource_at`: the console's views of memory (#70/#71) have no object, so XCL makes a placed resource per (va, desc) and keeps it in `MADE` for good. Each one holds its pages. **Two things I tried:** 1. Give a target's tiles back when the title unmaps all the physical pages under it (hooked into `kernelx::unmap_away`, remapped on the next map there). Correct, but it barely matters: **422 targets** in a whole run. The title rarely unmaps under its targets. 2. An opt-in budget for view-made targets (`XCL_TARGET_PAGES_MB`). Past it, the oldest view-made targets have their tiles unmapped (`TILE_RANGE_FLAG_NULL`, after a GPU wait on the title queues) but keep their object, so a stale descriptor reads zeros instead of faulting. **~40 000 were given back, with no GPU faults.** Target pages still reached 5.2–5.6 GB with a budget of 3 GB or 1.5 GB. What's left is mostly the title's own placed resources (`CreatePlacedResourceX`), which it also never releases while streaming. So on an 8 GB card the total is still too much: local VRAM full at ~6.6 GB, 7–8 GB non-local, plus the title's memory. System RAM runs out at ~135–150 s, and the run ends with a write fault in `memcpy` into a title page whose commit failed. My reading: a bound has to cover the title's placed targets too. One way is to unmap tiles of targets not used recently (by last bind / last time a descriptor naming them was copied) rather than by creation order. Happy to test anyone's approach on this card; the experiment's diff is available if useful.
Author
Owner

@⁠RD-sample on GitHub · 2026-11-24 02:47 UTC · original

Additional data point on 9ce2070, RTX 3060 Ti 8 GB, GTA VI Xbox Series package 1.0.2.1. With XCL_TEXTURE_SKIP_UNCHANGED=0, XCL presented 3,600 frames before the window froze. At 162.5 s, D3D12 reported 0x887A0007 (DEVICE_RESET). The run recorded 414 rejected BCPack requests. I did not measure VRAM growth during this run, so I can confirm the reset code but not its cause. With the default texture setting, a separate run ended in a read access violation during texture refresh after 3,000 frames. Is there a specific fix after 9ce2070 worth testing for this case?

**@⁠RD-sample** on GitHub · 2026-11-24 02:47 UTC · [original](https://github.com/xcl-dev/xcl/issues/248#issuecomment-7120486100) Additional data point on 9ce2070, RTX 3060 Ti 8 GB, GTA VI Xbox Series package 1.0.2.1. With XCL_TEXTURE_SKIP_UNCHANGED=0, XCL presented 3,600 frames before the window froze. At 162.5 s, D3D12 reported 0x887A0007 (DEVICE_RESET). The run recorded 414 rejected BCPack requests. I did not measure VRAM growth during this run, so I can confirm the reset code but not its cause. With the default texture setting, a separate run ended in a read access violation during texture refresh after 3,000 frames. Is there a specific fix after 9ce2070 worth testing for this case?
This discussion has been locked. Commenting is limited to contributors.
No description provided.