Repository navigation
Conversation
…cl-dev#718) The device-wide page count also drops when unrelated idle pages are swept, so this check compares that resource's extra-page tiles instead. The cubemap check in the same test stays with xcl-dev#447. Assisted-by: Grok Build (Grok 4.7)
|
Test run of Tested
Review: Comparing the extra-page tiles themselves instead of the device-wide VRAM byte count removes the dependence on unrelated pages going idle after 2 s, which is the same flakiness #447 addresses for the cubemap check (and which I measured on Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Test report on Tested
Not tested
AI use
|
|
One adjacent assertion still compares against the pre-reuse count: I tested sampling AI use: Codex instrumented and ran the two local debug tests and prepared this report. I also applied just the following diff to a clean export of this PR head (234a8e1) and ran the focused test without the injected delays or #447. It passed (1 passed, 680 filtered out, debug). Minimal diff against this PR head--- a/crates/xcl/src/hle/d3d12x/title_textures.rs
+++ b/crates/xcl/src/hle/d3d12x/title_textures.rs
@@ -1871,9 +1871,10 @@
}
// Overwrite the first 64 KiB (covering +0x0000, +0x4000 (both adj[1] & reused), +0x8000, +0xC000)
// WITHOUT releasing adj/reused: dead extra_pages (+0x4000, +0x8000) must drop immediately!
+ let pages_before_cover = dev_pages();
let cover = place_tex(base, &d64);
let pages_after_cover = dev_pages();
- assert!(pages_after_cover < pages_before_reuse, "superseded unaligned extra_pages must be reclaimed immediately ({pages_before_reuse} -> {pages_after_cover})");
+ assert!(pages_after_cover < pages_before_cover, "superseded unaligned extra_pages must be reclaimed immediately ({pages_before_cover} -> {pages_after_cover})");
drop((cover, reused, adj));
// 4. Full mip chain (standard + packed mips, RGBA8 & BC7), tiny all-packed mips, |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Part of #718. Placing an unaligned 16 KiB texture at a virtual address that already holds one was checked by comparing the device-wide video-memory byte count. That count also falls when unrelated pages have been idle for two seconds, so the assert fails even when this placement still shares its extra tile. The check now compares that resource's extra-page tile identities.
#447 covers the cubemap assert later in the same test (
cubemap extra_pages must be reused at same va). This commit does not change that assert. The helper here ismapped_tiles_for, inserted beforepage_bytes_for, so it can land next to #447'stile_mappings_for.What is in it
crates/xcl/src/hle/d3d12x/vram.rs:mapped_tiles_for(#[cfg(test)]) returns the title-page tiles and the extra-page tiles of one mapped resource.crates/xcl/src/hle/d3d12x/title_textures.rs: the unaligned reuse assert inplaced_title_textures_share_vram_and_preserve_pixelscompares those extra-page tiles. When the resource is not a placed texture, the old device-wide count remains. The following "reclaimed immediately" assert still uses that device-wide count, captured before the second placement.Tested
cargo test --workspace --offline -- --test-threads=1on this diff, immediately before commit234a8e1: 701 passed, 0 failed, 41 ignored, exit 0, 86.60s. Package lines: 660/21, 0, 13, 3/4, 1, 3, 2, 7, 0/4, 1, 1, 2, 1, 1, 6/12, 0, 0.gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.XCL_SAMPLE_*were unset; those tests are part of the 41 ignored.--test-threads=1 --exact: 1 passed, 0 failed, finished in 1.57s. With a temporary 2100 ms sleep before the second placement, long enough for the idle sweep, the same test passed again (1 passed, finished in 3.49s). That sleep is not in the commit..\scripts\test.ps1(--test-threads=4) on this same diff failed in the xcl lib tests: 657 passed, 3 failed, 21 ignored. The first failure was the unchanged cubemap assert attitle_textures.rs:1916(cubemap extra_pages must be reused at same va, left 2555904, right 16187392). The next two failures werePoisonErroron the shared vram mutex (transitions_apply_when_their_list_is_submitted,d32s8_targets_take_their_own_size_of_video_memory). That is the flake Tests: check cubemap tile reuse independently of idle page reclamation #447 is fixing. The serial run above is the result for this commit.cargo build --release -p xcl --offlinesucceeded for main64b3f35and for this head. The only warning is the pre-existingfetch_updatedeprecation inxgameruntime.Regression run
No retail Scarlett title on this machine. Both runs are the in-tree test title (the
tests/data/testgamefolder plusxcl_testtitle.exe) with--hello, for 20 seconds, each with its ownXCL_DATA_ROOT.scripts/smoke.ps1on main cannot pass title arguments, so these runs used a local-TitleArgsthat is not in this commit. A stocksmoke.ps1without--hellomakes the title exit 0x1, and that counts ascrashes: 1. Both logs sayprocess ends (at about 2.1s (exit 0). The earlyrust_panicis the title's expected caught C++ exception.Not tested
AI use
Grok Build (Grok 4.7) investigated the flake, wrote the tile comparison, ran the tests and both smoke runs, and opened this pull request.