Tests: read back mirrored textures across writes and page remapping #338

Manually merged
github merged 1 commit from gh-pr/338/head into gh-pr/338/base 2026-11-26 04:20:31 +00:00
Owner

@⁠Prime1997 on GitHub · 2026-11-23 23:49 UTC · original
Prime1997:contrib/mirror-gpu-readback → main · +137 −0 · 1 files · 1 commits · merged 2026-11-24 00:03 UTC

Exercise the merged GPU-view mirror path end to end on a synthetic R8 texture. Force watched Windows reservations outside the UMA windows, verify CPU rewrites reach the GPU, then verify a later lazy physical mapping overrides the mirror and unmapping restores it. Keep the GPU-view title address throughout and clean up reservations, physical pages and texture registration on failure. No retail data or runtime changes.

What is in it

  • A single GPU regression in the existing test module in crates/xcl/src/hle/d3d12x/title_textures.rs for the mirror behavior from #252 and #283. It reads back the resulting 64 × 64 R8 texture, complementing the existing source-selection checks.
  • After two CPU writes, the test maps a fresh physical page into the GPU view, checks its initial zeros and a later write, then unmaps it and checks that the earlier CPU pattern reappears. It verifies the title-facing address throughout. All input bytes are synthetic.

Tested

  • Intel Core i5-10400, NVIDIA GeForce RTX 3060 Ti (driver 32.0.16.1714), Windows 11 Pro build 26200, Rust 1.100.0.
  • cargo build --workspace (debug) and cargo build --locked --release -p xcl completed.
  • cargo test -p xcl --lib gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes -- --test-threads=1 --nocapture executed on the physical GPU. One passed with no skip.
  • cargo test --workspace -- --test-threads=4 (debug): 671 passed, 0 failed, 41 ignored. 2 GPU cases reported a skip.
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64

The maintainer separately tested merged main a6f5f7a on an RX 9070 (RDNA4) with this change and six other PRs. They reported 636 unit tests passed, zero failed, and verified that the retail title drew its menu and continued past it. Maintainer's test report

Regression run

Both release builds ran the same title offline for 60 seconds, using separate fresh title-data directories and the same launch settings. The retail runs measure startup. The synthetic GPU test exercises the remapping sequence directly.

Main

xcl-smoke v1
commit: 2b4bb431e4f44803bc1d2937fdf1cfbdb1b03bea
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 213 (PresentX 213)
presents per 2 s (last 3): 4 3 4
device removals: 0
crashes: 0
peak commit: 15154 MB

PR

xcl-smoke v1
commit: bb436a08b4c57966a804436c850197008dfd96ff
gpu: NVIDIA GeForce RTX 3060 Ti
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 224 (PresentX 224)
presents per 2 s (last 3): 4 4 5
device removals: 0
crashes: 0
peak commit: 15185 MB

Not tested

Our local run covered one NVIDIA GPU and one Windows build. Intel GPUs and gameplay remain untested here. Optional sample-data tests were run without external sample files.

AI use

OpenAI Codex (GPT-6) assisted with adapting the test, checking for overlap, running validation, and preparing this submission. The production mirror fixes are credited to #252 and #283.

**@⁠Prime1997** on GitHub · 2026-11-23 23:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/338) `Prime1997:contrib/mirror-gpu-readback` → `main` · +137 −0 · 1 files · 1 commits · merged 2026-11-24 00:03 UTC Exercise the merged GPU-view mirror path end to end on a synthetic R8 texture. Force watched Windows reservations outside the UMA windows, verify CPU rewrites reach the GPU, then verify a later lazy physical mapping overrides the mirror and unmapping restores it. Keep the GPU-view title address throughout and clean up reservations, physical pages and texture registration on failure. No retail data or runtime changes. **What is in it** - A single GPU regression in the existing test module in `crates/xcl/src/hle/d3d12x/title_textures.rs` for the mirror behavior from #252 and #283. It reads back the resulting 64 × 64 R8 texture, complementing the existing source-selection checks. - After two CPU writes, the test maps a fresh physical page into the GPU view, checks its initial zeros and a later write, then unmaps it and checks that the earlier CPU pattern reappears. It verifies the title-facing address throughout. All input bytes are synthetic. **Tested** - Intel Core i5-10400, NVIDIA GeForce RTX 3060 Ti (driver 32.0.16.1714), Windows 11 Pro build 26200, Rust 1.100.0. - `cargo build --workspace` (debug) and `cargo build --locked --release -p xcl` completed. - `cargo test -p xcl --lib gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes -- --test-threads=1 --nocapture` executed on the physical GPU. One passed with no skip. - `cargo test --workspace -- --test-threads=4` (debug): 671 passed, 0 failed, 41 ignored. 2 GPU cases reported a skip. - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64` - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` The maintainer separately tested merged main `a6f5f7a` on an RX 9070 (RDNA4) with this change and six other PRs. They reported 636 unit tests passed, zero failed, and verified that the retail title drew its menu and continued past it. [Maintainer's test report](https://github.com/ivall/xcl/pull/338#issuecomment-7117662730) **Regression run** Both release builds ran the same title offline for 60 seconds, using separate fresh title-data directories and the same launch settings. The retail runs measure startup. The synthetic GPU test exercises the remapping sequence directly. Main ``` xcl-smoke v1 commit: 2b4bb431e4f44803bc1d2937fdf1cfbdb1b03bea gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 213 (PresentX 213) presents per 2 s (last 3): 4 3 4 device removals: 0 crashes: 0 peak commit: 15154 MB ``` PR ``` xcl-smoke v1 commit: bb436a08b4c57966a804436c850197008dfd96ff gpu: NVIDIA GeForce RTX 3060 Ti title: 419239bf seconds: 60 exit: 0x0 frames shown: 224 (PresentX 224) presents per 2 s (last 3): 4 4 5 device removals: 0 crashes: 0 peak commit: 15185 MB ``` **Not tested** Our local run covered one NVIDIA GPU and one Windows build. Intel GPUs and gameplay remain untested here. Optional sample-data tests were run without external sample files. **AI use** OpenAI Codex (GPT-6) assisted with adapting the test, checking for overlap, running validation, and preparing this submission. The production mirror fixes are credited to #252 and #283.
Exercise the merged GPU-view mirror path end to end on a synthetic R8 texture. Force watched Windows reservations outside the UMA windows, verify CPU rewrites reach the GPU, then verify a later lazy physical mapping overrides the mirror and unmapping restores it. Keep the GPU-view title address throughout and clean up reservations, physical pages and texture registration on failure. No retail data or runtime changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:20:29 +00:00
github manually merged commit bb436a08b4 into gh-pr/338/base 2026-11-26 04:20:31 +00:00
Author
Owner

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

