D3D12.X: download block-compressed texture mip tails #3550

Open
BBareth wants to merge 1 commit from upstream-pr/3550 into main
BBareth commented 2026-11-30 22:48:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T22:48:08Z.


Depends on #3549: with this PR alone the retail title crashes about 160 s in (downloads that now go through reach pages the title has not committed); with #3549 it does not. Runs: https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7364038479

A GPU-written title texture is copied back into the title's memory through a download plan. For a block-compressed texture the plan was refused for the smallest mips: D3D12 returns a 4×4 footprint for the 2×2 and 1×1 mips of a BC3 texture, and the single-footprint query kept an unaligned base offset (0x555780 after mip 6 of a 2048×2048 chain on an RTX 5070 Ti) where the check expected the next 512-byte boundary. Both ended in driver footprint differs from the exact subresource, and reverse layout compared against the logical mip size as well. This change aligns each query base and uses whole-block extents for the copy and the reverse layout. Part of #505.

The base alignment is not specific to block compression: it applies to every format, so an uncompressed multi-mip chain whose previous mip ends off a 512-byte boundary, which main also refuses, is downloaded as well. A refused plan is not dropped on main: it is prepared again at every submit and refused again.

What is in it

  • crates/xcl/src/hle/d3d12x/title_textures.rs: the download layout rounds each query base up to the placement alignment and validates, copies and reverse-tiles with dimensions rounded to whole format blocks.
  • Test gpu_download_publishes_every_bc3_mip (GPU): uploads a pattern to all 12 mips of a 2048×2048 BC3 texture, downloads it through the plan and compares the tiled buffer byte for byte.
  • Test gpu_download_publishes_every_rgba8_mip (GPU): the same for all 8 mips of a 128×128 RGBA8 texture, whose small mips end off a 512-byte boundary too. It fails with the base alignment taken out (driver footprint differs from the exact subresource).
  • Test download_layout_accepts_full_bc_blocks_for_small_mips (no GPU): the 4×4 footprints, byte counts and offsets of the two smallest mips, and an unrounded footprint is still refused.
  • README.md: the Textures row names block-compressed mip tails.

Tested

  • RTX 5070 Ti, driver 32.0.16.2124; i7-12700K; Windows 11 Pro 26200; rustc 1.95.0; debug suite, release smoke.
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on 443ad638 (on main ff0c364b): 2892 passed, 0 failed, 51 ignored.
  • SKIPPED on this adapter: 28: 22 no wave64; 2 no heap windows; 2 no d3d12SDKLayers.dll; 1 no D3D12 debug layer; 1 cannot disable the driver cache (no Developer Mode).
  • Download plans counted in GTA 6 (Xbox 1.0.2.1) with a local counter in prepare_downloads (not in this PR), main 493dbd3d against 493dbd3d merged with this PR, two 120 s runs each after a warm-up: on main no plan was accepted and at least 512 and 256 were refused (all block-compressed, formats 77 and 78, the same textures prepared again at every submit, from about 100 s); with this PR one plan was accepted (a 12-mip format 78 texture) and none refused. No plan for another format was prepared in any of the four runs. Frames shown: main 3093 and 3047, with this PR 3142 and 3061; no device removal or crash.
  • Both new tests failed before the change with driver footprint differs from the exact subresource (on the earlier base 9dfbe3ea) and pass with it; the GPU test ran on the RTX 5070 Ti, not skipped.

Regression run

xcl-smoke v1
commit: 493dbd3dd0cd50b4c3e8d28f73ab9b504fcd8158
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 120
exit: 0x0
frames shown: 3087 (PresentX 3087)
presents per 2 s (last 3): 49 46 47
device removals: 0
crashes: 0
peak commit: 30932 MB
xcl-smoke v1
commit: 443ad6381509f78a63bffadf049c151e39c8cedd
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 120
exit: 0x0
frames shown: 3068 (PresentX 3068)
presents per 2 s (last 3): 54 41 6
device removals: 0
crashes: 0
peak commit: 31617 MB

Each run follows one warm-up run of the same build; the A button is pressed once at 70 s.

Not tested

  • The content of the block-compressed download accepted in the retail runs above was not compared; only the GPU test checks bytes.
  • An uncompressed multi-mip download in a retail title: the retail runs prepared none (the GPU test covers RGBA8). The world, later than 120 s, was not counted.
  • AMD and Intel GPUs: the footprints were only observed on the RTX 5070 Ti.
  • Block-compressed formats other than BC3, and metadata-plane downloads.

