Skip to content

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

Merged
ivall merged 1 commit into
ivall:mainfrom
Prime1997:contrib/mirror-gpu-readback
Nov 24, 2026
Merged

ivall merged 1 commit into
ivall:mainfrom
Prime1997:contrib/mirror-gpu-readback

Conversation

@Prime1997

@Prime1997 Prime1997 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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

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: game_scarlett_master.exe
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: game_scarlett_master.exe
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.

@Kayloe1

Kayloe1 commented Nov 23, 2026

Copy link
Copy Markdown

when can i play?

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.
@ivall

ivall commented Nov 24, 2026

Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Contributor Author

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.

@PHeitor1

PHeitor1 commented Nov 24, 2026 •

Copy link
Copy Markdown

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

@Prime1997
Prime1997 deleted the contrib/mirror-gpu-readback branch November 24, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants