D3D12.X: map a one-slice title texture's packed mips where D3D12 addresses them #470

Open
github-bot wants to merge 2 commits from github-bot/gh-470 into main AGit
Owner

@⁠Abdellah-Khanani on GitHub · 2026-11-24 00:46 UTC · original
Abdellah-Khanani:rdna1-packed-mips → main · +47 −12 · 2 files · 2 commits · open

On AMD's RDNA1 Windows driver, the packed mips of a reserved title texture with standard mips stay unmapped, so they read zero. Measured on an RX 5700 XT with the 64x64x64 RGBA8, 4-mip 3D texture of placed_title_textures_share_vram_and_preserve_pixels: GetResourceTiling gives 19 tiles: mip 0 has 16 (start 0), mip 1 has 2 (start 16), and mips 2-3 are packed into 1 tile (NumStandardMips 2, start 18). After Pages::map's single run over the 19 overall tiles from subresource 0, mip 2 reads back all zero (3D 64x64x64 4 mips: subresource 2 mismatch). Mapping the packed block a second time, with the first packed mip as the subresource and the tile in the block as X (how D3D12 addresses packed mips), fixes it.

That test has been SKIPPED on this adapter since a6f5f7a, because the driver refuses the reserved 256x256x6 cube too. This PR lets the test run there: only the cube's same-address reuse step is left out when the cube is committed, so it catches this bug.

What is in it

  • D3D12.X: map the packed mips of a one-slice title texture where D3D12 addresses them: Pages::map_packed_mips in crates/xcl/src/hle/d3d12x/vram.rs, called after map in bind. Only for a 3D texture or a 2D texture without an array (an array keeps a packed block per slice; not measured here), and only when it has both standard and packed mips. It maps the same tiles map chose, so on a driver where the run already reached them nothing changes.
  • Tests: the title textures test runs on an adapter that makes no reserved cube: crates/xcl/src/hle/d3d12x/title_textures.rs. The whole-test skip from a6f5f7a is removed. The cubemap's same-address reuse check runs only when the first cube was reserved (a committed cube has no tiles to reuse); the existing tolerance for a committed cube stays as it was.

Tested

  • AMD Radeon RX 5700 XT (RDNA1, 8 GB), driver 32.0.21045.29003; Ryzen 5 2600; Windows 11 Pro 23H2 (22631); Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug.
  • Tiled resources tier 3, resource heap tier 2. The driver refuses the reserved 256x256x6 cube with 9 mips (committed instead).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on main 2997c9a + this PR: 675 passed, 1 failed, 41 ignored. The failure is gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction, which also fails on main on this adapter and is unrelated (the driver does not fuse mad; reported separately).
  • SKIPPED gpu::recomp::tests::gpu_geometry_mode_es_gs_strip: no mesh shaders, SKIPPED gpu::recomp::tests::gpu_mesh_mode_two_passes: no mesh shaders.
  • placed_title_textures_share_vram_and_preserve_pixels with the test change but without the vram.rs change: fails (3D 64x64x64 4 mips: subresource 2 mismatch). With both changes: passes.

Regression run

  • Run by @⁠srcamarda on a retail title (https://github.com/ivall/xcl/pull/470#issuecomment-7119807793), not by me: AMD Radeon RX 7800 XT (RDNA3), driver 32.0.32029.2010, release builds, scripts/smoke.ps1 -Seconds 90, no input, second run of each (warm translation cache). The blocks are copied unchanged from that comment.

main:

xcl-smoke v1
commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f
gpu: AMD Radeon RX 7800 XT
title: RetailGame_Dump
seconds: 90
exit: 0x0
frames shown: 2361 (PresentX 2361)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15674 MB

this PR's head:

xcl-smoke v1
commit: 3896e4fb97d4971971ab7b178a541170cb96318b
gpu: AMD Radeon RX 7800 XT
title: RetailGame_Dump
seconds: 90
exit: 0x0
frames shown: 2365 (PresentX 2365)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15683 MB

Not tested

  • A retail title on my machine: I have none; the run above is @⁠srcamarda's.
  • Intel and GitHub's runner. RDNA2, RDNA3, RDNA4, an AMD iGPU and several NVIDIA cards were tested by others in the comments below, not by me.
  • Array and cube textures with packed mips, which this change leaves alone.
  • Whether the retail run above places a one-slice texture with packed mips in its 90 s (the title stays on its account screen); @⁠srcamarda did not check, so the run shows no regression, not the fix at work.

AI use

  • Claude Code with Claude Opus 5.5 (claude-opus-5-5): found the cause with a temporary GetResourceTiling log, wrote both changes and this description, and ran the tests above on my machine. I reviewed the diff.

🤖 Generated with Claude Code

**@⁠Abdellah-Khanani** on GitHub · 2026-11-24 00:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/470) `Abdellah-Khanani:rdna1-packed-mips` → `main` · +47 −12 · 2 files · 2 commits · open On AMD's RDNA1 Windows driver, the packed mips of a reserved title texture with standard mips stay unmapped, so they read zero. Measured on an RX 5700 XT with the 64x64x64 RGBA8, 4-mip 3D texture of `placed_title_textures_share_vram_and_preserve_pixels`: `GetResourceTiling` gives 19 tiles: mip 0 has 16 (start 0), mip 1 has 2 (start 16), and mips 2-3 are packed into 1 tile (`NumStandardMips` 2, start 18). After `Pages::map`'s single run over the 19 overall tiles from subresource 0, mip 2 reads back all zero (`3D 64x64x64 4 mips: subresource 2 mismatch`). Mapping the packed block a second time, with the first packed mip as the subresource and the tile in the block as X (how D3D12 addresses packed mips), fixes it. That test has been SKIPPED on this adapter since a6f5f7a, because the driver refuses the reserved 256x256x6 cube too. This PR lets the test run there: only the cube's same-address reuse step is left out when the cube is committed, so it catches this bug. **What is in it** - `D3D12.X: map the packed mips of a one-slice title texture where D3D12 addresses them`: `Pages::map_packed_mips` in `crates/xcl/src/hle/d3d12x/vram.rs`, called after `map` in `bind`. Only for a 3D texture or a 2D texture without an array (an array keeps a packed block per slice; not measured here), and only when it has both standard and packed mips. It maps the same tiles `map` chose, so on a driver where the run already reached them nothing changes. - `Tests: the title textures test runs on an adapter that makes no reserved cube`: `crates/xcl/src/hle/d3d12x/title_textures.rs`. The whole-test skip from a6f5f7a is removed. The cubemap's same-address reuse check runs only when the first cube was reserved (a committed cube has no tiles to reuse); the existing tolerance for a committed cube stays as it was. **Tested** - AMD Radeon RX 5700 XT (RDNA1, 8 GB), driver 32.0.21045.29003; Ryzen 5 2600; Windows 11 Pro 23H2 (22631); Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug. - Tiled resources tier 3, resource heap tier 2. The driver refuses the reserved 256x256x6 cube with 9 mips (committed instead). - `cargo test --workspace --no-fail-fast -- --test-threads=4` on `main` 2997c9a + this PR: 675 passed, 1 failed, 41 ignored. The failure is `gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction`, which also fails on `main` on this adapter and is unrelated (the driver does not fuse `mad`; reported separately). - `SKIPPED gpu::recomp::tests::gpu_geometry_mode_es_gs_strip: no mesh shaders`, `SKIPPED gpu::recomp::tests::gpu_mesh_mode_two_passes: no mesh shaders`. - `placed_title_textures_share_vram_and_preserve_pixels` with the test change but without the `vram.rs` change: fails (`3D 64x64x64 4 mips: subresource 2 mismatch`). With both changes: passes. **Regression run** - Run by @⁠srcamarda on a retail title (https://github.com/ivall/xcl/pull/470#issuecomment-7119807793), not by me: AMD Radeon RX 7800 XT (RDNA3), driver 32.0.32029.2010, release builds, `scripts/smoke.ps1 -Seconds 90`, no input, second run of each (warm translation cache). The blocks are copied unchanged from that comment. `main`: ``` xcl-smoke v1 commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f gpu: AMD Radeon RX 7800 XT title: RetailGame_Dump seconds: 90 exit: 0x0 frames shown: 2361 (PresentX 2361) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15674 MB ``` this PR's head: ``` xcl-smoke v1 commit: 3896e4fb97d4971971ab7b178a541170cb96318b gpu: AMD Radeon RX 7800 XT title: RetailGame_Dump seconds: 90 exit: 0x0 frames shown: 2365 (PresentX 2365) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15683 MB ``` **Not tested** - A retail title on my machine: I have none; the run above is @⁠srcamarda's. - Intel and GitHub's runner. RDNA2, RDNA3, RDNA4, an AMD iGPU and several NVIDIA cards were tested by others in the comments below, not by me. - Array and cube textures with packed mips, which this change leaves alone. - Whether the retail run above places a one-slice texture with packed mips in its 90 s (the title stays on its account screen); @⁠srcamarda did not check, so the run shows no regression, not the fix at work. **AI use** - Claude Code with Claude Opus 5.5 (claude-opus-5-5): found the cause with a temporary `GetResourceTiling` log, wrote both changes and this description, and ran the tests above on my machine. I reviewed the diff. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On AMD's RDNA1 Windows driver (RX 5700 XT, 32.0.21045.29003) the packed mips
of a reserved title texture with standard mips stayed unmapped and read zero.
A 64x64x64 RGBA8 texture with 4 mips has 19 tiles there: mip 0 16, mip 1 2,
and mips 2-3 packed into one tile (NumStandardMips 2, start 18). After the
single run over the overall tiles from subresource 0 in Pages::map, mip 2
read back all zero.

The packed block is now mapped again with the first packed mip as the
subresource and the tile within the block as X, to the same tiles map chose.
Only for a 3D texture or a 2D texture without an array (an array keeps a
packed block per slice, not measured), and only when it has standard and
packed mips.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
a6f5f7a skipped placed_title_textures_share_vram_and_preserve_pixels whole
on an adapter that refuses the reserved 256x256x6 cube with 9 mips, because
the cube's same-address reuse step then expected shared pages it never got.
That also hid the unmapped packed mips of the 3D texture on AMD's RDNA1
driver. The reuse step now runs only when the first cube was reserved (a
committed cube has no tiles to reuse); the rest of the test runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:22:42 +00:00
Author
Owner

@⁠Mustafaiq1998x on GitHub · 2026-11-24 01:02 UTC · original

<html>

Independent RDNA2 validation — AMD Radeon RX 6800

Confirmed that the packed-mip issue also affects RDNA2.

Environment:

  • GPU: AMD Radeon RX 6800

  • Driver: 32.0.21045.29003

  • Windows build: 26300

  • Rust: 1.100.0 MSVC

  • DXC: 1.9.2602.17

  • Debug build

Results:

Revision | Passed | Failed -- | -- | -- Main (2997c9a) | 0 | 2 PR #470 (3896e4f) | 4 | 0

Main fails with:
3D 64x64x64 4 mips: subresource 2 mismatch

The PR passes the complete placed_title_textures_share_vram_and_preserve_pixels test.

For the final A/B run, I temporarily instrumented the test to print and assert the actual DXGI adapter, since it uses EnumAdapters1(0) rather than XCL_ADAPTER.

Both runs confirmed AMD Radeon RX 6800.

The diagnostic source changes were restored afterward. No retail game data was used.

This confirms the fix on RDNA2 in addition to the author's RDNA1 results.

AI use: ChatGPT (GPT-6.2) assisted with investigation, test planning and report preparation. All GPU tests were executed on my local hardware.

</html>
**@⁠Mustafaiq1998x** on GitHub · 2026-11-24 01:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7118697582) <html> <body> <!--StartFragment--><p><strong><span>Independent RDNA2 validation — AMD Radeon RX 6800</span></strong></p><p><span>Confirmed that the packed-mip issue also affects RDNA2.</span></p><p><strong><span>Environment:</span></strong></p><ul><li><p><span>GPU: AMD Radeon RX 6800</span></p></li><li><p><span>Driver: 32.0.21045.29003</span></p></li><li><p><span>Windows build: 26300</span></p></li><li><p><span>Rust: 1.100.0 MSVC</span></p></li><li><p><span>DXC: 1.9.2602.17</span></p></li><li><p><span>Debug build</span></p></li></ul><p><strong><span>Results:</span></strong></p> Revision | Passed | Failed -- | -- | -- Main (2997c9a) | 0 | 2 PR #470 (3896e4f) | 4 | 0 <p><span>Main fails with:</span><br><code><span>3D 64x64x64 4 mips: subresource 2 mismatch</span></code></p><p><span>The PR passes the complete </span><code><span>placed_title_textures_share_vram_and_preserve_pixels</span></code><span> test.</span></p><p><span>For the final A/B run, I temporarily instrumented the test to print and assert the actual DXGI adapter, since it uses </span><code><span>EnumAdapters1(0)</span></code><span> rather than </span><code><span>XCL_ADAPTER</span></code><span>.</span></p><p><span>Both runs confirmed </span><code><span>AMD Radeon RX 6800</span></code><span>.</span></p><p><span>The diagnostic source changes were restored afterward. No retail game data was used.</span></p><p><span>This confirms the fix on RDNA2 in addition to the author's RDNA1 results.</span></p><p><strong><span>AI use:</span></strong><span> ChatGPT (GPT-6.2) assisted with investigation, test planning and report preparation. All GPU tests were executed on my local hardware.</span></p><!--EndFragment--> </body> </html>
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 01:16 UTC · original