when can i play?

**@⁠Kayloe1** on GitHub · 2026-11-23 23:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/338#issuecomment-7117406889) when can i play?
Author
Owner

@⁠ivall on GitHub · 2026-11-24 00:03 UTC · original

Merged (a6f5f7a). Checked on an RX 9070 (RDNA4) on main a6f5f7a, together with #335, #322, #331, #330, #338, #318 and #332: cargo test --workspace -- --test-threads=4 - 636 unit tests passed, 0 failed; the retail game reaches its menu and draws it (frame dump) and goes on past it. The description still has the template's placeholders - please fill in Tested next time.

**@⁠ivall** on GitHub · 2026-11-24 00:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/338#issuecomment-7117662730) Merged (a6f5f7a). Checked on an RX 9070 (RDNA4) on main a6f5f7a, together with #335, #322, #331, #330, #338, #318 and #332: `cargo test --workspace -- --test-threads=4` - 636 unit tests passed, 0 failed; the retail game reaches its menu and draws it (frame dump) and goes on past it. The description still has the template's placeholders - please fill in **Tested** next time.
Author
Owner

@⁠Prime1997 on GitHub · 2026-11-24 00:06 UTC · original

Merged (a6f5f7a). Checked on an RX 9070 (RDNA4) on main a6f5f7a, together with #335, #322, #331, #330, #338, #318 and #332: cargo test --workspace -- --test-threads=4 - 636 unit tests passed, 0 failed; the retail game reaches its menu and draws it (frame dump) and goes on past it. The description still has the template's placeholders - please fill in Tested next time.

Thank you. I will.

**@⁠Prime1997** on GitHub · 2026-11-24 00:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/338#issuecomment-7117716256) > Merged ([a6f5f7a](https://github.com/ivall/xcl/commit/a6f5f7a74cc620c1f88a9e3669a633d10c3c8212)). Checked on an RX 9070 (RDNA4) on main [a6f5f7a](https://github.com/ivall/xcl/commit/a6f5f7a74cc620c1f88a9e3669a633d10c3c8212), together with #335, #322, #331, #330, #338, #318 and #332: `cargo test --workspace -- --test-threads=4` - 636 unit tests passed, 0 failed; the retail game reaches its menu and draws it (frame dump) and goes on past it. The description still has the template's placeholders - please fill in **Tested** next time. Thank you. I will.
Author
Owner

@⁠PHeitor1 on GitHub · 2026-11-24 00:13 UTC · original

Tested bb436a0 merged onto main 3516080.

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

Pass: 671 passed, 0 failed, 41 ignored. SKIPPED: only the 2 no wave64 tests (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware). Build clean.

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

**@⁠PHeitor1** on GitHub · 2026-11-24 00:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/338#issuecomment-7117843306) Tested `bb436a0` merged onto `main` `3516080`. RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed, so the debug-layer tests run), rustc 1.100.0 MSVC, debug, `cargo test --workspace --no-fail-fast -- --test-threads=4`, no `XCL_SAMPLE_*`. **Pass:** 671 passed, 0 failed, 41 ignored. SKIPPED: only the 2 `no wave64` tests (`gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`). Build clean. _Run and written with Claude Code (Claude Opus 5.5)._
This discussion has been locked. Commenting is limited to contributors.
No description provided.