diff --git a/crates/xcl/src/hle/d3d12x/title_textures.rs b/crates/xcl/src/hle/d3d12x/title_textures.rs index 5cd369fd7..b1786cf48 100644 --- a/crates/xcl/src/hle/d3d12x/title_textures.rs +++ b/crates/xcl/src/hle/d3d12x/title_textures.rs @@ -1165,8 +1165,8 @@ mod tests { use windows::Win32::Graphics::Dxgi::Common::{DXGI_FORMAT_R8_UNORM, DXGI_SAMPLE_DESC}; use windows_sys::Win32::System::Memory as mem; - let _vram_guard = super::super::vram::VRAM_TEST_LOCK.lock().unwrap(); - let _guard = TEST_LOCK.lock().unwrap(); + let _vram_guard = super::super::vram::VRAM_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); + let _guard = TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); if super::super::backend() != super::super::Backend::Real { crate::gpu::recomp::runner::skip_test("no GPU"); return; @@ -1375,7 +1375,7 @@ mod tests { /// submission order, each time it is; a Reset forgets them; other resources are not noted. #[test] fn transitions_apply_when_their_list_is_submitted() { - let _guard = TEST_LOCK.lock().unwrap(); + let _guard = TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); // RGBA8 64×64, 3 mips, 2 slices (6 subresources), 4KB_S let mut d = [0u8; 0x38]; d[0..4].copy_from_slice(&3u32.to_le_bytes()); @@ -1556,8 +1556,8 @@ mod tests { /// chains (including packed mips), cubemap arrays (`extra_pages`) and 3D volumes upload intact. #[test] fn placed_title_textures_share_vram_and_preserve_pixels() { - let _vram_guard = super::super::vram::VRAM_TEST_LOCK.lock().unwrap(); - let _guard = TEST_LOCK.lock().unwrap(); + let _vram_guard = super::super::vram::VRAM_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); + let _guard = TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); use windows::Win32::Graphics::Direct3D::D3D_FEATURE_LEVEL_11_0; use windows::Win32::Graphics::Dxgi::Common::DXGI_SAMPLE_DESC; use windows::Win32::Graphics::Dxgi::*; diff --git a/crates/xcl/src/hle/d3d12x/vram.rs b/crates/xcl/src/hle/d3d12x/vram.rs index 507c5b696..d4f426fb6 100644 --- a/crates/xcl/src/hle/d3d12x/vram.rs +++ b/crates/xcl/src/hle/d3d12x/vram.rs @@ -775,7 +775,7 @@ mod tests { /// arenas no target uses go. Needs a hardware adapter (skips on WARP). #[test] fn d32s8_targets_take_their_own_size_of_video_memory() { - let _vram_guard = VRAM_TEST_LOCK.lock().unwrap(); + let _vram_guard = VRAM_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); use windows::core::Interface; use windows::Win32::Graphics::Direct3D::D3D_FEATURE_LEVEL_11_0; use windows::Win32::Graphics::Dxgi::Common::*;