From 756325f842b905bc46469e878d938056a54e26e2 Mon Sep 17 00:00:00 2001 From: lunaeme Date: Tue, 1 Dec 2026 16:21:04 -0300 Subject: [PATCH] Tests: the ExecuteIndirect bind test takes the warp-test lock later_queue_completion_during_sleep_reclaims_before_wait_deadline failed 10 of 30 runs of hle::d3d12x::bind::tests:: at --test-threads=8 on main 6bfb5c5 (`result` Stopped, not Progressed), never at 1 or 2 threads. The fence-wait tests take lock_warp_tests because they count on the process-wide fenced two-pass batches (FENCED_RES / FENCED_BYTES). execute_indirect_reads_the_arguments_written_before_it does not. Once another test has hooked the device, its allocator Reset / Release go through alloc_reset / alloc_release -> console_list::allocator_reset -> release_allocator_res, which calls reclaim_fenced (backtraces of every reclaim_fenced call from that test in parallel runs; run alone it makes none). In a failing run it reclaimed while FENCED_BYTES held the waiting test's two batches: it took the later batch the test had just completed, so the test's own reclaim found nothing, its scripted clock ran to the deadline and the wait stopped. The test now takes the same lock. 60 of 60 module runs at 8 threads pass. Co-Authored-By: Claude Opus 5.5 --- crates/xcl/src/hle/d3d12x/bind.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/xcl/src/hle/d3d12x/bind.rs b/crates/xcl/src/hle/d3d12x/bind.rs index 62d5549b14..e304922368 100644 --- a/crates/xcl/src/hle/d3d12x/bind.rs +++ b/crates/xcl/src/hle/d3d12x/bind.rs @@ -5589,6 +5589,10 @@ mod tests { /// 5090 ran the old count in nearly every try). #[test] fn execute_indirect_reads_the_arguments_written_before_it() { + // once another test has hooked the device, this test's allocator Reset / Release go through + // `alloc_reset` / `alloc_release` to `release_allocator_res`, which reclaims the process-wide + // fenced two-pass batches the fence-wait tests count on: one at a time with them + let _warp_guard = lock_warp_tests(); use crate::gpu::{fence, recomp::runner::skip_test}; use std::mem::{transmute_copy, ManuallyDrop}; use windows::Win32::Graphics::Direct3D::D3D_FEATURE_LEVEL_11_0;