Test run of 3896e4fb97d4971971ab7b178a541170cb96318b on AMD RDNA4 (the PR has RDNA1 and RDNA2 results). The branch is based on 2997c9a, so I merged it onto current main 7ebf1b8 locally (clean merge, title_textures.rs and vram.rs) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4) on the merge: 677 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 637 passed, 0 failed, 21 ignored
  • 0 SKIPPED: on this adapter the reserved 256x256x6 cube is made, so placed_title_textures_share_vram_and_preserve_pixels takes the reserved path, including the cubemap same-address reuse step, with map_packed_mips active; it passes (again alone with --nocapture: 1 passed, 14.2 s, no SKIPPED line)

So on RDNA4, where map already reached the packed tiles before this change (the test ran and passed on main a6f5f7a on this machine, 0 SKIPPED), mapping them a second time changes nothing that the test can see.

Review of the change: map_packed_mips maps the same tiles map chose, addressed as D3D12 addresses packed mips (subresource = first packed mip, X = tile within the packed block), one call per heap with the other heaps' tiles skipped, as map does. It returns early for arrays and cubes, for textures without standard or packed mips, and when the packed block does not fit tiles. The test change keeps the reuse step only when the first cube was reserved, which is the case the step is about. I found nothing to change. One thing not measured: every placement of a one-slice texture with packed mips now does a second UpdateTileMappings and a Signal; that could matter during world streaming, next to #490.

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

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

**@⁠MesshM** on GitHub · 2026-11-24 01:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7118941007) Test run of `3896e4fb97d4971971ab7b178a541170cb96318b` on AMD RDNA4 (the PR has RDNA1 and RDNA2 results). The branch is based on `2997c9a`, so I merged it onto current `main` `7ebf1b8` locally (clean merge, `title_textures.rs` and `vram.rs`) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`) on the merge: **677 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 637 passed, 0 failed, 21 ignored - **0 `SKIPPED`**: on this adapter the reserved 256x256x6 cube is made, so `placed_title_textures_share_vram_and_preserve_pixels` takes the reserved path, including the cubemap same-address reuse step, with `map_packed_mips` active; it passes (again alone with `--nocapture`: 1 passed, 14.2 s, no `SKIPPED` line) So on RDNA4, where `map` already reached the packed tiles before this change (the test ran and passed on `main` `a6f5f7a` on this machine, 0 `SKIPPED`), mapping them a second time changes nothing that the test can see. **Review of the change:** `map_packed_mips` maps the same tiles `map` chose, addressed as D3D12 addresses packed mips (subresource = first packed mip, X = tile within the packed block), one call per heap with the other heaps' tiles skipped, as `map` does. It returns early for arrays and cubes, for textures without standard or packed mips, and when the packed block does not fit `tiles`. The test change keeps the reuse step only when the first cube was reserved, which is the case the step is about. I found nothing to change. One thing not measured: every placement of a one-slice texture with packed mips now does a second `UpdateTileMappings` and a `Signal`; that could matter during world streaming, next to #490. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`; `main` `7ebf1b8` itself was not run in full on this machine. Run and report by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

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

Independent two-adapter validation of 3896e4fb97d4971971ab7b178a541170cb96318b (base 2997c9a).

Tested

  • Ryzen 7 7800X3D / AMD Radeon(TM) Graphics (32.0.21030.2001) plus RTX 3090 (591.74), Windows10 build19045, Rust1.98.1 MSVC debug, SDK DXC1.8.2502.11, public Agility1.620.2.
  • The fixture ignores XCL_ADAPTER and picks adapter0 (AMD here). Focused A/B tests temporarily selected and asserted the adapter name/vendor on both sides; those diagnostics were removed for the full run.
  • Focused command: cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --nocapture.
  • AMD integrated: PR test changes with base vram.rs fail at 3D64×64×64 mip2 (zero readback); full PR passes. RTX3090: original fixture skips for no reserved cubemap; PR test changes run and pass both with base mapping and PR mapping. Each completed focused run: 1 test, 0 ignored, 656 filtered out.
  • Exact head: cargo build --locked --workspace passes. Desktop session1, cargo test --locked --workspace --no-fail-fast -- --test-threads=1: 675 passed, 1 failed, 41 ignored. Remaining failure: pre-existing gpu_clamp_and_omod_per_instruction. Two native-wave64 SKIPPED tests, not GPU coverage: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • Four-thread full run did not complete: stopped after120s+ with UMA-init, two console-heap tests and copy_descriptors_remaps_xbox_extra_cbv_srv_uav_to_pc_enum waiting over60s. Root cause not established; related fixture-interference work exists in #343. Serial result is supplementary, not a claim of a clean four-thread run.

Not tested
Retail title/smoke, release, other GPUs. No XCL_SAMPLE_* data. Full-suite fixtures use mixed adapters; only the focused texture controls assert one GPU.

AI use
Codex (GPT-6) assisted with inspection, diagnostic overlays, test execution and this report. No changes proposed to the author's fix.

**@⁠WebIdentity1** on GitHub · 2026-11-24 01:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119072739) Independent two-adapter validation of `3896e4fb97d4971971ab7b178a541170cb96318b` (base `2997c9a`). **Tested** - Ryzen 7 7800X3D / AMD Radeon(TM) Graphics (32.0.21030.2001) plus RTX 3090 (591.74), Windows10 build19045, Rust1.98.1 MSVC debug, SDK DXC1.8.2502.11, public Agility1.620.2. - The fixture ignores `XCL_ADAPTER` and picks adapter0 (AMD here). Focused A/B tests temporarily selected and asserted the adapter name/vendor on both sides; those diagnostics were removed for the full run. - Focused command: `cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --nocapture`. - AMD integrated: PR test changes with base vram.rs fail at 3D64×64×64 mip2 (zero readback); full PR passes. RTX3090: original fixture skips for no reserved cubemap; PR test changes run and pass both with base mapping and PR mapping. Each completed focused run: 1 test, 0 ignored, 656 filtered out. - Exact head: `cargo build --locked --workspace` passes. Desktop session1, `cargo test --locked --workspace --no-fail-fast -- --test-threads=1`: 675 passed, 1 failed, 41 ignored. Remaining failure: pre-existing `gpu_clamp_and_omod_per_instruction`. Two native-wave64 SKIPPED tests, not GPU coverage: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - Four-thread full run did not complete: stopped after120s+ with UMA-init, two console-heap tests and copy_descriptors_remaps_xbox_extra_cbv_srv_uav_to_pc_enum waiting over60s. Root cause not established; related fixture-interference work exists in #343. Serial result is supplementary, not a claim of a clean four-thread run. **Not tested** Retail title/smoke, release, other GPUs. No XCL_SAMPLE_* data. Full-suite fixtures use mixed adapters; only the focused texture controls assert one GPU. **AI use** Codex (GPT-6) assisted with inspection, diagnostic overlays, test execution and this report. No changes proposed to the author's fix.
Author
Owner

@⁠PHeitor1 on GitHub · 2026-11-24 01:26 UTC · original

Tested 3896e4f merged onto main 508a0c7.

RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed), rustc 1.100.0 MSVC, debug, cargo test --workspace --no-fail-fast -- --test-threads=4, no XCL_SAMPLE_*.

Pass: 680 passed, 0 failed, 41 ignored. SKIPPED: only the 2 no wave64 tests.

placed_title_textures_share_vram_and_preserve_pixels alone with --nocapture:

  • On this adapter it takes the real path on main and with this PR, with no SKIPPED line and about 12 s each. The driver makes the reserved cube with mips here, so the new committed-cube branch is not reached, and the packed-mip mapping is a no-op as described.
  • So the 5070 Ti skip @⁠regiumlepidi saw in #42 (driver 617.42) does not show on this Blackwell card on 621.24. @⁠requiemsnkrp's RTX 3060 on 621.24 in #264 also had no skip, so it may depend on the driver.