AI use

  • Codex (GPT-6.2-Sol): found the footprint mismatch, wrote the fix and the two tests.
  • Claude Code, Claude Fable 5.2: briefed and reviewed that work, rebased the branch, wrote the RGBA8 test after review, ran the suite, the regression runs and the download counts above and wrote this description.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5575174449 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T22:48:08Z. --- Depends on #3549: with this PR alone the retail title crashes about 160 s in (downloads that now go through reach pages the title has not committed); with #3549 it does not. Runs: https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7364038479 A GPU-written title texture is copied back into the title's memory through a download plan. For a block-compressed texture the plan was refused for the smallest mips: D3D12 returns a 4×4 footprint for the 2×2 and 1×1 mips of a BC3 texture, and the single-footprint query kept an unaligned base offset (`0x555780` after mip 6 of a 2048×2048 chain on an RTX 5070 Ti) where the check expected the next 512-byte boundary. Both ended in `driver footprint differs from the exact subresource`, and reverse layout compared against the logical mip size as well. This change aligns each query base and uses whole-block extents for the copy and the reverse layout. Part of #505. The base alignment is not specific to block compression: it applies to every format, so an uncompressed multi-mip chain whose previous mip ends off a 512-byte boundary, which `main` also refuses, is downloaded as well. A refused plan is not dropped on `main`: it is prepared again at every submit and refused again. **What is in it** - `crates/xcl/src/hle/d3d12x/title_textures.rs`: the download layout rounds each query base up to the placement alignment and validates, copies and reverse-tiles with dimensions rounded to whole format blocks. - Test `gpu_download_publishes_every_bc3_mip` (GPU): uploads a pattern to all 12 mips of a 2048×2048 BC3 texture, downloads it through the plan and compares the tiled buffer byte for byte. - Test `gpu_download_publishes_every_rgba8_mip` (GPU): the same for all 8 mips of a 128×128 RGBA8 texture, whose small mips end off a 512-byte boundary too. It fails with the base alignment taken out (`driver footprint differs from the exact subresource`). - Test `download_layout_accepts_full_bc_blocks_for_small_mips` (no GPU): the 4×4 footprints, byte counts and offsets of the two smallest mips, and an unrounded footprint is still refused. - `README.md`: the Textures row names block-compressed mip tails. **Tested** - RTX 5070 Ti, driver 32.0.16.2124; i7-12700K; Windows 11 Pro 26200; rustc 1.95.0; debug suite, release smoke. - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on 443ad638 (on main ff0c364b): 2892 passed, 0 failed, 51 ignored. - `SKIPPED` on this adapter: 28: 22 `no wave64`; 2 `no heap windows`; 2 `no d3d12SDKLayers.dll`; 1 `no D3D12 debug layer`; 1 cannot disable the driver cache (no Developer Mode). - Download plans counted in GTA 6 (Xbox 1.0.2.1) with a local counter in `prepare_downloads` (not in this PR), `main` 493dbd3d against 493dbd3d merged with this PR, two 120 s runs each after a warm-up: on `main` no plan was accepted and at least 512 and 256 were refused (all block-compressed, formats 77 and 78, the same textures prepared again at every submit, from about 100 s); with this PR one plan was accepted (a 12-mip format 78 texture) and none refused. No plan for another format was prepared in any of the four runs. Frames shown: `main` 3093 and 3047, with this PR 3142 and 3061; no device removal or crash. - Both new tests failed before the change with `driver footprint differs from the exact subresource` (on the earlier base 9dfbe3ea) and pass with it; the GPU test ran on the RTX 5070 Ti, not skipped. **Regression run** ``` xcl-smoke v1 commit: 493dbd3dd0cd50b4c3e8d28f73ab9b504fcd8158 gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 120 exit: 0x0 frames shown: 3087 (PresentX 3087) presents per 2 s (last 3): 49 46 47 device removals: 0 crashes: 0 peak commit: 30932 MB ``` ``` xcl-smoke v1 commit: 443ad6381509f78a63bffadf049c151e39c8cedd gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 120 exit: 0x0 frames shown: 3068 (PresentX 3068) presents per 2 s (last 3): 54 41 6 device removals: 0 crashes: 0 peak commit: 31617 MB ``` Each run follows one warm-up run of the same build; the A button is pressed once at 70 s. **Not tested** - The content of the block-compressed download accepted in the retail runs above was not compared; only the GPU test checks bytes. - An uncompressed multi-mip download in a retail title: the retail runs prepared none (the GPU test covers RGBA8). The world, later than 120 s, was not counted. - AMD and Intel GPUs: the footprints were only observed on the RTX 5070 Ti. - Block-compressed formats other than BC3, and metadata-plane downloads. **AI use** - Codex (GPT-6.2-Sol): found the footprint mismatch, wrote the fix and the two tests. - Claude Code, Claude Fable 5.2: briefed and reviewed that work, rebased the branch, wrote the RGBA8 test after review, ran the suite, the regression runs and the download counts above and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thehollowedone commented 2026-12-01 06:55:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-12-01T06:55:20Z.


Independent Windows GPU check of #3550 head 3b4a7a4 against its exact main parent 86e86fc.

I ran the same synthetic 60×20 BC1, six-mip test in isolated source trees. It uploads distinct tight bytes to each mip, checks every native GPU readback row, and compares the published tiled allocation against an independently CPU-tiled expected buffer. The unmodified parent fails while planning mip 1 (driver footprint differs from the exact subresource); the PR head passes all six mip footprints, all 888 payload bytes, and the complete 4,104-byte published allocation, including untouched padding. Mip 1 is a 32×12 driver footprint at offset 1,536.

Windows 11 build 26300; RTX 3080 Ti, NVIDIA driver 621.40; Rust 1.99.1 MSVC. With XCL_REQUIRE_GPU=1, both trees ran cargo test --offline --locked -j 3 -p xcl --lib hle::d3d12x::title_textures::tests::gpu_download_publishes_every_nonsquare_bc1_mip -- --exact --nocapture --test-threads=1 (separate target directories). Parent: 0 passed, 1 failed, 0 ignored, 0 GPU skips. PR head: 1 passed, 0 failed, 0 ignored, 0 GPU skips. This is focused evidence for the non-square BC1 mip path; I did not run the full workspace suite or a title smoke, so it is not a merge check.

