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

Merged
Prime1997 merged 1 commit from upstream-pr/338 into main 2026-11-24 00:03:45 +00:00
Prime1997 commented 2026-11-23 23:49:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-23T23:49:24Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6571281901 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/338). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-23T23:49:24Z. --- 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.
upstream-sync closed this pull request 2026-11-24 06:58:12 +00:00
Kayloe1 commented 2026-11-24 07:04:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kayloe1 on 2026-11-23T23:49:43Z.


when can i play?

<!-- greyfinch-sync:ivall/xcl:comment:7117406889 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/338#issuecomment-7117406889). Originally posted by [Kayloe1](https://github.com/Kayloe1) on 2026-11-23T23:49:43Z. --- when can i play?
ivall commented 2026-11-24 07:04:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T00:03:53Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7117662730 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/338#issuecomment-7117662730). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T00:03:53Z. --- 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.
Prime1997 commented 2026-11-24 07:04:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-24T00:06:49Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7117716256 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/338#issuecomment-7117716256). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-24T00:06:49Z. --- > 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.
PHeitor1 commented 2026-11-24 07:04:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by PHeitor1 on 2026-11-24T00:13:43Z.


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).

<!-- greyfinch-sync:ivall/xcl:comment:7117843306 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/338#issuecomment-7117843306). Originally posted by [PHeitor1](https://github.com/PHeitor1) on 2026-11-24T00:13:43Z. --- 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)._
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

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