Run and written with Claude Code (Claude Opus 5.5).

**@⁠PHeitor1** on GitHub · 2026-11-24 01:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119100639) Tested `3896e4f` merged onto `main` `508a0c7`. RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed), rustc 1.100.0 MSVC, debug, `cargo test --workspace --no-fail-fast -- --test-threads=4`, no `XCL_SAMPLE_*`. **Pass:** 680 passed, 0 failed, 41 ignored. SKIPPED: only the 2 `no wave64` tests. `placed_title_textures_share_vram_and_preserve_pixels` alone with `--nocapture`: - On this adapter it takes the real path on `main` and with this PR, with no SKIPPED line and about 12 s each. The driver makes the reserved cube with mips here, so the new committed-cube branch is not reached, and the packed-mip mapping is a no-op as described. - So the 5070 Ti skip @⁠regiumlepidi saw in #42 (driver 617.42) does not show on this Blackwell card on 621.24. @⁠requiemsnkrp's RTX 3060 on 621.24 in #264 also had no skip, so it may depend on the driver. _Run and written with Claude Code (Claude Opus 5.5)._
Author
Owner

@⁠Y0z64 on GitHub · 2026-11-24 01:26 UTC · original

Fixes the 3D packed-mip failure on RDNA2 too: RX 6700S (Navi 22, driver 32.0.21045.29003), Windows 11 26200, debug, cargo test --workspace --no-fail-fast -- --test-threads=4, no XCL_SAMPLE_*.

  • main a6f5f7a: 673 passed, 3 failed (placed_title_textures_share_vram_and_preserve_pixels + 2 follow-on), 41 ignored
  • this PR 3896e4f: 676 passed, 0 failed, 41 ignored, no SKIPPED

Not tested: smoke.ps1 / retail title. Claude Code (Claude Opus 5.5) ran the tests and wrote this.

**@⁠Y0z64** on GitHub · 2026-11-24 01:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119104978) Fixes the 3D packed-mip failure on RDNA2 too: **RX 6700S** (Navi 22, driver 32.0.21045.29003), Windows 11 26200, debug, `cargo test --workspace --no-fail-fast -- --test-threads=4`, no `XCL_SAMPLE_*`. - `main` `a6f5f7a`: 673 passed, 3 failed (`placed_title_textures_share_vram_and_preserve_pixels` + 2 follow-on), 41 ignored - this PR `3896e4f`: 676 passed, 0 failed, 41 ignored, no SKIPPED Not tested: smoke.ps1 / retail title. Claude Code (Claude Opus 5.5) ran the tests and wrote this.
Author
Owner

@⁠CryingLaughing on GitHub · 2026-11-24 01:27 UTC · original

Exact PR head 3896e4fb97d4971971ab7b178a541170cb96318b passed the four-thread workspace suite on an RTX 4080. The focused control with the old mapping also passed on this adapter, including the reserved 3D texture's packed mips.

Tested

  • RTX 4080 (Ada), NVIDIA driver 621.01, Core i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC x64, DXC 1.8.2502.11, debug. XCL_ADAPTER=4080, all XCL_SAMPLE_* variables unset. A DXGI probe identified adapter zero, used directly by the texture fixture, as the RTX 4080.
  • cargo test -p xcl --lib --locked -j 4 placed_title_textures_share_vram_and_preserve_pixels -- --show-output passed 1/1 on the clean PR head and 1/1 with only vram.rs restored to 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21 plus fixture diagnostics. Neither focused run skipped. The control reported tiled resources tier 4 and resource heap tier 2. Its reserved 64×64×64 RGBA8 fixture reported 19 total tiles, two standard mips and two packed mips in one tile starting at tile 18. All mip readbacks matched in both runs.
  • cargo build --workspace --locked -j 4 passed on the exact head. cargo test --workspace --locked -j 4 -- --test-threads=4 --show-output reported 676 passed, 0 failed, 41 ignored. The pass count includes opt-in game-data tests that returned early and four explicit skips.
  • SKIPPED for native wave64: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. SKIPPED for D3D12 debug-layer availability: test_title_draws_with_a_root_signature_under_the_debug_layer and uploads_start_from_each_subresources_state.

Not tested

  • Retail smoke, release builds, or other adapters on this machine.

AI use

  • OpenAI Codex (GPT-6 family, exact variant unavailable) ran the commands, added the local diagnostics, and drafted this report.
**@⁠CryingLaughing** on GitHub · 2026-11-24 01:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119125760) Exact PR head `3896e4fb97d4971971ab7b178a541170cb96318b` passed the four-thread workspace suite on an RTX 4080. The focused control with the old mapping also passed on this adapter, including the reserved 3D texture's packed mips. **Tested** - RTX 4080 (Ada), NVIDIA driver 621.01, Core i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC x64, DXC 1.8.2502.11, debug. `XCL_ADAPTER=4080`, all `XCL_SAMPLE_*` variables unset. A DXGI probe identified adapter zero, used directly by the texture fixture, as the RTX 4080. - `cargo test -p xcl --lib --locked -j 4 placed_title_textures_share_vram_and_preserve_pixels -- --show-output` passed 1/1 on the clean PR head and 1/1 with only `vram.rs` restored to `2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21` plus fixture diagnostics. Neither focused run skipped. The control reported tiled resources tier 4 and resource heap tier 2. Its reserved 64×64×64 RGBA8 fixture reported 19 total tiles, two standard mips and two packed mips in one tile starting at tile 18. All mip readbacks matched in both runs. - `cargo build --workspace --locked -j 4` passed on the exact head. `cargo test --workspace --locked -j 4 -- --test-threads=4 --show-output` reported 676 passed, 0 failed, 41 ignored. The pass count includes opt-in game-data tests that returned early and four explicit skips. - `SKIPPED` for native wave64: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. `SKIPPED` for D3D12 debug-layer availability: `test_title_draws_with_a_root_signature_under_the_debug_layer` and `uploads_start_from_each_subresources_state`. **Not tested** - Retail smoke, release builds, or other adapters on this machine. **AI use** - OpenAI Codex (GPT-6 family, exact variant unavailable) ran the commands, added the local diagnostics, and drafted this report.
Author
Owner

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

Tested on Blackwell: the test this PR un-skips passes here.

On main@2997c9a it SKIPs on my adapter for the same reason regiumlepidi saw — the driver refuses the 256x256x6 reserved cube:

SKIPPED placed_title_textures_share_vram_and_preserve_pixels: this adapter makes no reserved cube with mips
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 656 filtered out; finished in 0.25s

With this PR @3896e4f the skip is gone and the test runs to the end:

2D 256x256x6 cubemap 9 mips: not reserved on this adapter (committed instead)
test hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 656 filtered out; finished in 1.59s

Hardware: RTX 5070 Ti (Blackwell, 32-lane), driver 32.0.16.1742, Windows 11, 32 GB. cargo test --release -p xcl --lib placed_title_textures -- --nocapture, DXC 1.9.2609.

Two observations from that run:

  • The cube does not become reserved on this adapter either — XCL falls back to a committed resource and the test still passes. So removing the skip does let the test run on adapters that refuse the cube, but the cube part then exercises the committed path, not the shared-page path the test is named for. Worth putting that line in the test output so the coverage is not over-read.
  • The 3D 64x64x64 case does run and mip 2-3 now read back correctly — that is what this PR changes, and it reproduces here.

Not tested: one GPU, one driver. I cannot reproduce the RDNA1 case your description is based on. No smoke run — this change is in a test and vram.rs's page mapping is only reached through map_packed_mips, so a title run would not exercise it differently.

**@⁠yyc160** on GitHub · 2026-11-24 01:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119220291) **Tested on Blackwell: the test this PR un-skips passes here.** On `main@2997c9a` it SKIPs on my adapter for the same reason `regiumlepidi` saw — the driver refuses the 256x256x6 reserved cube: ``` SKIPPED placed_title_textures_share_vram_and_preserve_pixels: this adapter makes no reserved cube with mips test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 656 filtered out; finished in 0.25s ``` With this PR @`3896e4f` the skip is gone and the test runs to the end: ``` 2D 256x256x6 cubemap 9 mips: not reserved on this adapter (committed instead) test hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 656 filtered out; finished in 1.59s ``` **Hardware:** RTX 5070 Ti (Blackwell, 32-lane), driver 32.0.16.1742, Windows 11, 32 GB. `cargo test --release -p xcl --lib placed_title_textures -- --nocapture`, DXC 1.9.2609. Two observations from that run: - The cube does not become reserved on this adapter either — XCL falls back to a committed resource and the test still passes. So removing the skip does let the test run on adapters that refuse the cube, but the cube part then exercises the committed path, not the shared-page path the test is named for. Worth putting that line in the test output so the coverage is not over-read. - The 3D 64x64x64 case does run and mip 2-3 now read back correctly — that is what this PR changes, and it reproduces here. **Not tested:** one GPU, one driver. I cannot reproduce the RDNA1 case your description is based on. No smoke run — this change is in a test and `vram.rs`'s page mapping is only reached through `map_packed_mips`, so a title run would not exercise it differently.
Author
Owner

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

One more thing after reading Pages::map and the scope check.

The premise deserves a second look. map calls UpdateTileMappings with coord = D3D12_TILED_RESOURCE_COORDINATE::default() (subresource 0, x/y/z 0), region.NumTiles = tiles.len() and UseBox = false. With 19 overall tiles and a linear region, that call is supposed to cover tile 18 — the packed block — the same way it covers 0..17; the linear region runs through the overall tile range. So "mip 2 reads zero after one pass" could also mean the first call does not reach what we think it reaches (heap ranges from heap_ranges, NumTiles, the coordinate base) rather than the driver refusing to map a packed tile. A second, differently-shaped call fixing it is a valid workaround either way — but the comment states it as a driver bug, and if it is actually our first call, the workaround hides it. Worth confirming on the RDNA1 box by dumping GetResourceTiling for the resource and the ranges the first call actually sent.

2D arrays are skipped by the early return. if desc.Dimension != TEXTURE3D && desc.DepthOrArraySize != 1 { return; } lets all 3D through and only single-slice 2D, so a 2D array or a cube with packed mips never gets the second mapping. The comment says an array keeps a packed block per slice — if that is right, each slice needs its own mapping at (first packed mip of that slice, X), which is the same shape as the 3D case, just repeated. Out of scope on purpose, or does the array case not show up on the drivers where the single-slice one does?