AI use: Codex (GPT-6.2 Sol) wrote and ran the synthetic GPU test and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7303437742 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7303437742). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-12-01T06:55:20Z. --- Independent Windows GPU check of [#3550 head `3b4a7a4`](https://github.com/xcl-dev/xcl/commit/3b4a7a42dfb5fc310ac1fa37d2531821f31e7da4) against its exact [`main` parent `86e86fc`](https://github.com/xcl-dev/xcl/commit/86e86fcb33f94fa5d0c809d9b50af7b84bf49cce). I ran the same synthetic 60×20 BC1, six-mip test in isolated source trees. It uploads distinct tight bytes to each mip, checks every native GPU readback row, and compares the published tiled allocation against an independently CPU-tiled expected buffer. The unmodified parent fails while planning mip 1 (`driver footprint differs from the exact subresource`); the PR head passes all six mip footprints, all 888 payload bytes, and the complete 4,104-byte published allocation, including untouched padding. Mip 1 is a 32×12 driver footprint at offset 1,536. Windows 11 build 26300; RTX 3080 Ti, NVIDIA driver 621.40; Rust 1.99.1 MSVC. With `XCL_REQUIRE_GPU=1`, both trees ran `cargo test --offline --locked -j 3 -p xcl --lib hle::d3d12x::title_textures::tests::gpu_download_publishes_every_nonsquare_bc1_mip -- --exact --nocapture --test-threads=1` (separate target directories). Parent: **0 passed, 1 failed, 0 ignored, 0 GPU skips**. PR head: **1 passed, 0 failed, 0 ignored, 0 GPU skips**. This is focused evidence for the non-square BC1 mip path; I did not run the full workspace suite or a title smoke, so it is not a merge check. AI use: Codex (GPT-6.2 Sol) wrote and ran the synthetic GPU test and drafted this report.
Foniass commented 2026-12-01 08:08:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:08:51Z.


merge-check
base: 7d86c5d2b7
head: 3b4a7a42df
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2898 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (title_textures.rs +102/-11, README). It changes the default path more widely than the title says: every download query base is now rounded up to 512 bytes for all formats (~4231). On main, any multi-mip download whose previous mip ended off a 512-byte boundary was refused and silently skipped (~3902), uncompressed chains included (e.g. RGBA8 mips under 64 px), so this turns on downloads well beyond BC mip tails; the description should say so. Findings: (1) the PR's own smoke shows 2928 / 2921 frames against main's 3058 / 3073, about 4.5 % lower in both rounds, while other PRs on the same base stayed at 3009-3074; downloads that were refused now running (and the fence held until they're written) is a likely cause, so a count of downloads per frame before and after would settle it. This run is also lower than most on this machine today (see performance). (2) The no-GPU test builds its mock driver layout from the same rule the change adds, so only the BC3 GPU test checks real footprints. Fine: rounding to whole blocks fits xg::element (block sides 1 and 4 only, so BC6 / BC7 are covered), the block-count check is equivalent to the old one, packed mip-tail placement is untouched (tile_level), overflow is checked, and the GPU test uses skip_test.
performance: 60 s smoke of a retail title, main 7d86c5d2 vs this merge (34f56934): 1663 -> 1448 frames shown (87 %; last presents per 2 s: 60 60 60), peak commit 17153 -> 17512 MB, 0 device removals, 0 crashes. This is 87 % of main's frames, lower than most runs of this title on this machine today (typically 1650-1690); together with the PR's own -4.5 % in two rounds it points at a cost, though one run can't separate it from noise.
verdict: not yet: it turns on downloads far beyond BC mip tails (every multi-mip chain main used to skip), and both the PR's smoke runs and this one show fewer frames than main; how many downloads run per frame before and after would show whether that cost is real
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7304934955 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7304934955). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:08:51Z. --- merge-check base: 7d86c5d2b7845695031eeea1327aa81b6c439323 head: 3b4a7a42dfb5fc310ac1fa37d2531821f31e7da4 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2898 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (title_textures.rs +102/-11, README). It changes the default path more widely than the title says: every download query base is now rounded up to 512 bytes for all formats (~4231). On main, any multi-mip download whose previous mip ended off a 512-byte boundary was refused and silently skipped (~3902), uncompressed chains included (e.g. RGBA8 mips under 64 px), so this turns on downloads well beyond BC mip tails; the description should say so. Findings: (1) the PR's own smoke shows 2928 / 2921 frames against main's 3058 / 3073, about 4.5 % lower in both rounds, while other PRs on the same base stayed at 3009-3074; downloads that were refused now running (and the fence held until they're written) is a likely cause, so a count of downloads per frame before and after would settle it. This run is also lower than most on this machine today (see performance). (2) The no-GPU test builds its mock driver layout from the same rule the change adds, so only the BC3 GPU test checks real footprints. Fine: rounding to whole blocks fits `xg::element` (block sides 1 and 4 only, so BC6 / BC7 are covered), the block-count check is equivalent to the old one, packed mip-tail placement is untouched (`tile_level`), overflow is checked, and the GPU test uses `skip_test`. performance: 60 s smoke of a retail title, main 7d86c5d2 vs this merge (34f56934): 1663 -> 1448 frames shown (87 %; last presents per 2 s: 60 60 60), peak commit 17153 -> 17512 MB, 0 device removals, 0 crashes. This is 87 % of main's frames, lower than most runs of this title on this machine today (typically 1650-1690); together with the PR's own -4.5 % in two rounds it points at a cost, though one run can't separate it from noise. verdict: not yet: it turns on downloads far beyond BC mip tails (every multi-mip chain main used to skip), and both the PR's smoke runs and this one show fewer frames than main; how many downloads run per frame before and after would show whether that cost is real hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
BBareth commented 2026-12-01 08:47:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T08:47:09Z.


Thanks for the check. Both points looked at, head unchanged (3b4a7a42).

Wider than the title: correct, and the description now says so. The base alignment in prepare_texture_download applies to every format, so an uncompressed multi-mip chain that main refuses for the same reason is downloaded too.

Cost: I counted download plans with a local counter in prepare_downloads (not in the PR): main 493dbd3d against 493dbd3d merged with this PR, GTA 6, two 120 s runs each after a warm-up, RTX 5070 Ti.

plans accepted plans refused other formats frames shown
main, run 1 0 at least 512 0 3093
main, run 2 0 at least 256 0 3047
this PR, run 1 1 0 0 3142
this PR, run 2 1 0 0 3061
  • On main a refused plan is not dropped: the same block-compressed textures (formats 77 and 78) are prepared again at every submit and refused again, from about 100 s on. The counter logs at powers of two, so the refused numbers are lower bounds.
  • With this PR the plan is accepted once and the retries stop. No plan for a non-BC format was prepared in any run, so the wider effect is not reached in these 120 s.
  • The frame counts do not show the 4.5 % from my first smokes again. I cannot explain that earlier difference; these four runs are within run-to-run spread.

Not covered: the world after 120 s was not counted, and there is no test of an uncompressed multi-mip download. Both are under Not tested now.

AI use: Claude Code, Claude Fable 5.2 added the local counter, ran the four runs and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7305781649 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7305781649). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T08:47:09Z. --- Thanks for the check. Both points looked at, head unchanged (3b4a7a42). **Wider than the title:** correct, and the description now says so. The base alignment in `prepare_texture_download` applies to every format, so an uncompressed multi-mip chain that `main` refuses for the same reason is downloaded too. **Cost:** I counted download plans with a local counter in `prepare_downloads` (not in the PR): `main` 493dbd3d against 493dbd3d merged with this PR, GTA 6, two 120 s runs each after a warm-up, RTX 5070 Ti. | | plans accepted | plans refused | other formats | frames shown | |---|---|---|---|---| | `main`, run 1 | 0 | at least 512 | 0 | 3093 | | `main`, run 2 | 0 | at least 256 | 0 | 3047 | | this PR, run 1 | 1 | 0 | 0 | 3142 | | this PR, run 2 | 1 | 0 | 0 | 3061 | - On `main` a refused plan is not dropped: the same block-compressed textures (formats 77 and 78) are prepared again at every submit and refused again, from about 100 s on. The counter logs at powers of two, so the refused numbers are lower bounds. - With this PR the plan is accepted once and the retries stop. No plan for a non-BC format was prepared in any run, so the wider effect is not reached in these 120 s. - The frame counts do not show the 4.5 % from my first smokes again. I cannot explain that earlier difference; these four runs are within run-to-run spread. Not covered: the world after 120 s was not counted, and there is no test of an uncompressed multi-mip download. Both are under **Not tested** now. AI use: Claude Code, Claude Fable 5.2 added the local counter, ran the four runs and wrote this reply.
BBareth commented 2026-12-01 09:39:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T09:39:37Z.


Follow-up, head 443ad638: the uncompressed case now has a test.

gpu_download_publishes_every_rgba8_mip uploads a pattern to all 8 mips of a 128×128 RGBA8 texture, downloads it through the plan and compares the published bytes, like the BC3 test (both now share one helper). With the base alignment taken out it fails with driver footprint differs from the exact subresource; with it, it passes on the RTX 5070 Ti. The runtime code is unchanged from 3b4a7a42.

Suite on 443ad638: 2892 passed, 0 failed, 51 ignored, 28 SKIPPED lines. The smoke blocks in the description are rerun on this head.

AI use: Claude Code, Claude Fable 5.2 wrote the test and this comment and ran the tests.

<!-- greyfinch-sync:ivall/xcl:comment:7307019962 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7307019962). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T09:39:37Z. --- Follow-up, head 443ad638: the uncompressed case now has a test. `gpu_download_publishes_every_rgba8_mip` uploads a pattern to all 8 mips of a 128×128 RGBA8 texture, downloads it through the plan and compares the published bytes, like the BC3 test (both now share one helper). With the base alignment taken out it fails with `driver footprint differs from the exact subresource`; with it, it passes on the RTX 5070 Ti. The runtime code is unchanged from 3b4a7a42. Suite on 443ad638: 2892 passed, 0 failed, 51 ignored, 28 SKIPPED lines. The smoke blocks in the description are rerun on this head. AI use: Claude Code, Claude Fable 5.2 wrote the test and this comment and ran the tests.
Foniass commented 2026-12-01 10:12:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:12:42Z.


