From 88c0f1481ff2c538ac29073fdd0baf469cf97f01 Mon Sep 17 00:00:00 2001 From: Philip Roy Jones <145068574+philip-roy-jones@users.noreply.github.com> Date: Wed, 25 Nov 2026 20:13:39 -0500 Subject: [PATCH] Tests: isolate the streamed-texture recheck fixture The scheduling test marks an integer fixture key pending in TEXTURES. A concurrent GPU upload can then use it as a COM resource. Run the existing milestone assertions in an exact child libtest so its pending uploads and synthetic frame numbers stay in their own process. A synchronized CPU observer saw the pending entry in the parent on b49be18. With this change it saw no entry while the same milestone was pending in the child. Assisted-by: Codex (GPT-6.2 Astra) --- crates/xcl/src/hle/d3d12x/title_textures.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/xcl/src/hle/d3d12x/title_textures.rs b/crates/xcl/src/hle/d3d12x/title_textures.rs index 6d97bc6e4e..c7189ce6f1 100644 --- a/crates/xcl/src/hle/d3d12x/title_textures.rs +++ b/crates/xcl/src/hle/d3d12x/title_textures.rs @@ -2315,6 +2315,20 @@ mod tests { #[test] fn stream_recheck_schedule_catches_late_writes_and_resets_milestones() { + // A concurrent queue refresh treats every pending key as a live ID3D12Resource. + // Give this fixture its own texture table while it advances the frame milestones. + let exact = [ + "--exact", + "hle::d3d12x::title_textures::tests::stream_recheck_schedule_catches_late_writes_and_resets_milestones", + ]; + if !std::env::args_os().skip(1).eq(exact) { + let output = std::process::Command::new(std::env::current_exe().unwrap()) + .args(exact).output().unwrap(); + let stdout = String::from_utf8_lossy(&output.stdout); + assert!(output.status.success() && stdout.contains("1 passed;"), + "{stdout}\n{}", String::from_utf8_lossy(&output.stderr)); + return; + } let desc = console_desc(3, 256, 256, 1, 1, 28, 0x109); // 256 KiB RGBA8 let tex = Arc::new(xg::Texture::new(&desc).expect("layout")); let size = tex.size() as usize;