**@⁠yyc160** on GitHub · 2026-11-24 01:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119329130) One more thing after reading `Pages::map` and the scope check. **The premise deserves a second look.** `map` calls `UpdateTileMappings` with `coord = D3D12_TILED_RESOURCE_COORDINATE::default()` (subresource 0, x/y/z 0), `region.NumTiles = tiles.len()` and `UseBox = false`. With 19 overall tiles and a linear region, that call is supposed to cover tile 18 — the packed block — the same way it covers 0..17; the linear region runs through the overall tile range. So "mip 2 reads zero after one pass" could also mean the first call does not reach what we think it reaches (heap ranges from `heap_ranges`, `NumTiles`, the coordinate base) rather than the driver refusing to map a packed tile. A second, differently-shaped call fixing it is a valid workaround either way — but the comment states it as a driver bug, and if it is actually our first call, the workaround hides it. Worth confirming on the RDNA1 box by dumping `GetResourceTiling` for the resource and the ranges the first call actually sent. **2D arrays are skipped by the early return.** `if desc.Dimension != TEXTURE3D && desc.DepthOrArraySize != 1 { return; }` lets all 3D through and only single-slice 2D, so a 2D array or a cube with packed mips never gets the second mapping. The comment says an array keeps a packed block per slice — if that is right, each slice needs its own mapping at (first packed mip of that slice, X), which is the same shape as the 3D case, just repeated. Out of scope on purpose, or does the array case not show up on the drivers where the single-slice one does?
Author
Owner

@⁠alpz1000 on GitHub · 2026-11-24 01:49 UTC · original

Independent NVIDIA check on RTX 3060 12 GB, driver 610.88 (32.0.16.1088), Core i5-8400, Windows 11 Home 26200.9974, Rust 1.100.0 x86_64-pc-windows-msvc, debug.

Tested: cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --test-threads=1 --nocapture.

  • Unmodified PR head 3896e4fb97d4971971ab7b178a541170cb96318b: 1 passed, 0 failed, 0 ignored, no skip messages.
  • Same head with only vram.rs restored from 2997c9a, retaining the PR's test changes: 1 passed, 0 failed, 0 ignored, no skip messages.

I did not reproduce the AMD packed-mip readback failure on this NVIDIA adapter. The targeted test also stayed green with the extra mapping enabled.

Not tested: full workspace, retail titles, or other adapters.

AI use: OpenAI Codex (GPT-6) ran both local tests and summarized their output.

**@⁠alpz1000** on GitHub · 2026-11-24 01:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119480169) Independent NVIDIA check on RTX 3060 12 GB, driver 610.88 (32.0.16.1088), Core i5-8400, Windows 11 Home 26200.9974, Rust 1.100.0 x86_64-pc-windows-msvc, debug. **Tested**: `cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --test-threads=1 --nocapture`. - Unmodified PR head `3896e4fb97d4971971ab7b178a541170cb96318b`: 1 passed, 0 failed, 0 ignored, no skip messages. - Same head with only `vram.rs` restored from `2997c9a`, retaining the PR's test changes: 1 passed, 0 failed, 0 ignored, no skip messages. I did not reproduce the AMD packed-mip readback failure on this NVIDIA adapter. The targeted test also stayed green with the extra mapping enabled. **Not tested**: full workspace, retail titles, or other adapters. **AI use**: OpenAI Codex (GPT-6) ran both local tests and summarized their output.
Author
Owner

@⁠DarX-Oren on GitHub · 2026-11-24 01:51 UTC · original

Additional RDNA2 validation — RX 6700 XT

Confirmed that the isolated VRAM mapping change from this PR resolves the packed-mip texture failure on my RX 6700 XT.

Environment:

  • GPU: AMD RX 6700 XT (12 GB, Navi 22)
  • Driver: 32.0.21045.29003
  • CPU: Ryzen 5 5600
  • RAM: 32 GB
  • Windows 25H2, build 26200
  • Rust 1.100.0 MSVC
  • Windows SDK 10.0.26100.0
Revision Passed Failed Ignored
Main 508a0c7 677 3 41
Main + isolated VRAM change 680 0 41

The original test failed at subresource 2 of the 64x64x64 3D texture, returning zeros.

The other two failures passed independently and were associated with poisoned locks.

Applying only the vram.rs change resolved the failure without modifying the original test assertions.

Limitations: Two tests counted as passed skipped their checks because the D3D12 debug layer was unavailable. No commercial game data was used.

AI use: OpenAI Codex (GPT-6) assisted with compilation, investigation and local testing.

**@⁠DarX-Oren** on GitHub · 2026-11-24 01:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119513641) ## Additional RDNA2 validation — RX 6700 XT Confirmed that the isolated VRAM mapping change from this PR resolves the packed-mip texture failure on my RX 6700 XT. **Environment:** - GPU: AMD RX 6700 XT (12 GB, Navi 22) - Driver: 32.0.21045.29003 - CPU: Ryzen 5 5600 - RAM: 32 GB - Windows 25H2, build 26200 - Rust 1.100.0 MSVC - Windows SDK 10.0.26100.0 | Revision | Passed | Failed | Ignored | |---|---:|---:|---:| | Main `508a0c7` | 677 | 3 | 41 | | Main + isolated VRAM change | 680 | 0 | 41 | The original test failed at subresource 2 of the 64x64x64 3D texture, returning zeros. The other two failures passed independently and were associated with poisoned locks. Applying only the `vram.rs` change resolved the failure without modifying the original test assertions. **Limitations:** Two tests counted as passed skipped their checks because the D3D12 debug layer was unavailable. No commercial game data was used. **AI use:** OpenAI Codex (GPT-6) assisted with compilation, investigation and local testing.
Author
Owner

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

@⁠yyc160 Thanks, both are fair. I measured on the RX 5700 XT (RDNA1, 32.0.21045.29003), on 3896e4f with temporary logging in Pages::map and an env switch to leave out map_packed_mips in the same build. The temporary code is not in the PR.

1. What the first call sends. For the 64x64x64 RGBA8 4-mip texture: NumTiles = 19, one pool heap, coord subresource 0 at (0,0,0), UseBox = false, and the ranges from heap_ranges:

ranges = [(true, 268, 1), (true, 284, 1), (true, 270, 2), (true, 4, 1), (true, 257, 3), (true, 272, 8), (true, 16, 3)]

That is 1+1+2+1+3+8+3 = 19 tiles, all mapped, no SKIP runs. Overall tile 18 (StartTileIndexInOverallResource of the packed block, NumStandardMips 2, 1 packed tile) is the last tile of the final (16, 3) run, so heap tile 18. So the first call does name the packed tile; the ranges are not short.

  • Without map_packed_mips (same build, switch on): 3D 64x64x64 4 mips: subresource 2 mismatch, zeros.
  • With it: passes. The second call maps the same tile 18 to the same heap tile 18, only addressed as (subresource = first packed mip, X = 0).

So with identical heap tiles, this driver applies the linear region to tiles 0-17 but not to the packed block. NVIDIA (several cards above) and RDNA4 (MesshM's run) apply it, so it does depend on the driver. I could not find wording in the D3D12 docs that settles whether a linear UseBox = false region continues into the packed block, so "driver behaviour" is my reading of the measurement, not a spec claim. I can rephrase the comment in vram.rs to say what was measured and not call it a driver bug, if you prefer.

2. 2D arrays. Out of scope on purpose, because I can't test them here. With a temporary 2D 256x256x4 array with 9 mips added to the test's shapes, this driver does not make it reserved either (not reserved on this adapter (committed instead), like the cube), so the per-slice packed case never reaches map_packed_mips on RDNA1. If an adapter that makes reserved arrays shows the same zeros, the same call per slice should fix it, as you describe. I'd rather do that in a follow-up with a test on hardware that reaches it than ship it untested.

**@⁠Abdellah-Khanani** on GitHub · 2026-11-24 01:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119643769) @⁠yyc160 Thanks, both are fair. I measured on the RX 5700 XT (RDNA1, 32.0.21045.29003), on `3896e4f` with temporary logging in `Pages::map` and an env switch to leave out `map_packed_mips` in the same build. The temporary code is not in the PR. **1. What the first call sends.** For the 64x64x64 RGBA8 4-mip texture: `NumTiles = 19`, one pool heap, `coord` subresource 0 at (0,0,0), `UseBox = false`, and the ranges from `heap_ranges`: ``` ranges = [(true, 268, 1), (true, 284, 1), (true, 270, 2), (true, 4, 1), (true, 257, 3), (true, 272, 8), (true, 16, 3)] ``` That is 1+1+2+1+3+8+3 = 19 tiles, all mapped, no SKIP runs. Overall tile 18 (`StartTileIndexInOverallResource` of the packed block, `NumStandardMips` 2, 1 packed tile) is the last tile of the final `(16, 3)` run, so heap tile 18. So the first call does name the packed tile; the ranges are not short. - Without `map_packed_mips` (same build, switch on): `3D 64x64x64 4 mips: subresource 2 mismatch`, zeros. - With it: passes. The second call maps the same tile 18 to the same heap tile 18, only addressed as (subresource = first packed mip, X = 0). So with identical heap tiles, this driver applies the linear region to tiles 0-17 but not to the packed block. NVIDIA (several cards above) and RDNA4 (MesshM's run) apply it, so it does depend on the driver. I could not find wording in the D3D12 docs that settles whether a linear `UseBox = false` region continues into the packed block, so "driver behaviour" is my reading of the measurement, not a spec claim. I can rephrase the comment in `vram.rs` to say what was measured and not call it a driver bug, if you prefer. **2. 2D arrays.** Out of scope on purpose, because I can't test them here. With a temporary 2D `256x256x4` array with 9 mips added to the test's shapes, this driver does not make it reserved either (`not reserved on this adapter (committed instead)`, like the cube), so the per-slice packed case never reaches `map_packed_mips` on RDNA1. If an adapter that makes reserved arrays shows the same zeros, the same call per slice should fix it, as you describe. I'd rather do that in a follow-up with a test on hardware that reaches it than ship it untested.
Author
Owner

@⁠srcamarda on GitHub · 2026-11-24 02:09 UTC · original

Regression run on a retail title, as asked under Regression run.

Tested

  • AMD Radeon RX 7800 XT (RDNA3), driver 32.0.32029.2010; Ryzen 5 5600G, 32 GB; Windows 11 Pro 26300; release builds
  • scripts/smoke.ps1 -Seconds 90, no input (the title stays on its account screen at 30 fps). Each binary was built from a clean checkout of its commit and run twice; the first run of each has a cold translation cache. Blocks below are from the second run.
  • main 508a0c7: 2343 / 2361 frames, peak 15764 / 15674 MB. This PR (3896e4f): 2329 / 2365 frames, peak 15785 / 15683 MB. No crash or device removal in any run.
  • No difference from main beyond run-to-run spread.

Regression run

main:

xcl-smoke v1
commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f
gpu: AMD Radeon RX 7800 XT
title: RetailGame_Dump
seconds: 90
exit: 0x0
frames shown: 2361 (PresentX 2361)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15674 MB

this PR's head:

xcl-smoke v1
commit: 3896e4fb97d4971971ab7b178a541170cb96318b
gpu: AMD Radeon RX 7800 XT
title: RetailGame_Dump
seconds: 90
exit: 0x0
frames shown: 2365 (PresentX 2365)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15683 MB

Not tested

  • Whether a one-slice texture with packed mips is placed in these 90 s (the account screen) I did not check; the title keeps many textures in step, so the title-texture path runs.
  • The whole test suite at this head (only the title runs).

AI use

  • Claude Code with Claude Opus 5.5 built both commits, ran the smoke runs and wrote this report; the runs are from my machine.
**@⁠srcamarda** on GitHub · 2026-11-24 02:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119807793) Regression run on a retail title, as asked under **Regression run**. **Tested** - AMD Radeon RX 7800 XT (RDNA3), driver 32.0.32029.2010; Ryzen 5 5600G, 32 GB; Windows 11 Pro 26300; release builds - `scripts/smoke.ps1 -Seconds 90`, no input (the title stays on its account screen at 30 fps). Each binary was built from a clean checkout of its commit and run twice; the first run of each has a cold translation cache. Blocks below are from the second run. - `main` `508a0c7`: 2343 / 2361 frames, peak 15764 / 15674 MB. This PR (`3896e4f`): 2329 / 2365 frames, peak 15785 / 15683 MB. No crash or device removal in any run. - No difference from `main` beyond run-to-run spread. **Regression run** `main`: ``` xcl-smoke v1 commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f gpu: AMD Radeon RX 7800 XT title: RetailGame_Dump seconds: 90 exit: 0x0 frames shown: 2361 (PresentX 2361) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15674 MB ``` this PR's head: ``` xcl-smoke v1 commit: 3896e4fb97d4971971ab7b178a541170cb96318b gpu: AMD Radeon RX 7800 XT title: RetailGame_Dump seconds: 90 exit: 0x0 frames shown: 2365 (PresentX 2365) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15683 MB ``` **Not tested** - Whether a one-slice texture with packed mips is placed in these 90 s (the account screen) I did not check; the title keeps many textures in step, so the title-texture path runs. - The whole test suite at this head (only the title runs). **AI use** - Claude Code with Claude Opus 5.5 built both commits, ran the smoke runs and wrote this report; the runs are from my machine.
Author
Owner

@⁠H0UNDZER0 on GitHub · 2026-11-24 01:32 UTC · original · edited 2026-11-24 02:20 UTC

Tested on an RTX 5080: pass, the same counts as main. The title-textures test runs whole and passes, and the new mapping is used on this GPU.

Several NVIDIA results are above already. This one adds an RTX 5080 on a release build, with a probe of the 3D texture's tile layout on this driver.

  • Commit 3896e4fb97d4971971ab7b178a541170cb96318b, this PR's head as is (on its base 2997c9a), release build.
  • NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves, tiled resources tier 4; Ryzen 7 9700X; Windows 11 Pro 24H2 (26100.9711); Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0). No XCL_* variables set.
  • cargo build --release --workspace --locked: OK, the same single fetch_update warning as main.
  • cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with --show-output): 676 passed, 0 failed, 41 ignored both times, the same as main 2997c9a on this PC.
  • SKIPPED: the usual 2, gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64).
  • placed_title_textures_share_vram_and_preserve_pixels passes in both runs and in 3 of 3 runs alone (--exact). Its output is the same as on main (512 unreleased 1 MiB textures over 16 MiB: +16777216 B pages (after fill: +0 B), …). There is no not reserved on this adapter line: this driver makes the reserved cube, so the cube's reuse step still runs.
  • The new code runs here. A separate probe of the same 3D texture on this driver (64x64x64 RGBA8, 4 mips, reserved, 64 KiB tiles): GetResourceTiling gives 19 tiles of 32x32x16, 2 standard and 2 packed mips, and a packed tail of 1 tile at index 18. That is the same split as the RX 5700 XT in the description. So map_packed_mips maps that tile a second time on this GPU, and all 4 subresources of the volume still read back right.

Not tested

  • This PR merged onto a newer main. At the time of the run that was 7ebf1b8, which changes title_textures.rs; git merge-tree showed no conflict with it.
  • A GPU that refuses the reserved cube. The Radeon iGPU of this PC: the test always takes adapter 0, the RTX 5080.
  • Debug build, retail titles, scripts/smoke.ps1.

AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)