Triage (#1607) – head 443ad63

No open or merged PR makes the same change. #3514 (same author) touches texture-download command objects, not the footprint layout.
No problems found in the diff. Rounding to whole blocks keeps side 1 formats unchanged, and aligning the GetCopyableFootprints base matches the 512-byte offsets validate_download_layout expects.
Note: the new GPU test builds ReadyDownload { .. } without the pages field that #3549 adds, so the second of the two to merge must update it. There is also a double blank line before the new tests.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7307839641 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7307839641). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:12:42Z. --- **Triage (#1607)** – head 443ad63 No open or merged PR makes the same change. #3514 (same author) touches texture-download command objects, not the footprint layout. No problems found in the diff. Rounding to whole blocks keeps `side` 1 formats unchanged, and aligning the `GetCopyableFootprints` base matches the 512-byte offsets `validate_download_layout` expects. Note: the new GPU test builds `ReadyDownload { .. }` without the `pages` field that #3549 adds, so the second of the two to merge must update it. There is also a double blank line before the new tests. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
brainhay5 commented 2026-12-01 10:26:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T10:26:36Z.


merge-check claim
head: 443ad63815

<!-- greyfinch-sync:ivall/xcl:comment:7308196358 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7308196358). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-12-01T10:26:36Z. --- merge-check claim head: 443ad6381509f78a63bffadf049c151e39c8cedd
brainhay5 commented 2026-12-01 10:33:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T10:33:30Z.


merge-check claim
head: 443ad63815

<!-- greyfinch-sync:ivall/xcl:comment:7308367906 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7308367906). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-12-01T10:33:30Z. --- merge-check claim head: 443ad6381509f78a63bffadf049c151e39c8cedd
Foniass commented 2026-12-01 10:35:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:35:27Z.


