Skip to content

Tests: check cubemap tile reuse independently of idle page reclamation - #447

Open
Prime1997 wants to merge 1 commit into
ivall:mainfrom
Prime1997:contrib/vram-cube-reuse-test
Open

Prime1997 wants to merge 1 commit into
ivall:mainfrom
Prime1997:contrib/vram-cube-reuse-test

Conversation

@Prime1997

Copy link
Copy Markdown
Contributor

Part of #288. On an RTX 3060 Ti, the cubemap reuse test sometimes fails on main even though the second placement can reuse the same tiles. The test compares all page bytes on the device. Creating a placement can also reclaim pages from earlier textures after their two-second idle period.

What is in it

  • A test-only helper in vram.rs snapshots the pool and tile identity for each title-page and extra-page tile of a mapped resource.
  • title_textures.rs checks that the second cube has the same ordered tile identities and that the first cube retains them. The bounded streaming, immediate-reclamation and pixel-readback assertions still run.

Tested

  • Commit 48e7434f5fa51934c3cd225eed4336a0bf9b0747, Windows 11 Pro build 26200, Intel Core i5-10400, GeForce RTX 3060 Ti (driver 32.0.16.1714), Rust 1.100.0. Built the workspace in debug and the smoke binary with cargo build --locked --release -p xcl.
  • Unmodified main a6f5f7a: cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels -- --test-threads=1 --nocapture failed, with total page bytes falling from 17,170,432 to 2,555,904.
  • Ran cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --test-threads=1 --nocapture twice on the PR. Both runs passed on the GPU. Each observed 33 title-page and three extra-page tiles reused, and zero page growth after the streaming working set had filled.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 676 passed, 0 failed, 41 ignored. 2 GPU tests reported a skip. The full suite was rerun with XCL_DXC_DIR pointing to the installed DXC. The initial run loaded a compiler that returned E_NOINTERFACE and failed shader-related tests.
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64

Regression run

Same title, graphics settings and 60-second limit on both release builds, using fresh title-data directories. The cubemap scenario itself is exercised by the synthetic GPU regression.

Main

xcl-smoke v1
commit: a6f5f7a74cc620c1f88a9e3669a633d10c3c8212
gpu: NVIDIA GeForce RTX 3060 Ti
title: game_scarlett_master.exe
seconds: 60
exit: 0x0
frames shown: 235 (PresentX 235)
presents per 2 s (last 3): 9 10 9
device removals: 0
crashes: 0
peak commit: 15196 MB

PR

xcl-smoke v1
commit: 48e7434f5fa51934c3cd225eed4336a0bf9b0747
gpu: NVIDIA GeForce RTX 3060 Ti
title: game_scarlett_master.exe
seconds: 60
exit: 0x0
frames shown: 283 (PresentX 283)
presents per 2 s (last 3): 10 10 11
device removals: 0
crashes: 0
peak commit: 15204 MB

Not tested

Other GPUs and drivers, retail gameplay, and optional tests requiring external sample files.

AI use

OpenAI Codex (GPT-6) helped diagnose the assertion, check existing PRs, implement the test-only change, and run validation.

A placement sweeps pages belonging to unrelated targets idle for two seconds. Comparing device-wide bytes before and after the second cube can therefore fail when those old targets expire. Snapshot the mapped title-page and extra-page pool/tile identities for the cube and require the new and original resources to share all of them. Keep the existing placement-growth, reclamation and pixel-readback checks.
@alpz1000

Copy link
Copy Markdown

Independent RTX 3060 check of PR #447.

Tested on NVIDIA GeForce RTX 3060 12 GB (610.88 / 32.0.16.1088), Intel Core i5-8400, Windows 11 Home 26200.9974, Rust 1.100.0 x86_64-pc-windows-msvc, MSVC linker 14.44.35230, debug.

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

  • Base a6f5f7a74cc620c1f88a9e3669a633d10c3c8212: both isolated runs passed. No skip message.
  • PR head 48e7434f5fa51934c3cd225eed4336a0bf9b0747: both isolated runs passed. No skip message. Both runs logged reuse of 33 title-page tiles and 3 extra-page tiles for the cubemap.

On this same machine, the earlier 2b4bb431 run reproduced the page-total assertion in isolation (2,555,904 vs. 17,170,432), as reported in #42. It did not reproduce on the PR's base during this check, so the new result confirms the tile-identity assertion runs and passes on this adapter.

Not tested: full workspace at this PR head, retail titles, or other adapters.

AI use: OpenAI Codex (GPT-6) ran the local checks and drafted the report.

@AGInformatique81

Copy link
Copy Markdown

Independent RTX 2060 check of PR #447.

Tested — Windows 11 Pro build 26300, Intel Core i7-9700K, NVIDIA GeForce RTX 2060 (driver 32.0.16.2124), Rust 1.100.0, DXC 1.9.2602.17 from Windows SDK 10.0.26100.0.

cargo test --release --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --test-threads=1 --nocapture
  • Baseline a6f5f7a74cc620c1f88a9e3669a633d10c3c8212: three passes. The intermittent failure did not reproduce on this machine.
  • PR head 48e7434f5fa51934c3cd225eed4336a0bf9b0747: three passes. Each run reported reuse of 33 title-page tiles and 3 extra-page tiles.
  • No skip was reported in any of the six runs.

Not tested — The full workspace suite on this PR, other GPUs, or a retail title.

AI use — Codex (GPT-6) ran the tests and drafted this report.

@AC-Storm-YT

Copy link
Copy Markdown

Test run on AMD RDNA4 – commit 48e7434 (this PR's head, as is), clean tree

Tested

  • AMD Radeon RX 9070 XT (RDNA4, wave64), driver 32.0.32029.2010 – the tests ran on it (backend 'real' – AMD Radeon RX 9070 XT); AMD Ryzen 7 9800X3D; Windows 11 Pro build 26200; Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11
  • cargo build --workspace: ok
  • cargo test --workspace -- --test-threads=4: 676 passed, 0 failed, 41 ignored. No SKIPPED tests.
  • placed_title_textures_share_vram_and_preserve_pixels passed in the full run and in 10 of 10 separate runs (cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels, about 9–10 s each)

Not tested

  • The NVIDIA case the PR fixes: I have no RTX 3060 Ti, and I did not run main here to see whether the old check fails on this GPU
  • Release build; this commit merged with current main

Run and report: Claude Code (Claude Opus 5.5).

@3L1A5-1

3L1A5-1 commented Nov 24, 2026

Copy link
Copy Markdown

Independent Turing check of #447.

Tested: NVIDIA GeForce RTX 2060 SUPER 8 GB (Turing, 32-wide), driver 617.14 (32.0.16.1714), Intel Core i5-9400F, Windows 11 Pro 26300, Rust 1.100.0 x86_64-pc-windows-msvc, debug.

placed_title_textures_share_vram_and_preserve_pixels alone (--exact, --test-threads=1) full cargo test -p xcl --lib (default threads)
main (a6f5f7a / 2997c9a) 2 of 9 runs fail: cubemap extra_pages must be reused at same va, 2,555,904 vs 17,170,432 1 of 2 runs failed (that test, plus two PoisonError follow-ons)
#447 48e7434 9 of 9 pass 636 passed, 0 failed

The failure on main also shows with a single test thread, so it fits the idle-reclamation explanation here, not only the parallel collision in #343. AI-assisted (Claude Code).

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.

5 participants