**@⁠H0UNDZER0** on GitHub · 2026-11-24 01:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7119196061) · edited 2026-11-24 02:20 UTC **Tested** on an RTX 5080: **pass**, the same counts as `main`. The title-textures test runs whole and passes, and the new mapping is used on this GPU. Several NVIDIA results are above already. This one adds an RTX 5080 on a release build, with a probe of the 3D texture's tile layout on this driver. - Commit `3896e4fb97d4971971ab7b178a541170cb96318b`, this PR's head as is (on its base `2997c9a`), release build. - NVIDIA GeForce RTX 5080 16 GB, driver 621.24 (32.0.16.2124), 32-lane waves, tiled resources tier 4; Ryzen 7 9700X; Windows 11 Pro 24H2 (26100.9711); Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0). No `XCL_*` variables set. - `cargo build --release --workspace --locked`: OK, the same single `fetch_update` warning as `main`. - `cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4`, run twice (the second with `--show-output`): **676 passed, 0 failed, 41 ignored** both times, the same as `main` `2997c9a` on this PC. - `SKIPPED`: the usual 2, `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64). - `placed_title_textures_share_vram_and_preserve_pixels` passes in both runs and in 3 of 3 runs alone (`--exact`). Its output is the same as on `main` (`512 unreleased 1 MiB textures over 16 MiB: +16777216 B pages (after fill: +0 B), …`). There is no `not reserved on this adapter` line: this driver makes the reserved cube, so the cube's reuse step still runs. - The new code runs here. A separate probe of the same 3D texture on this driver (64x64x64 RGBA8, 4 mips, reserved, 64 KiB tiles): `GetResourceTiling` gives 19 tiles of 32x32x16, 2 standard and 2 packed mips, and a packed tail of 1 tile at index 18. That is the same split as the RX 5700 XT in the description. So `map_packed_mips` maps that tile a second time on this GPU, and all 4 subresources of the volume still read back right. **Not tested** - This PR merged onto a newer `main`. At the time of the run that was `7ebf1b8`, which changes `title_textures.rs`; `git merge-tree` showed no conflict with it. - A GPU that refuses the reserved cube. The Radeon iGPU of this PC: the test always takes adapter 0, the RTX 5080. - Debug build, retail titles, `scripts/smoke.ps1`. **AI use:** Claude Code (Claude Opus 5.5, Claude Fable 5.2)
Author
Owner

@⁠EllissonSB on GitHub · 2026-11-24 03:21 UTC · original

Tested 3896e4f (PR head, behind main) on AMD RX 6650 XT (RDNA2, driver 32.0.21045.29003), Tiled Resources Tier 4, debug build.

  • placed_title_textures_share_vram_and_preserve_pixels: fails on main (3D 64x64x64 4 mips: subresource 2 mismatch, the packed mips read back all zero; a plain reserved 3D resource with one heap mapped straight and the same upload reproduces it, so it is the driver's handling of the packed block, not the page sharing). Passes on this commit.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 676 passed, 0 failed, 41 ignored.

Not run: scripts/smoke.ps1 on a title, other GPUs, the merge with current main, arrays with packed mips.

Report written with Claude Code (Claude Sonnet 5.5) from a real run on the hardware above.

**@⁠EllissonSB** on GitHub · 2026-11-24 03:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7121013598) Tested `3896e4f` (PR head, behind main) on AMD RX 6650 XT (RDNA2, driver 32.0.21045.29003), Tiled Resources Tier 4, debug build. - `placed_title_textures_share_vram_and_preserve_pixels`: fails on main (`3D 64x64x64 4 mips: subresource 2 mismatch`, the packed mips read back all zero; a plain reserved 3D resource with one heap mapped straight and the same upload reproduces it, so it is the driver's handling of the packed block, not the page sharing). Passes on this commit. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 676 passed, 0 failed, 41 ignored. Not run: `scripts/smoke.ps1` on a title, other GPUs, the merge with current main, arrays with packed mips. Report written with Claude Code (Claude Sonnet 5.5) from a real run on the hardware above.
Author
Owner

@⁠iggyvilla on GitHub · 2026-11-24 04:02 UTC · original

Test run of 3896e4fb97d4971971ab7b178a541170cb96318b on a third RDNA2 card (Navi 23), as is and merged onto current main dd2ae9a.

Tested

  • AMD Radeon RX 6650 XT (RDNA2, gfx1032), driver 32.0.21045.29003; Ryzen 7 5700X; Windows 11 Home build 26300; Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug; no XCL_SAMPLE_* set
  • cargo build --workspace then cargo test --workspace --no-fail-fast -- --test-threads=4:
    • PR head 3896e4f (clean tree): 676 passed, 0 failed, 41 ignored, exit 0
    • 3896e4f merged onto main dd2ae9a (clean merge, title_textures.rs auto-merged): 690 passed, 0 failed, 41 ignored, exit 0
  • No SKIPPED lines in either run
  • placed_title_textures_share_vram_and_preserve_pixels passes in both runs. On main dd2ae9a (full run on this machine: 687 passed, 3 failed, 41 ignored) this card fails it with 3D 64x64x64 4 mips: subresource 2 mismatch (zero readback). Two more tests then fail because the panic poisons TEST_LOCK / VRAM_TEST_LOCK (transitions_apply_when_their_list_is_submitted, d32s8_targets_take_their_own_size_of_video_memory; each passes on its own; #673 makes those locks survive it). With the PR, all three pass.

Not tested

  • No retail title / smoke.ps1, no release build.
  • I did not log whether this driver makes the reserved 256x256x6 cube, so I don't know which cube branch the test takes on this card.
  • Array and cube textures with packed mips (out of the PR's scope).

Run and written with Claude Code (Claude Opus 5.5).

**@⁠iggyvilla** on GitHub · 2026-11-24 04:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7121644155) Test run of `3896e4fb97d4971971ab7b178a541170cb96318b` on a third RDNA2 card (Navi 23), as is and merged onto current `main` `dd2ae9a`. **Tested** - AMD Radeon RX 6650 XT (RDNA2, gfx1032), driver 32.0.21045.29003; Ryzen 7 5700X; Windows 11 Home build 26300; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug; no `XCL_SAMPLE_*` set - `cargo build --workspace` then `cargo test --workspace --no-fail-fast -- --test-threads=4`: - PR head `3896e4f` (clean tree): **676 passed, 0 failed, 41 ignored**, exit 0 - `3896e4f` merged onto `main` `dd2ae9a` (clean merge, `title_textures.rs` auto-merged): **690 passed, 0 failed, 41 ignored**, exit 0 - No `SKIPPED` lines in either run - `placed_title_textures_share_vram_and_preserve_pixels` passes in both runs. On `main` `dd2ae9a` (full run on this machine: 687 passed, 3 failed, 41 ignored) this card fails it with `3D 64x64x64 4 mips: subresource 2 mismatch` (zero readback). Two more tests then fail because the panic poisons `TEST_LOCK` / `VRAM_TEST_LOCK` (`transitions_apply_when_their_list_is_submitted`, `d32s8_targets_take_their_own_size_of_video_memory`; each passes on its own; #673 makes those locks survive it). With the PR, all three pass. **Not tested** - No retail title / `smoke.ps1`, no release build. - I did not log whether this driver makes the reserved 256x256x6 cube, so I don't know which cube branch the test takes on this card. - Array and cube textures with packed mips (out of the PR's scope). Run and written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠zorde23 on GitHub · 2026-11-24 04:20 UTC · original

Tested on RDNA2 (AMD Radeon RX 6750 XT): the 3D packed-mip failure reproduces here and this PR fixes it, as on the RX 5700 XT.

Hardware / build

  • AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003; Ryzen 7 5700X; Windows 11 Pro 10.0.26200; Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug; DXC 1.8.2502 from Windows SDK 10.0.26100.
  • The driver makes the reserved 256x256x6 cube here (the test's no-reserved-cube path does not trigger).

Tested

  • This PR's head 3896e4f, cargo test --workspace --no-fail-fast -- --test-threads=4: 676 passed, 0 failed, 41 ignored. cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels alone: passes 3 of 3.
  • 3896e4f with 736d10e reverted (test change kept, vram.rs change removed), the same test alone: fails 3 of 3 with 3D 64x64x64 4 mips: subresource 2 mismatch (mip 2 reads all zero).
  • main 91f9a5e (without this PR), cargo test --workspace --no-fail-fast -- --test-threads=4: 690 passed, 3 failed, 41 ignored. The test fails with the same 3D 64x64x64 4 mips: subresource 2 mismatch; the other two are PoisonError failures that pass alone.
  • This PR merged locally onto main f4ce27c (no conflicts): the test passes alone 3 of 3, and cargo test -p xcl --lib -- --test-threads=1 gives 660 passed, 0 failed, 21 ignored. cargo test --workspace --no-fail-fast -- --test-threads=4 gives 698 passed, 3 failed, 41 ignored: the test panics at cubemap extra_pages must be reused at same va (left 2359296, right 17170432), which comes before the 3D case, so that run does not reach the packed mips. The other two failures are the PoisonError cascade #673 addresses.
  • Plain main f4ce27c, same command: 698 passed, 3 failed, 41 ignored, with the same cubemap assertion (left 2359296, right 2555904) and the same two PoisonError failures.
  • Since the test passes alone and with --test-threads=1, I read the cubemap failure as interference from tests running in parallel, probably the page reclaim #447 describes, not something this PR leaves out. I did not confirm that.
  • No SKIPPED lines in any run; neither the test's tiled tier < 2 skip nor its no-reserved-cube path triggered.

Not tested

  • A retail title with this PR (no smoke run from me); RDNA3/RDNA4; NVIDIA.
  • Which parallel test interferes with the cubemap check.

AI use

  • Claude Code ran the builds and tests on the machine above; Claude Opus 5.5 wrote this report from the logs.
**@⁠zorde23** on GitHub · 2026-11-24 04:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7121934915) Tested on RDNA2 (AMD Radeon RX 6750 XT): the 3D packed-mip failure reproduces here and this PR fixes it, as on the RX 5700 XT. **Hardware / build** - AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003; Ryzen 7 5700X; Windows 11 Pro 10.0.26200; Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), debug; DXC 1.8.2502 from Windows SDK 10.0.26100. - The driver makes the reserved 256x256x6 cube here (the test's no-reserved-cube path does not trigger). **Tested** - This PR's head `3896e4f`, `cargo test --workspace --no-fail-fast -- --test-threads=4`: 676 passed, 0 failed, 41 ignored. `cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels` alone: passes 3 of 3. - `3896e4f` with `736d10e` reverted (test change kept, `vram.rs` change removed), the same test alone: fails 3 of 3 with `3D 64x64x64 4 mips: subresource 2 mismatch` (mip 2 reads all zero). - `main` `91f9a5e` (without this PR), `cargo test --workspace --no-fail-fast -- --test-threads=4`: 690 passed, 3 failed, 41 ignored. The test fails with the same `3D 64x64x64 4 mips: subresource 2 mismatch`; the other two are `PoisonError` failures that pass alone. - This PR merged locally onto `main` `f4ce27c` (no conflicts): the test passes alone 3 of 3, and `cargo test -p xcl --lib -- --test-threads=1` gives 660 passed, 0 failed, 21 ignored. `cargo test --workspace --no-fail-fast -- --test-threads=4` gives 698 passed, 3 failed, 41 ignored: the test panics at `cubemap extra_pages must be reused at same va` (left 2359296, right 17170432), which comes before the 3D case, so that run does not reach the packed mips. The other two failures are the `PoisonError` cascade #673 addresses. - Plain `main` `f4ce27c`, same command: 698 passed, 3 failed, 41 ignored, with the same cubemap assertion (left 2359296, right 2555904) and the same two `PoisonError` failures. - Since the test passes alone and with `--test-threads=1`, I read the cubemap failure as interference from tests running in parallel, probably the page reclaim #447 describes, not something this PR leaves out. I did not confirm that. - No `SKIPPED` lines in any run; neither the test's `tiled tier < 2` skip nor its no-reserved-cube path triggered. **Not tested** - A retail title with this PR (no smoke run from me); RDNA3/RDNA4; NVIDIA. - Which parallel test interferes with the cubemap check. **AI use** - Claude Code ran the builds and tests on the machine above; Claude Opus 5.5 wrote this report from the logs.
Author
Owner

@⁠bobosneefdev on GitHub · 2026-11-24 07:42 UTC · original

Tested main a1672ef and this PR's head 3896e4f on AMD Radeon RX 6800 (RDNA2), driver 32.0.21045.29003; Ryzen 5 5600X3D; Windows 11 Pro 26200; Rust 1.98.1 MSVC; debug.

I confirm the root cause is the driver, not the page sharing. Separately from this PR, I reproduced it with no XCL code: a plain reserved 3D texture on one heap, mapped, uploaded with CopyTextureRegion and read back. Per mip, RGBA8 (✓ = read back intact):

texture one linear region of total tiles (what Pages::map sends) standard tiles as one region + packed region one region per standard mip + packed region
64³, 4 mips ✓✓✗✗ ✓✓✓✓ ✓✓✓✓
64³, 7 mips ✓✓✗✗✗✗✗ all ✓ all ✓
128³, 5 mips ✓✓✗✗✗ ✓✓✗✓✓ all ✓
32³, 3 mips all ✓ all ✓ all ✓
256×256×16, 6 mips all ✓ all ✓ all ✓

Two things this PR does not cover yet:

  1. Standard mips past the second. In the 128³ row, mip 2 is a standard mip, not a packed one, and it still reads zero. Checked on this PR's head: adding ("3D 128x128x128 5 mips", console_desc(4, 128, 128, 128, 5, 28, 0x105)) to the test's shapes fails with 3D 128x128x128 5 mips: subresource 2 mismatch. Re-mapping only the packed block doesn't reach it; each standard subresource needs its own region.
  2. Pages::unmap has the same problem. I mapped each subresource separately, then sent unmap's call (one linear NULL region of total tiles): on the 64³ and 128³ textures, mips 2 and up still read back data instead of zero, so those tiles stay mapped. unmap_superseded then cools them (release_tiles(.., true)), and after COOL they can be given to another texture while the superseded one still maps them. I have not seen this cause a visible problem in a game; it is what the readback shows.

Locally, I made Pages::map and Pages::unmap both build their regions from GetResourceTiling: one region per standard subresource, plus one per slice's packed block. They fall back to the single region when the tiling doesn't add up to total (60 added / 10 removed lines in vram.rs). With that change on main, the test passes with the 128³ shape added. Happy to share the diff here, or open a follow-up once this PR is settled, whichever you prefer.

(The occasional cubemap extra_pages must be reused at same va failure in full-suite runs is a separate timing issue: #718, with a fix in #447.)

Claude Code (Claude Opus 5.5) ran the probes and tests and wrote this comment; I checked it.

**@⁠bobosneefdev** on GitHub · 2026-11-24 07:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7125281541) **Tested** `main` `a1672ef` and this PR's head `3896e4f` on AMD Radeon RX 6800 (RDNA2), driver 32.0.21045.29003; Ryzen 5 5600X3D; Windows 11 Pro 26200; Rust 1.98.1 MSVC; debug. I confirm the root cause is the driver, not the page sharing. Separately from this PR, I reproduced it with no XCL code: a plain reserved 3D texture on one heap, mapped, uploaded with `CopyTextureRegion` and read back. Per mip, RGBA8 (✓ = read back intact): | texture | one linear region of `total` tiles (what `Pages::map` sends) | standard tiles as one region + packed region | one region per standard mip + packed region | |---|---|---|---| | 64³, 4 mips | ✓✓✗✗ | ✓✓✓✓ | ✓✓✓✓ | | 64³, 7 mips | ✓✓✗✗✗✗✗ | all ✓ | all ✓ | | 128³, 5 mips | ✓✓✗✗✗ | ✓✓**✗**✓✓ | all ✓ | | 32³, 3 mips | all ✓ | all ✓ | all ✓ | | 256×256×16, 6 mips | all ✓ | all ✓ | all ✓ | Two things this PR does not cover yet: 1. **Standard mips past the second.** In the 128³ row, mip 2 is a standard mip, not a packed one, and it still reads zero. Checked on this PR's head: adding `("3D 128x128x128 5 mips", console_desc(4, 128, 128, 128, 5, 28, 0x105))` to the test's shapes fails with `3D 128x128x128 5 mips: subresource 2 mismatch`. Re-mapping only the packed block doesn't reach it; each standard subresource needs its own region. 2. **`Pages::unmap` has the same problem.** I mapped each subresource separately, then sent `unmap`'s call (one linear NULL region of `total` tiles): on the 64³ and 128³ textures, mips 2 and up still read back data instead of zero, so those tiles stay mapped. `unmap_superseded` then cools them (`release_tiles(.., true)`), and after `COOL` they can be given to another texture while the superseded one still maps them. I have not seen this cause a visible problem in a game; it is what the readback shows. Locally, I made `Pages::map` and `Pages::unmap` both build their regions from `GetResourceTiling`: one region per standard subresource, plus one per slice's packed block. They fall back to the single region when the tiling doesn't add up to `total` (60 added / 10 removed lines in `vram.rs`). With that change on `main`, the test passes with the 128³ shape added. Happy to share the diff here, or open a follow-up once this PR is settled, whichever you prefer. (The occasional `cubemap extra_pages must be reused at same va` failure in full-suite runs is a separate timing issue: #718, with a fix in #447.) Claude Code (Claude Opus 5.5) ran the probes and tests and wrote this comment; I checked it.
Author
Owner

@⁠Abdellah-Khanani on GitHub · 2026-11-24 09:47 UTC · original

Thanks, that's a better fix than mine. I reproduced the 128³ case on RDNA1: with ("3D 128x128x128 5 mips", console_desc(4, 128, 128, 128, 5, 28, 0x105)) added to the shapes, this PR's head 3896e4f fails with 3D 128x128x128 5 mips: subresource 2 mismatch on the RX 5700 XT (driver 32.0.21045.29003), the same as your RX 6800. So re-mapping only the packed block covers the shapes in the test, not every 3D texture.

Building the regions from GetResourceTiling in both map and unmap fixes the cause, and fixing unmap too matters more: tiles that stay mapped and are then handed to another texture are worse than zeros. I'd rather not grow this PR with code I didn't write, so please open it as your own PR, with the 128³ shape in the test. I'll run it on the RX 5700 XT and post the results there. If the maintainers would rather take one PR, I'm also fine closing this one in favour of yours, since yours covers everything this one does.

Claude Code (Claude Opus 5.5) ran the test above and helped write this comment; I checked it.

**@⁠Abdellah-Khanani** on GitHub · 2026-11-24 09:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7127886885) Thanks, that's a better fix than mine. I reproduced the 128³ case on RDNA1: with `("3D 128x128x128 5 mips", console_desc(4, 128, 128, 128, 5, 28, 0x105))` added to the shapes, this PR's head `3896e4f` fails with `3D 128x128x128 5 mips: subresource 2 mismatch` on the RX 5700 XT (driver 32.0.21045.29003), the same as your RX 6800. So re-mapping only the packed block covers the shapes in the test, not every 3D texture. Building the regions from `GetResourceTiling` in both `map` and `unmap` fixes the cause, and fixing `unmap` too matters more: tiles that stay mapped and are then handed to another texture are worse than zeros. I'd rather not grow this PR with code I didn't write, so please open it as your own PR, with the 128³ shape in the test. I'll run it on the RX 5700 XT and post the results there. If the maintainers would rather take one PR, I'm also fine closing this one in favour of yours, since yours covers everything this one does. Claude Code (Claude Opus 5.5) ran the test above and helped write this comment; I checked it.
Author
Owner

@⁠gutersohn on GitHub · 2026-11-24 09:51 UTC · original

Test run of 3896e4fb97d4971971ab7b178a541170cb96318b on an AMD Radeon RX 6600 (RDNA2, Navi 23, gfx1032), as is and merged onto current main 9aec53d: the 3D packed-mip failure is gone in both, 0 failed. This card runs an older driver than the RDNA2 results above that name theirs (32.0.21045.16010 vs 32.0.21045.29003).

Tested

  • AMD Radeon RX 6600 (8 GB), AMD Windows driver 32.0.21045.16010; Intel Core i5-14600KF; Windows 11 10.0.26200; Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 (Windows SDK 10.0.26100); XCL_ADAPTER=radeon; no XCL_SAMPLE_* set
  • cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4, clean worktrees:
tree passed failed ignored
this PR's head 3896e4f (base 2997c9a) 676 0 41
main 9aec53d 721 3 41
9aec53d + this PR (local merge, clean, not committed) 724 0 41
  • On main the 3 failures are placed_title_textures_share_vram_and_preserve_pixels (3D 64x64x64 4 mips: subresource 2 mismatch) and the two PoisonError follow-ons from #673.
  • cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels alone, 5 runs each: main 0/5, PR head 5/5, merged tree 5/5.
  • No SKIPPED GPU tests on this adapter in any of the three trees (wave64 and mesh available).

Not tested

  • the retail title / scripts/smoke.ps1 (no game data); release build; #673 on this card

AI-assisted: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠gutersohn** on GitHub · 2026-11-24 09:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7127986149) Test run of `3896e4fb97d4971971ab7b178a541170cb96318b` on an **AMD Radeon RX 6600** (RDNA2, Navi 23, gfx1032), as is and merged onto current `main` `9aec53d`: the 3D packed-mip failure is gone in both, 0 failed. This card runs an older driver than the RDNA2 results above that name theirs (32.0.21045.16010 vs 32.0.21045.29003). **Tested** - AMD Radeon RX 6600 (8 GB), AMD Windows driver 32.0.21045.16010; Intel Core i5-14600KF; Windows 11 10.0.26200; Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 (Windows SDK 10.0.26100); `XCL_ADAPTER=radeon`; no `XCL_SAMPLE_*` set - `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4`, clean worktrees: | tree | passed | failed | ignored | |---|---|---|---| | this PR's head `3896e4f` (base `2997c9a`) | 676 | 0 | 41 | | `main` `9aec53d` | 721 | 3 | 41 | | `9aec53d` + this PR (local merge, clean, not committed) | 724 | 0 | 41 | - On `main` the 3 failures are `placed_title_textures_share_vram_and_preserve_pixels` (`3D 64x64x64 4 mips: subresource 2 mismatch`) and the two `PoisonError` follow-ons from #673. - `cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels` alone, 5 runs each: `main` 0/5, PR head 5/5, merged tree 5/5. - No `SKIPPED` GPU tests on this adapter in any of the three trees (wave64 and mesh available). **Not tested** - the retail title / `scripts/smoke.ps1` (no game data); release build; #673 on this card AI-assisted: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Author
Owner

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

RX 6900 XT (RDNA2), Windows, release: the packed-mip failure reproduces on main 384f7f7 and is gone with this PR (3896e4f), as-is (636 passed, 0 failed) and merged onto main (694 passed, 0 failed; the test alone 5/5 passed, main 0/5).

For the 128³ / unmap follow-up discussed above: #1028 adds that case to the test. It also passes here, and this PR and #1028 merge together without conflicts (694 passed, 0 failed). Full numbers are on #1028.

Not tested: a retail title, the whole workspace suite, debug builds.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment; the runs are real, on the hardware above.

**@⁠AlexandreSchuelter** on GitHub · 2026-11-24 11:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7129868505) RX 6900 XT (RDNA2), Windows, release: the packed-mip failure reproduces on `main` `384f7f7` and is gone with this PR (`3896e4f`), as-is (636 passed, 0 failed) and merged onto `main` (694 passed, 0 failed; the test alone 5/5 passed, `main` 0/5). For the 128³ / unmap follow-up discussed above: #1028 adds that case to the test. It also passes here, and this PR and #1028 merge together without conflicts (694 passed, 0 failed). Full numbers are on #1028. Not tested: a retail title, the whole workspace suite, debug builds. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment; the runs are real, on the hardware above.
Author
Owner

@⁠RodrigoTorreao on GitHub · 2026-11-24 12:39 UTC · original

Test report on RDNA2: this PR's head 3896e4f merged locally onto current main 47efa2e (105 commits ahead of its base; the merge had no conflicts and needed no edits).

Tested

  • AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003; Intel i5-14600KF; Windows 11 25H2 build 26200.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug build
  • XCL_SAMPLE_RPF, XCL_SAMPLE_DLLS, XCL_SAMPLE_TTPF, XCL_SAMPLE_BVH4 set to the retail title's files
  • main 47efa2e, cargo test --workspace --no-fail-fast -- --test-threads=4: 738 passed, 3 failed, 41 ignored, 0 SKIPPED
    • the one real failure is placed_title_textures_share_vram_and_preserve_pixels: 3D 64x64x64 4 mips: subresource 2 mismatch (mip 2 reads as zeros); the other two failures are PoisonError follow-ons
  • main + this PR, cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4: 741 passed, 0 failed, 41 ignored, 0 SKIPPED; placed_title_textures_share_vram_and_preserve_pixels passes, including the 3D subresource 2 case, as the test is on main now
  • unmerged head 3896e4f, cargo test -p xcl --lib -- hle::d3d12x::title_textures hle::d3d12x::vram: 13 passed, 0 failed

So this PR also fixes the packed-mip readback on RDNA2, not only on the RX 5700 XT.

Not tested

  • no scripts/smoke.ps1 run on the retail title
  • release build; other RDNA2 boards or drivers
  • no frame-rate comparison with #1028; both make the test pass here

AI use

  • Claude Code with Claude Opus 5.5 ran the commands and wrote this report; I checked the counts against the logs.
**@⁠RodrigoTorreao** on GitHub · 2026-11-24 12:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7131744163) Test report on RDNA2: this PR's head 3896e4f merged locally onto current `main` 47efa2e (105 commits ahead of its base; the merge had no conflicts and needed no edits). **Tested** - AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003; Intel i5-14600KF; Windows 11 25H2 build 26200.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug build - `XCL_SAMPLE_RPF`, `XCL_SAMPLE_DLLS`, `XCL_SAMPLE_TTPF`, `XCL_SAMPLE_BVH4` set to the retail title's files - `main` 47efa2e, `cargo test --workspace --no-fail-fast -- --test-threads=4`: 738 passed, 3 failed, 41 ignored, 0 SKIPPED - the one real failure is `placed_title_textures_share_vram_and_preserve_pixels`: `3D 64x64x64 4 mips: subresource 2 mismatch` (mip 2 reads as zeros); the other two failures are `PoisonError` follow-ons - `main` + this PR, `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4`: **741 passed, 0 failed, 41 ignored, 0 SKIPPED**; `placed_title_textures_share_vram_and_preserve_pixels` passes, including the 3D subresource 2 case, as the test is on `main` now - unmerged head 3896e4f, `cargo test -p xcl --lib -- hle::d3d12x::title_textures hle::d3d12x::vram`: 13 passed, 0 failed So this PR also fixes the packed-mip readback on RDNA2, not only on the RX 5700 XT. **Not tested** - no `scripts/smoke.ps1` run on the retail title - release build; other RDNA2 boards or drivers - no frame-rate comparison with #1028; both make the test pass here **AI use** - Claude Code with Claude Opus 5.5 ran the commands and wrote this report; I checked the counts against the logs.
Author
Owner

@⁠RodrigoTorreao on GitHub · 2026-11-24 13:10 UTC · original

Test report on RDNA2 for this PR's head 3896e4f, merged locally onto current main 47efa2e. That is 105 commits past the PR's base. The merge had no conflicts and needed no edits.

On RDNA2 the packed-mip test passes with this PR, so the fix is not specific to the RX 5700 XT. The title runs with it, with no crash and no device removal. The frame-rate comparison with main is within the noise of this machine.

Tested

  • Hardware and software:
    • AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003
    • Intel i5-14600KF, 16 GB RAM
    • Windows 11 25H2 build 26200.9974
    • Rust 1.100.0 (stable-x86_64-pc-windows-msvc)
  • Tests: debug build, with XCL_SAMPLE_RPF/DLLS/TTPF/BVH4 set to the retail title's files, cargo test --workspace --no-fail-fast -- --test-threads=4.
    • main 47efa2e: 738 passed, 3 failed, 41 ignored, 0 SKIPPED.
      • The real failure is placed_title_textures_share_vram_and_preserve_pixels: 3D 64x64x64 4 mips: subresource 2 mismatch. Mip 2 reads as zeros.
      • The other two failures are PoisonError follow-ons.
    • main + this PR, after cargo build --workspace: 741 passed, 0 failed, 41 ignored, 0 SKIPPED. This is against the test as it is on main now.
    • Unmerged head 3896e4f, cargo test -p xcl --lib -- hle::d3d12x::title_textures hle::d3d12x::vram: 13 passed, 0 failed.
  • Smoke runs: release build of main + this PR (local merge commit 07b5336), scripts/smoke.ps1 -Seconds 60 on the retail title, DXC 1.9.2609 via XCL_DXC_DIR, warm DXIL cache.
    • The title stays in its first menu, at about 13 draws per frame in every run.
    • No gamepad or keyboard input reached the title in any of them. I checked the log for pressed, and keyboard_mouse = false was set for the interleaved rounds.

Regression run
Frames shown in 60 s, all clean runs. The last three columns are interleaved rounds, in the order main → this PR → #1028.

build single runs round 1 round 2 round 3 median
main 47efa2e 987, 721 666 754 433 721
main + this PR (07b5336) 859 462 491 734 ~612
  • All runs on both sides: exit 0x0, 0 device removals, 0 crashes, peak commit 15 868–15 895 MB.
  • main alone ranges from 433 to 987 frames with the same workload, so the difference in the medians is within the noise. The title commits about 15.9 GB on a 16 GB machine, so paging is a suspect, but I have not checked it.
  • The smoke blocks name the local merge commit, not a commit of this PR, so they cannot serve as this PR's own regression run.

Not tested

  • A machine with a stable frame rate. On this one the 80 % gate cannot be measured reliably.
  • A smoke run of the unmerged head 3896e4f.
  • Other RDNA2 boards and drivers.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands on my machine and wrote this report. The counts and frame numbers were copied from the test output and the XCL logs.
**@⁠RodrigoTorreao** on GitHub · 2026-11-24 13:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7132462089) Test report on RDNA2 for this PR's head 3896e4f, merged locally onto current `main` 47efa2e. That is 105 commits past the PR's base. The merge had no conflicts and needed no edits. On RDNA2 the packed-mip test passes with this PR, so the fix is not specific to the RX 5700 XT. The title runs with it, with no crash and no device removal. The frame-rate comparison with main is within the noise of this machine. **Tested** - Hardware and software: - AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003 - Intel i5-14600KF, 16 GB RAM - Windows 11 25H2 build 26200.9974 - Rust 1.100.0 (stable-x86_64-pc-windows-msvc) - Tests: debug build, with `XCL_SAMPLE_RPF/DLLS/TTPF/BVH4` set to the retail title's files, `cargo test --workspace --no-fail-fast -- --test-threads=4`. - `main` 47efa2e: 738 passed, 3 failed, 41 ignored, 0 SKIPPED. - The real failure is `placed_title_textures_share_vram_and_preserve_pixels`: `3D 64x64x64 4 mips: subresource 2 mismatch`. Mip 2 reads as zeros. - The other two failures are `PoisonError` follow-ons. - `main` + this PR, after `cargo build --workspace`: **741 passed, 0 failed, 41 ignored, 0 SKIPPED**. This is against the test as it is on `main` now. - Unmerged head 3896e4f, `cargo test -p xcl --lib -- hle::d3d12x::title_textures hle::d3d12x::vram`: 13 passed, 0 failed. - Smoke runs: release build of `main` + this PR (local merge commit 07b5336), `scripts/smoke.ps1 -Seconds 60` on the retail title, DXC 1.9.2609 via `XCL_DXC_DIR`, warm DXIL cache. - The title stays in its first menu, at about 13 draws per frame in every run. - No gamepad or keyboard input reached the title in any of them. I checked the log for `pressed`, and `keyboard_mouse = false` was set for the interleaved rounds. **Regression run** Frames shown in 60 s, all clean runs. The last three columns are interleaved rounds, in the order main → this PR → #1028. | build | single runs | round 1 | round 2 | round 3 | median | |---|---|---|---|---|---| | main 47efa2e | 987, 721 | 666 | 754 | 433 | **721** | | main + this PR (07b5336) | 859 | 462 | 491 | 734 | **~612** | - All runs on both sides: exit 0x0, 0 device removals, 0 crashes, peak commit 15 868–15 895 MB. - main alone ranges from 433 to 987 frames with the same workload, so the difference in the medians is within the noise. The title commits about 15.9 GB on a 16 GB machine, so paging is a suspect, but I have not checked it. - The smoke blocks name the local merge commit, not a commit of this PR, so they cannot serve as this PR's own regression run. **Not tested** - A machine with a stable frame rate. On this one the 80 % gate cannot be measured reliably. - A smoke run of the unmerged head 3896e4f. - Other RDNA2 boards and drivers. **AI use** - Claude Code (Claude Opus 5.5) ran the commands on my machine and wrote this report. The counts and frame numbers were copied from the test output and the XCL logs.
Author
Owner

@⁠relativespace2K on GitHub · 2026-11-24 03:40 UTC · original · edited 2026-11-25 04:09 UTC

Tested - 3896e4f on main 3da2abb, retail GTA6 1.0.2.1

Tool: OpenCode with DeepSeek V4.1 Flash 1017

  • 360 s retail run on native Windows/D3D12 (RX 6800 XT, Ryzen 5 5600, 31.9 GB): exit 0,
    1,831 frames, peak 31,973 MB committed, 0 failed pipelines, 0 DXIL failures.
  • Same 40 mesh refusals (minimap) as main, 13 console-only IIDs, 10 stubs; 19,2xx unique shaders.
  • main 3da2abb itself: 360 s, exit 0, peak 32,880 MB - the old game+0x23cf683 streaming
    crash seen on b7aa9f3 does not reproduce on this main.

Tested - #470 + #673 together on AMD RDNA2

  • Local combination of main 91f9a5e + #470 3896e4f + #673 84b6645
    (cherry-picks 736d10e, 3896e4f, 84b6645, not committed; not either PR's head).
  • AMD Radeon RX 6800 XT (16338 MiB), driver 32.0.21045.29003; Ryzen 5 5600, 31.9 GB;
    Windows 11 IoT Enterprise LTSC 26100; Rust 1.100.0 stable-x86_64-pc-windows-msvc;
    DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug; no XCL_SAMPLE_*.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4.
tree passed failed ignored
main 63cdc25 (one README commit before 91f9a5e) 689 3 41
#673 head 84b6645 689 1 41
main 91f9a5e + #470 + #673 692 0 41
  • Combined tree: 0 SKIPPED GPU tests; placed_title_textures_share_vram_and_preserve_pixels --exact passes (1.95 s).
  • The three main failures are gone: the packed-mip mismatch and the two PoisonError follow-ons.

Not tested: retail title / smoke.ps1, release build, NVIDIA / Intel.

AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests and drafted this report.

**@⁠relativespace2K** on GitHub · 2026-11-24 03:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7121308161) · edited 2026-11-25 04:09 UTC **Tested** - `3896e4f` on `main` `3da2abb`, retail GTA6 1.0.2.1 Tool: OpenCode with DeepSeek V4.1 Flash 1017 - 360 s retail run on native Windows/D3D12 (RX 6800 XT, Ryzen 5 5600, 31.9 GB): exit 0, 1,831 frames, peak 31,973 MB committed, 0 failed pipelines, 0 DXIL failures. - Same 40 mesh refusals (minimap) as `main`, 13 console-only IIDs, 10 stubs; 19,2xx unique shaders. - `main` `3da2abb` itself: 360 s, exit 0, peak 32,880 MB - the old `game+0x23cf683` streaming crash seen on `b7aa9f3` does not reproduce on this main. --- **Tested** - #470 + #673 together on AMD RDNA2 - Local combination of `main` `91f9a5e` + #470 `3896e4f` + #673 `84b6645` (cherry-picks `736d10e`, `3896e4f`, `84b6645`, not committed; not either PR's head). - AMD Radeon RX 6800 XT (16338 MiB), driver 32.0.21045.29003; Ryzen 5 5600, 31.9 GB; Windows 11 IoT Enterprise LTSC 26100; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug; no `XCL_SAMPLE_*`. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`. | tree | passed | failed | ignored | |---|---:|---:|---:| | `main` `63cdc25` (one README commit before `91f9a5e`) | 689 | 3 | 41 | | #673 head `84b6645` | 689 | 1 | 41 | | `main` `91f9a5e` + #470 + #673 | 692 | 0 | 41 | - Combined tree: 0 `SKIPPED` GPU tests; `placed_title_textures_share_vram_and_preserve_pixels --exact` passes (1.95 s). - The three `main` failures are gone: the packed-mip mismatch and the two `PoisonError` follow-ons. **Not tested**: retail title / `smoke.ps1`, release build, NVIDIA / Intel. **AI use**: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests and drafted this report.
Author
Owner

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

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

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

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 14:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/470#issuecomment-7164736162) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/title_textures.rs
  • crates/xcl/src/hle/d3d12x/vram.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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