merge-check
base: 493dbd3dd0
head: 443ad63815
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2903 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: re-check after my "not yet" on 3b4a7a42; the range-diff and the updated description read. Both points are answered. (1) The description and commit message now say the 512-byte base alignment applies to every format, so any multi-mip chain main refused is downloaded. A new GPU test, gpu_download_publishes_every_rgba8_mip, covers an uncompressed chain and fails without the alignment. (2) The frame cost now has a count behind it. The author counted plans in the retail title (local counter, not in the PR): main refused at least 512 / 256 block-compressed plans, re-preparing the same textures at every submit, while this head accepted one and refused none. Frames went 3093 / 3047 -> 3142 / 3061 in two 120 s runs each, so the lower numbers on the first head look like noise rather than download cost. My own smoke below agrees. Still open, both stated in Not tested: the bytes of the accepted retail download weren't compared, and no uncompressed retail download was seen. Fine: the shared helper keeps the BC3 test as it was, and nothing else changed.
performance: 60 s smoke of a retail title, main 493dbd3d vs this merge (d954dc77): 1670 -> 1680 frames shown (100 %; last presents per 2 s: 61 60 60), peak commit 17083 -> 17766 MB, 0 device removals, 0 crashes. In line with the PR's own retail runs (3093 / 3047 -> 3142 / 3061 frames over 120 s); the run is capped at 60 presents per second.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7308415696 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7308415696). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:35:27Z. --- merge-check base: 493dbd3dd0cd50b4c3e8d28f73ab9b504fcd8158 head: 443ad6381509f78a63bffadf049c151e39c8cedd merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2903 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: re-check after my "not yet" on 3b4a7a42; the range-diff and the updated description read. Both points are answered. (1) The description and commit message now say the 512-byte base alignment applies to every format, so any multi-mip chain main refused is downloaded. A new GPU test, `gpu_download_publishes_every_rgba8_mip`, covers an uncompressed chain and fails without the alignment. (2) The frame cost now has a count behind it. The author counted plans in the retail title (local counter, not in the PR): main refused at least 512 / 256 block-compressed plans, re-preparing the same textures at every submit, while this head accepted one and refused none. Frames went 3093 / 3047 -> 3142 / 3061 in two 120 s runs each, so the lower numbers on the first head look like noise rather than download cost. My own smoke below agrees. Still open, both stated in Not tested: the bytes of the accepted retail download weren't compared, and no uncompressed retail download was seen. Fine: the shared helper keeps the BC3 test as it was, and nothing else changed. performance: 60 s smoke of a retail title, main 493dbd3d vs this merge (d954dc77): 1670 -> 1680 frames shown (100 %; last presents per 2 s: 61 60 60), peak commit 17083 -> 17766 MB, 0 device removals, 0 crashes. In line with the PR's own retail runs (3093 / 3047 -> 3142 / 3061 frames over 120 s); the run is capped at 60 presents per second. verdict: safe to merge hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
brainhay5 commented 2026-12-01 11:48:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T11:48:27Z.


merge-check claim withdrawn
Our automated merge-check loop claimed this PR and then stopped before posting a check — two loops were running at once and both are now shut down. No check from us is coming, so this claim is void and the head is free for someone else to take.

AI use: an agent posted this withdrawal.

<!-- greyfinch-sync:ivall/xcl:comment:7310171057 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7310171057). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-12-01T11:48:27Z. --- merge-check claim withdrawn Our automated merge-check loop claimed this PR and then stopped before posting a check — two loops were running at once and both are now shut down. No check from us is coming, so this claim is void and the head is free for someone else to take. *AI use: an agent posted this withdrawal.*
Decodere commented 2026-12-02 09:06:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:06:47Z.


merge-check
base: 1c8b551475
head: 443ad63815
merge: clean trial merge into 1c8b551475e1e7bfe48f94448492a4c3544a2e0f (trial-merge commit 69e305691b5d63c44e1fd4ad74d9ffb6606f65fb; git diff --check clean).
build: cargo build --workspace -> ok; cargo build --release -p xcl -> ok.
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets) -> 2912 passed, 0 failed, 51 ignored (+3 new tests vs main 1c8b5514; all 43 targets green including gpu_two_pass_cache_e2e). All 3 new hle::d3d12x::title_textures::tests passed with 0 skips on RTX 4060: download_layout_accepts_full_bc_blocks_for_small_mips, gpu_download_publishes_every_bc3_mip, and gpu_download_publishes_every_rgba8_mip. 28 SKIPPED lines — all hardware/environment-expected on RTX 4060 (22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)).
review: read the full merged diff (2 files: README.md +1/-1, crates/xcl/src/hle/d3d12x/title_textures.rs +115/-11, total +116/-12). Clean and tightly scoped: reverse_layout_subresource and validate_download_layout round mip (width, height) up to whole format blocks via checked_next_multiple_of(side) (matching GetCopyableFootprints for small BC mip tails), and prepare_texture_download aligns base to D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT (512 bytes) before each single-subresource GetCopyableFootprints call (fixing both BC and RGBA8 small-mip chains). The three new unit and GPU round-trip tests verify 12-mip BC3 and 8-mip RGBA8 upload -> download -> publish byte-for-byte. No UB, overflow, or correctness issues found (minor merge-order note: if #3549 merges first, ReadyDownload in gpu_download_publishes_every_mip will need its new field).
performance: Tier 3 60 s retail smoke (title: 29640639) shows no regression vs main 1c8b5514 baseline (1462 frames, presents per 2 s (last 3): 48 53 59, peak commit: 16043 MB): 1620 frames (+10.8%), presents per 2 s (last 3): 61 60 60, peak commit: 14963 MB (-6.7%), 0 device removals, 0 crashes.

xcl-smoke v1
commit: 69e305691b5d63c44e1fd4ad74d9ffb6606f65fb
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1620 (PresentX 1620)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14963 MB

verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7340394946 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7340394946). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T09:06:47Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 443ad6381509f78a63bffadf049c151e39c8cedd merge: clean trial merge into `1c8b551475e1e7bfe48f94448492a4c3544a2e0f` (trial-merge commit `69e305691b5d63c44e1fd4ad74d9ffb6606f65fb`; `git diff --check` clean). build: `cargo build --workspace` -> ok; `cargo build --release -p xcl` -> ok. tests: `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture` (43 targets) -> 2912 passed, 0 failed, 51 ignored (+3 new tests vs `main` `1c8b5514`; all 43 targets green including `gpu_two_pass_cache_e2e`). All 3 new `hle::d3d12x::title_textures::tests` passed with 0 skips on RTX 4060: `download_layout_accepts_full_bc_blocks_for_small_mips`, `gpu_download_publishes_every_bc3_mip`, and `gpu_download_publishes_every_rgba8_mip`. 28 `SKIPPED` lines — all hardware/environment-expected on RTX 4060 (22 `no wave64`, 2 `no d3d12SDKLayers.dll`, 1 `no D3D12 debug layer`, 2 `no heap windows`, 1 `cannot disable the driver cache (Windows Developer Mode required)`). review: read the full merged diff (2 files: `README.md` +1/-1, `crates/xcl/src/hle/d3d12x/title_textures.rs` +115/-11, total +116/-12). Clean and tightly scoped: `reverse_layout_subresource` and `validate_download_layout` round mip `(width, height)` up to whole format blocks via `checked_next_multiple_of(side)` (matching `GetCopyableFootprints` for small BC mip tails), and `prepare_texture_download` aligns `base` to `D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT` (512 bytes) before each single-subresource `GetCopyableFootprints` call (fixing both BC and RGBA8 small-mip chains). The three new unit and GPU round-trip tests verify 12-mip BC3 and 8-mip RGBA8 upload -> download -> publish byte-for-byte. No UB, overflow, or correctness issues found (minor merge-order note: if `#3549` merges first, `ReadyDownload` in `gpu_download_publishes_every_mip` will need its new field). performance: Tier 3 60 s retail smoke (`title: 29640639`) shows no regression vs `main` `1c8b5514` baseline (`1462` frames, `presents per 2 s (last 3): 48 53 59`, `peak commit: 16043 MB`): `1620` frames (+10.8%), `presents per 2 s (last 3): 61 60 60`, `peak commit: 14963 MB` (-6.7%), 0 device removals, 0 crashes. ``` xcl-smoke v1 commit: 69e305691b5d63c44e1fd4ad74d9ffb6606f65fb gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1620 (PresentX 1620) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14963 MB ``` verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
bmjask commented 2026-12-02 14:11:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T14:11:23Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7348134116 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7348134116). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T14:11:23Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
throny commented 2026-12-02 17:02:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-02T17:02:07Z.


