Tests: check cubemap tile reuse independently of idle page reclamation #447
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!447
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/447/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Prime1997 on GitHub · 2026-11-24 00:23 UTC · original
Prime1997:contrib/vram-cube-reuse-test→main· +22 −2 · 2 files · 1 commits · merged 2026-11-25 19:18 UTCPart 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
vram.rssnapshots the pool and tile identity for each title-page and extra-page tile of a mapped resource.title_textures.rschecks 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
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 withcargo build --locked --release -p xcl.a6f5f7a:cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels -- --test-threads=1 --nocapturefailed, with total page bytes falling from 17,170,432 to 2,555,904.cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --test-threads=1 --nocapturetwice 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 withXCL_DXC_DIRpointing to the installed DXC. The initial run loaded a compiler that returnedE_NOINTERFACEand failed shader-related tests.gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64Related work and independent tests
This PR checks cubemap reuse. Luxuryig checks the separate unaligned-texture assertion in the same test. The two assertions can fail independently when unrelated memory is reclaimed. PR #770 and forced reproduction of the unaligned case.
A contributor tested both PRs together on an RTX 4060 Laptop, on upstream main at
beaa245. All three full runs reported 713 passed, 0 failed and 41 ignored, with two wave64 skips in each. Main alone reproduced the cubemap assertion in two of three runs. The unaligned failure did not occur spontaneously in that comparison. Independent comparison on #718Regression run
Same title, graphics settings and 60-second limit on both release builds, using fresh title-data directories. Both smoke blocks use the same anonymized title identifier. The synthetic GPU regression exercises cubemap reuse.
Main
PR
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.
I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@alpz1000 on GitHub · 2026-11-24 00:31 UTC · original
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 --nocapturea6f5f7a74cc620c1f88a9e3669a633d10c3c8212: both isolated runs passed. No skip message.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
2b4bb431run 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 on GitHub · 2026-11-24 00:34 UTC · original
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), Rust1.100.0, DXC1.9.2602.17from Windows SDK10.0.26100.0.a6f5f7a74cc620c1f88a9e3669a633d10c3c8212: three passes. The intermittent failure did not reproduce on this machine.48e7434f5fa51934c3cd225eed4336a0bf9b0747: three passes. Each run reported reuse of 33 title-page tiles and 3 extra-page tiles.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 on GitHub · 2026-11-24 00:35 UTC · original
Test run on AMD RDNA4 – commit
48e7434(this PR's head, as is), clean treeTested
backend 'real' – AMD Radeon RX 9070 XT); AMD Ryzen 7 9800X3D; Windows 11 Pro build 26200; Rust 1.100.0stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11cargo build --workspace: okcargo test --workspace -- --test-threads=4: 676 passed, 0 failed, 41 ignored. No SKIPPED tests.placed_title_textures_share_vram_and_preserve_pixelspassed 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
mainhere to see whether the old check fails on this GPUmainRun and report: Claude Code (Claude Opus 5.5).
@3L1A5-1 on GitHub · 2026-11-24 00:43 UTC · original · edited 2026-11-24 01:13 UTC
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_pixelsalone (--exact,--test-threads=1)cargo test -p xcl --lib(default threads)main(a6f5f7a/2997c9a)cubemap extra_pages must be reused at same va, 2,555,904 vs 17,170,432PoisonErrorfollow-ons)48e7434The failure on
mainalso shows with a single test thread, so it fits the idle-reclamation explanation here, not only the parallel collision in #343. Report written with Claude Code (Claude Opus 5.5) from these runs.@lukkasremondi on GitHub · 2026-11-24 01:50 UTC · original
Test of #447 on RTX 3080 / Zen 1 / Windows 10, plus the PR merged onto current
mainTested: NVIDIA GeForce RTX 3080 10 GB, driver 617.42 (32.0.16.1742); AMD Ryzen 5 1600 (Zen 1); Windows 10 Pro 22H2 (19045.6466) with Agility SDK 1.620.2 through
XCL_D3D12_DIR; DXC 1.9.2602; Rust 1.100.0; debug build; clean worktrees.cargo test --workspace --no-fail-fast -- --test-threads=4:main508a0c748e743448e7434merged onto508a0c7(local merge;title_textures.rsmerges without conflicts)mainthe failure happens every time on this machine: 3 of 3 runs, includingcargo test -p xcl --lib -- --test-threads=1. Each run givescubemap extra_pages must be reused at same vawith 2,555,904 vs 17,170,432, and twoPoisonErrorfollow-ons. In one run I waited 2.1 s and placed the cube once more beforep0, so the idle sweep ran before the measurement. That run passed (lib: 640 passed, 0 failed), which matches the PR's explanation.cargo test -p xcl --lib -- --test-threads=1 --show-outputprints2D 256x256x6 cubemap 9 mips: reused 33 title-page tiles and 3 extra-page tilesand the test passes.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).cargo test -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exactprintsSKIPPED …: this adapter makes no reserved cube with mipsand passes, onmainand on the PR. The line goes throughprintln!, so it shows only with--nocapture. In the whole lib run the same test does not skip. I did not look into why.Not tested: other GPUs, release build, any title.
AI use: Claude Code with Claude Opus 5.5 ran the tests and drafted this report.
@13hourstilliland on GitHub · 2026-11-24 01:52 UTC · original
Independent Ampere 8 GB (RTX 3070, driver 610.88) check on exact PR head
48e7434, including the full workspace suite.Tested
48e7434f5fa51934c3cd225eed4336a0bf9b0747(PR #447 head), clean worktreestable-x86_64-pc-windows-gnu, not MSVC); DXC 1.9.2609.5 (01b62ad4) viaXCL_DXC_DIR; debug build; noXCL_SAMPLE_*setcargo test -p xcl --lib -- hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels --exact --test-threads=1 --nocapture2D 256x256x6 cubemap 9 mips: reused 33 title-page tiles and 3 extra-page tilescargo test --workspace --no-fail-fast -- --test-threads=4 --show-output(interactive desktop session)xcllib: 636 passed, 0 failed, 21 ignored;e2e: 3/0)SKIPPED(4, not coverage):no wave64(2):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardwareno D3D12 debug layer(2):test_title_draws_with_a_root_signature_under_the_debug_layer,uploads_start_from_each_subresources_stateNot tested
main, AMD / wave64 hardware, MSVC toolchain, release build, retail title /scripts/smoke.ps1, D3D12 debug-layer testsAI use
gemini-4-neon: ran the commands and wrote this report from the logs; the human reviewed it.@Jevix on GitHub · 2026-11-24 01:54 UTC · original
Independent RTX 4060 validation of PR #447.
Tested
PR head:
48e7434f5fa51934c3cd225eed4336a0bf9b0747The original cubemap assertion failed on local main (
7ebf1b8), reproducing the reported decrease from 17,170,432 to 2,555,904 bytes.Results on PR #447
The resource-specific tile identity assertions passed consistently. No blocking findings on this configuration.
Not tested: AMD/Intel GPUs, native Wave64, retail titles, release builds, or rebasing onto current main.
AI use: OpenAI Codex (GPT-5, exact variant unavailable) assisted with code review, test execution and analysis. ChatGPT (GPT-6.2) condensed the report.
@futurepro62 on GitHub · 2026-11-24 04:21 UTC · original
A check the runs above don't have: the failure forced, so it no longer depends on timing. Details of the cause are in #718.
Tested
48e7434merged onto currentmainf4ce27c(clean merge,title_textures.rsandvram.rsauto-merged). NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed,XCL_REQUIRE_GPU=mesh.Forced the idle sweep with a temporary
std::thread::sleep(2 s)just before the secondplace_tex(local edit, reverted after):--exact …placed_title_textures_share_vram_and_preserve_pixels --test-threads=1cargo test -p xcl --lib -- --test-threads=4mainf4ce27c+ sleepleft: 2359296, right: 17170432)PoisonErrorfollow-ons)f4ce27c+ sleepEach passing run printed
2D 256x256x6 cubemap 9 mips: reused 33 title-page tiles and 3 extra-page tiles.Without the sleep,
cargo build --workspacethencargo test --workspace -- --test-threads=4on the merge: 701 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Not tested
AI use
@futurepro62 on GitHub · 2026-11-24 04:54 UTC · original
Follow-up to my report above, confirming what @fromthemoonx found on #718: the
reusing unaligned va must share extra_pages tilecheck in the same test has the same timing dependence, and this PR does not cover it yet.Tested
48e7434merged onto currentmain(clean merge). RTX 5070 Ti (616.64), Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug.std::thread::sleep(2100 ms)betweenlet pages_before_reuse = dev_pages();andlet reused = place_tex(base + 0x4000, &d16);(local edit, reverted):cargo test -p xcl --lib -- --exact hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels --test-threads=1fails 3 of 3: Without the sleep: 3 of 3 pass.place_tex→bind→sweepreturns pages left idle by earlier steps, so the device-widedev_pages()drops. The tile-identity comparison this PR uses for the cube would likely fit here too.Not tested
AI use
@milesah3ad on GitHub · 2026-11-24 05:52 UTC · original
Test report for #447 on an RTX 5080 (wave32, Blackwell). It fixes the #718 flake here, and on this machine
mainfails every time, not just sometimes.Tested
XCL_DXC_DIR)maine50836b,cargo test --workspace --no-fail-fast -- --test-threads=4: lib 660 passed, 3 failed, 21 ignored. The failure is the #718 cubemap check (left: 2555904,right: 17170432), plus the twoPoisonErrorfollow-ons. It failed on 2 of 2 full-suite runs. Run alone (cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels), it passes 5 of 5 times in about 1 s. That fits the 2 s idle-sweep explanation: under the full suite the test runs long enough to trigger the sweep.48e7434, same command: 676 passed, 0 failed, 41 ignored (all binaries).maine50836b(merges cleanly): 704 passed, 0 failed, 41 ignored (all binaries). The lib suite on its own passed 3 more times: 663 passed, 0 failed each time.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64).Not tested
AI use
@MajorUnfazed on GitHub · 2026-11-24 08:01 UTC · original
Tested: PR head
48e7434f5fon a GTX 1650 (4 GB), driver 621.24, i7-12700K, Windows build 26300.9974, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug build.1ec4c98. An earlier four-thread workspace run on1ec4c98hit the cubemap assertion tracked in #718.Not tested: Retail titles or native-wave64 hardware.
@Prime1997 on GitHub · 2026-11-24 08:17 UTC · original
Hey everyone! Just a heads up, I am commenting on this to attach my Discord for those who want to work on this:
https://discord.gg/gK3y7WRRY
This is not a self advertisement, I just don't want people using this push request and getting confused.
@Diskuss on GitHub · 2026-11-24 08:46 UTC · original · edited 2026-11-24 09:29 UTC
Tested on AMD Radeon RX 9070 XT (RDNA4) at
48e7434f5fa51934c3cd225eed4336a0bf9b0747(PR head merged locally with main1ec4c98; the head is 62 commits behind main; merge was clean, nothing pushed)AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32015.7029; Ryzen 7 5700X3D; 32 GB RAM; Windows 11 Pro build 26300.9974; Rust 1.100.0 x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug build.
Tested:
cargo build --workspace: ok.cargo test --workspace --no-fail-fast -- --test-threads=4: 715 passed, 0 failed, 41 ignored. 0 SKIPPED, no DXGI_ERROR_DEVICE_REMOVED. Matches main1ec4c98(715/0/41).cargo test -p xcl --lib title_textures -- --test-threads=1: 13 passed, 0 failed, includingplaced_title_textures_share_vram_and_preserve_pixels.cargo test -p xcl --lib hle::d3d12x -- --test-threads=4x10 each: main1ec4c980/10 failed (115 passed each run) vs PR 0/10 failed (114 passed each run). The flake did not reproduce in this loop, so the comparison proves nothing either way. The failure ("cubemap extra_pages must be reused at same va", left 7798784, right 17170432) did happen earlier on this machine on main1ec4c98during a--test-threads=4lib run. The PR run has one fewer test in this filter than main (114 vs 115); I did not investigate why.Not tested: retail title /
scripts/smoke.ps1(no game files), release build.Report written by Claude Code (Claude Sonnet 5.5) from a real run on this machine.
Update: the flake does reproduce on this machine without this PR. On main
077ce40(clean tree),cargo test --workspace --no-fail-fast -- --test-threads=4: 713 passed, 3 failed, 41 ignored. The failures wereplaced_title_textures_share_vram_and_preserve_pixels("cubemap extra_pages must be reused at same va", left 8847360, right 17170432), thentransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memorywithPoisonError(fallout from the poisoned lock). With this PR merged locally, the full suite (1 run) and thehle::d3d12xloop (10 runs) had 0 failures. The flake shows up mainly under full-suite load, so this is supporting evidence, not proof.Correction (hidden skips): "0 SKIPPED" above means no
SKIPPEDline appeared in the normal run. A later-- --nocapturerun on this machine shows that two tests skip silently, because the D3D12 debug layer is not installed (no Graphics Tools /d3d12SDKLayers.dll). libtest captures their output, so they show asok:e2e::test_title_draws_with_a_root_signature_under_the_debug_layerandtexture_states::uploads_start_from_each_subresources_state. Neither is related to this change, and all other GPU tests ran on the RX 9070 XT.@upipibi on GitHub · 2026-11-24 10:15 UTC · original
Full-suite run on this PR's head
48e7434on NVIDIA, plus the test this PR changes, run on its own:Tested
cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4: 676 passed, 0 failed, 41 ignored (16 test binaries);placed_title_textures_share_vram_and_preserve_pixelspassed in the full run.placed_title_textures_share_vram_and_preserve_pixelsalone,--test-threads=1: 5 of 5 passed (about 12 s each; onmainthe same test alone takes about 1 s, also 5 of 5). On this machinemain's full run had failed it once (657 passed, 3 failed in the lib: the #718 cubemap assert plus its twoPoisonErrorfollowers).gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Not tested: AMD / wave64; no retail title (the changes are in
#[cfg(test)]code).AI-assisted (Claude Code).
@DavidM1911 on GitHub · 2026-11-25 14:15 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!
@ivall on GitHub · 2026-11-25 19:18 UTC · original
Merging: the check compares this resource's own tiles instead of a device-wide byte count, which is what made it fail by timing.
Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug,
main2898511with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1and_3, which fail the same way onmain);hle::d3d12xon 16 threads 5 times, no failure.AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.
@towiice on GitHub · 2026-11-24 01:06 UTC · original · reviewed
Tested PR head
48e7434on NVIDIA GeForce GTX 1650 SUPER (Turing / TU116, wave32, driver 610.88), Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm), DXCv1.9.2609:cargo test -p xcl --lib cube -- --test-threads=4: 5 passed, 0 failed (0.58 s), includinggpu::recomp::tests::gpu_retail_vs_blit_gen_amb_cubeandgpu::recomp::tests::gpu_cube_array_slices.All cubemap tests pass on Turing.