Test report for #3550 at head 443ad6381 (not a merge check): the retail title crashes about 100 s after the first frame with this PR.

Tested

  • RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0 release, plus our local auto-press patch for the start screen; XCL_RESIDENCY_PRIORITY=1.
  • A trial batch of 49 merge-queue PRs on main 5eaadb54c crashed in two world runs (cold and warm), each about 100 s after the first frame: an unhandled access violation in the title, a write to address 0. Those are the title's own abort writes, not a device removal.
  • Halving the batch's 41 runtime PRs: every set without #3550 ran past that point. Main 5eaadb54c + #3550 alone crashed the same way, 102 s after the first frame (first frame at 7.7 s).
  • Main 5eaadb54c without it (plus #3633) ran 900 s and 300 s without a crash.

Not tested

  • Why it happens. I didn't look into which mip tail download the title trips on.
  • AMD.
  • Whether it depends on timing (all runs on one machine).

AI use

  • Claude Code with Claude Opus 5.5 ran the builds, the runs and the halving search, and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7352804512 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7352804512). Originally posted by [throny](https://github.com/throny) on 2026-12-02T17:02:07Z. --- Test report for #3550 at head `443ad6381` (not a merge check): **the retail title crashes about 100 s after the first frame with this PR.** **Tested** - RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0 release, plus our local auto-press patch for the start screen; `XCL_RESIDENCY_PRIORITY=1`. - A trial batch of 49 merge-queue PRs on main `5eaadb54c` crashed in two world runs (cold and warm), each about 100 s after the first frame: an unhandled access violation in the title, a write to address 0. Those are the title's own abort writes, not a device removal. - Halving the batch's 41 runtime PRs: every set without #3550 ran past that point. **Main `5eaadb54c` + #3550 alone** crashed the same way, 102 s after the first frame (first frame at 7.7 s). - Main `5eaadb54c` without it (plus #3633) ran 900 s and 300 s without a crash. **Not tested** - Why it happens. I didn't look into which mip tail download the title trips on. - AMD. - Whether it depends on timing (all runs on one machine). **AI use** - Claude Code with Claude Opus 5.5 ran the builds, the runs and the halving search, and wrote this report.
tiagonleal commented 2026-12-02 21:42:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-12-02T21:42:22Z.


merge-check
base: 5ad98adbc3
head: 443ad63815
merge: clean (merge commit 4d1d8b0789971f4d308bac6fe582a8f34472375a; git diff --check clean)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3008 passed, 0 failed, 52 ignored; SKIPPED: 24 (22 no wave64, 2 no heap windows); failing: none
title run: crashed before the world, 3 of 3 runs: Newer Retail Game, release build of this merge, Series S settings (XCL_DEVICE_TYPE=lockhart, XCL_COHERENT_MB=512, XCL_UMA_WINDOWS=16, XCL_SPARSE_LAZY=1), scripted A presses, 240 s planned. Each run ended at 86 to 88 s with unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0), the same address every time, before the first 2 s window with 5,000+ draws and dispatches. Main 5ad98adb with the same settings, two runs: no crash (into the world at 94 s and at 80 s).
review: the diff reads correctly to me (footprint rounded up to the block size, base aligned to 512, non-BC formats unchanged), but the title runs above show a crash in the title's code that main does not have, matching what was reported here about a crash ~100 s in.
performance: not compared; the PR's runs end in the crash.
verdict: not yet: the retail title crashes at ~87 s in 3 of 3 runs of this merge (write to address 0 at game_scarlett_master.exe+0x23cf683), not on main
hardware / tool and model: RTX 5070 Ti 16 GB (driver 617.42), Ryzen 7 9800X3D, 32 GB, Windows 11 Pro 26300 / Claude Code with Claude Opus 5.5

AI use: Claude Code (Claude Opus 5.5) ran the build, tests and title runs and wrote this; a Claude Sonnet subagent read the diff and I checked its points.
~Tiago

<!-- greyfinch-sync:ivall/xcl:comment:7359662878 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7359662878). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-12-02T21:42:22Z. --- merge-check base: 5ad98adbc360225ac8a57ad9661e16fe8df9d8dd head: 443ad6381509f78a63bffadf049c151e39c8cedd merge: clean (merge commit 4d1d8b0789971f4d308bac6fe582a8f34472375a; `git diff --check` clean) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3008 passed, 0 failed, 52 ignored; SKIPPED: 24 (22 no wave64, 2 no heap windows); failing: none title run: crashed before the world, 3 of 3 runs: Newer Retail Game, release build of this merge, Series S settings (`XCL_DEVICE_TYPE=lockhart`, `XCL_COHERENT_MB=512`, `XCL_UMA_WINDOWS=16`, `XCL_SPARSE_LAZY=1`), scripted A presses, 240 s planned. Each run ended at 86 to 88 s with `unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)`, the same address every time, before the first 2 s window with 5,000+ draws and dispatches. Main 5ad98adb with the same settings, two runs: no crash (into the world at 94 s and at 80 s). review: the diff reads correctly to me (footprint rounded up to the block size, base aligned to 512, non-BC formats unchanged), but the title runs above show a crash in the title's code that main does not have, matching what was reported here about a crash ~100 s in. performance: not compared; the PR's runs end in the crash. verdict: not yet: the retail title crashes at ~87 s in 3 of 3 runs of this merge (write to address 0 at game_scarlett_master.exe+0x23cf683), not on main hardware / tool and model: RTX 5070 Ti 16 GB (driver 617.42), Ryzen 7 9800X3D, 32 GB, Windows 11 Pro 26300 / Claude Code with Claude Opus 5.5 AI use: Claude Code (Claude Opus 5.5) ran the build, tests and title runs and wrote this; a Claude Sonnet subagent read the diff and I checked its points. ~Tiago
BBareth commented 2026-12-03 01:10:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-03T01:10:27Z.


Thanks @throny and @tiagonleal. I can reproduce it, and #3549 stops it.

Reproduced (RTX 5070 Ti, 420 s world runs, XCL_RESIDENCY_PRIORITY=1):

  • main c53e9696 + #3550 (443ad638): crashed in 3 of 3 runs, at 161 s, 163 s and 161 s, with the same write to address 0 at game_scarlett_master.exe+0x23cf683.
  • main c53e9696: no crash in 2 of 2 runs (3319 and 3494 frames).

Likely cause (inferred from the logs, not proven yet):

  • Before this PR, a BC texture with mips smaller than one block failed the download layout check and was never downloaded. With the PR, those downloads go through, and some cover pages the title has reserved but not committed.
  • write_changed_pages refuses an uncommitted page and keeps the fence hidden until the write succeeds, which never happens. The title's wait on that fence then times out, and it aborts with the write to 0.
  • The timing fits: with #3549 in the same tree, the first uncommitted page shows up at 136 s, about 25 s before the crash time in the runs without it.
  • I've queued a run of #3550 alone that logs the refused writes, to confirm this.

With #3549: main 078358a0 + #3550 (443ad638) + #3549's fix (56c06989, the same runtime code as the update I'm about to push to #3549). 3 of 3 runs went 420 s without a crash: 3510, 3649 and 3956 frames, no device removal. #3549 left out 64 to 128 uncommitted pages per run.

So #3550 depends on #3549. I'll mark it in the description, and it shouldn't be merged before #3549.

Not tested: AMD. The combined runs used main 078358a0, not c53e9696.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7364038479 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7364038479). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-03T01:10:27Z. --- Thanks @throny and @tiagonleal. I can reproduce it, and #3549 stops it. **Reproduced** (RTX 5070 Ti, 420 s world runs, `XCL_RESIDENCY_PRIORITY=1`): - main `c53e9696` + #3550 (`443ad638`): crashed in 3 of 3 runs, at 161 s, 163 s and 161 s, with the same write to address 0 at `game_scarlett_master.exe+0x23cf683`. - main `c53e9696`: no crash in 2 of 2 runs (3319 and 3494 frames). **Likely cause** (inferred from the logs, not proven yet): - Before this PR, a BC texture with mips smaller than one block failed the download layout check and was never downloaded. With the PR, those downloads go through, and some cover pages the title has reserved but not committed. - `write_changed_pages` refuses an uncommitted page and keeps the fence hidden until the write succeeds, which never happens. The title's wait on that fence then times out, and it aborts with the write to 0. - The timing fits: with #3549 in the same tree, the first uncommitted page shows up at 136 s, about 25 s before the crash time in the runs without it. - I've queued a run of #3550 alone that logs the refused writes, to confirm this. **With #3549:** main `078358a0` + #3550 (`443ad638`) + #3549's fix (`56c06989`, the same runtime code as the update I'm about to push to #3549). 3 of 3 runs went 420 s without a crash: 3510, 3649 and 3956 frames, no device removal. #3549 left out 64 to 128 uncommitted pages per run. So #3550 depends on #3549. I'll mark it in the description, and it shouldn't be merged before #3549. **Not tested:** AMD. The combined runs used main `078358a0`, not `c53e9696`. **AI use:** Claude Code (Claude Opus 5.5) ran the builds and runs, read the logs and wrote this comment.
throny commented 2026-12-03 01:24:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-03T01:24:05Z.


Confirmed on a second card: #3549 + #3550 together run clean on the RTX 4080. Main 078358a05 + #3549 c3a91393 + #3550 443ad638, one 300 s world run (XCL_RESIDENCY_PRIORITY=1): first frame at 57 s, then 300 s in the world with no crash, no device removal and no Aftermath dump, 2.90 presents/s. #3550 alone crashed here about 100 s in (the same write to 0 you saw). So the dependency holds on NVIDIA Ada too.

AI use: Claude Code (Claude Opus 5.5) ran it and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7364300436 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7364300436). Originally posted by [throny](https://github.com/throny) on 2026-12-03T01:24:05Z. --- Confirmed on a second card: **#3549 + #3550 together run clean on the RTX 4080.** Main `078358a05` + #3549 `c3a91393` + #3550 `443ad638`, one 300 s world run (`XCL_RESIDENCY_PRIORITY=1`): first frame at 57 s, then 300 s in the world with no crash, no device removal and no Aftermath dump, 2.90 presents/s. #3550 alone crashed here about 100 s in (the same write to 0 you saw). So the dependency holds on NVIDIA Ada too. *AI use: Claude Code (Claude Opus 5.5) ran it and wrote this.*
BBareth commented 2026-12-03 01:50:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-03T01:50:08Z.


Confirmed with a diagnostic build of main c53e9696 + #3550 (not for merging) that logs every texture download written and every page write_changed_pages refuses:

  • At 133.8 s two downloads were refused on MEM_RESERVE pages (state 0x2000, at 0x1394578000 and 0x124e858000): 16 refusals in 32 ms, then none. No later poll reached them.
  • 30 s later, at 164 s, the title crashed with the same write to 0 at game_scarlett_master.exe+0x23cf683.
  • Only 3 downloads were written in the whole run, and none near the address the crash read from (r8). So nothing was written over the title's data; the title is waiting on a fence that never becomes visible.

That is the case #3549 handles (leave settled reserved pages out). With #3549 in the tree, the same pages were left out from 136 s, and 3 of 3 runs went on without a crash.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7364787798 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7364787798). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-03T01:50:08Z. --- Confirmed with a diagnostic build of main `c53e9696` + #3550 (not for merging) that logs every texture download written and every page `write_changed_pages` refuses: - At 133.8 s two downloads were refused on `MEM_RESERVE` pages (state `0x2000`, at `0x1394578000` and `0x124e858000`): 16 refusals in 32 ms, then none. No later poll reached them. - 30 s later, at 164 s, the title crashed with the same write to 0 at `game_scarlett_master.exe+0x23cf683`. - Only 3 downloads were written in the whole run, and none near the address the crash read from (`r8`). So nothing was written over the title's data; the title is waiting on a fence that never becomes visible. That is the case #3549 handles (leave settled reserved pages out). With #3549 in the tree, the same pages were left out from 136 s, and 3 of 3 runs went on without a crash. AI use: Claude Code (Claude Opus 5.5).
throny commented 2026-12-03 02:51:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-03T02:51:53Z.


merge-check
base: 395405e4c
head: 443ad63815
merge: clean (trial merge of #3549 then this PR into main 395405e4c)
build: cargo build --workspace -> ok
tests: cargo test --workspace -- --test-threads=4 -> 3019 passed, 0 failed, 56 ignored; 25 SKIPPED (no wave64 and similar); failing: none
title run: retail title, RTX 4080, main 078358a05 + #3549 fc7abe517 + this head, 300 s in the world (run 517), no crash, no device removal, no Aftermath dump, 2.93 presents/s. Without #3549 this head crashes about 100 s in (runs 472, 474, 485; BBareth reproduced it on an RTX 5070 Ti)
review: diff read (title_textures.rs download layout, the 512-byte base alignment for every format, the new GPU tests). With #3549 in the tree, a download over uncommitted pages no longer holds its fence back
performance: no measurable cost (2.93 presents/s, as main on this machine)
verdict: safe to merge after #3549 (merged before it, it crashes the retail title; BBareth marks the dependency)
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300 / Claude Code with Claude Opus 5.5 (trial suite, world runs, diff review)

<!-- greyfinch-sync:ivall/xcl:comment:7365943279 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3550#issuecomment-7365943279). Originally posted by [throny](https://github.com/throny) on 2026-12-03T02:51:53Z. --- merge-check base: 395405e4c head: 443ad6381509f78a63bffadf049c151e39c8cedd merge: clean (trial merge of #3549 then this PR into main 395405e4c) build: cargo build --workspace -> ok tests: cargo test --workspace -- --test-threads=4 -> 3019 passed, 0 failed, 56 ignored; 25 SKIPPED (no wave64 and similar); failing: none title run: retail title, RTX 4080, main 078358a05 + #3549 fc7abe517 + this head, 300 s in the world (run 517), no crash, no device removal, no Aftermath dump, 2.93 presents/s. Without #3549 this head crashes about 100 s in (runs 472, 474, 485; BBareth reproduced it on an RTX 5070 Ti) review: diff read (title_textures.rs download layout, the 512-byte base alignment for every format, the new GPU tests). With #3549 in the tree, a download over uncommitted pages no longer holds its fence back performance: no measurable cost (2.93 presents/s, as main on this machine) verdict: safe to merge **after #3549** (merged before it, it crashes the retail title; BBareth marks the dependency) hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300 / Claude Code with Claude Opus 5.5 (trial suite, world runs, diff review)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3550:upstream-pr/3550'
git switch 'upstream-pr/3550'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3550'
git switch 'upstream-pr/3550'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3550'
git switch 'upstream-pr/3550'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3550'
git switch 'main'
git merge --squash 'upstream-pr/3550'
git switch 'main'
git merge --ff-only 'upstream-pr/3550'
git switch 'main'
git merge 'upstream-pr/3550'
git push origin 'main'
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!3550
No description provided.