Tests: the D32S8 target test waits at most 10 s for its list #1696
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1706"
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?
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-24T19:28:04Z.
Under Wine + vkd3d-proton on NVIDIA, the lib test binary never finishes:
hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memorywaits for its command list withSetEventOnCompletion(1, NULL), and the GPU never finishes that list. The test now waits withgpu::fence::waitand a 10 s limit, so it fails withTimeout(10000)and the run goes on.Why the list never finishes here: once an earlier test in the same process has drawn something, the test's copy of the stencil plane to its read-back buffer faults on the GPU (kernel log:
NVRM: Xid 31 … MMU Fault: ENGINE GRAPHICS), and after that the queue's fence was not signalled in the 5 minutes I let one run wait, andGetDeviceRemovedReasonreported nothing. Two tests in this order are enough:gpu::recomp::tests::gpu_graphics_vs_ps_draw, then the D32S8 test. With a local copy of the test (onb7aa9f3, 1 run of each variant), leaving out the stencil plane'sCopyTextureRegionremoved the fault; keeping only that copy, or using committed textures instead of XCL's arenas, did not. This points below XCL (vkd3d-proton or the driver; I have not looked which), but every variant still ran on a device XCL had adopted and through its ownCopyTextureRegionoverride, and a plain D3D12 device was not tried. This pull request only stops the test from waiting on it for good.What is in it
crates/xcl/src/hle/d3d12x/vram.rs, inmod testsonly: the wait afterqueue.Signaliscrate::gpu::fence::wait(&fence, 1, &dev, None, 10_000).unwrap(), as ingpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes(title_textures.rs). One line in, two out.Tested
x86_64-pc-windows-gnu. The tests were pinned to that card withDXVK_FILTER_DEVICE_NAMEandVKD3D_FILTER_DEVICE_NAME.--test-threads=1: onmainc160d86the run was still waiting after 60 s when I ended it (1 run; onb7aa9f31 run, ended after 45 s). On121bfeait ended after 10.6 s: 1 passed, 1 failed withTimeout(10000)atvram.rs:1014(1 run). The D32S8 test alone passes on121bfea(1 run), as it did onb7aa9f3.cargo test --workspace --release --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4on121bfea: the lib tests finished in 13.6 s, 807 passed, 2 failed, 22 ignored; the other test binaries 46 passed, 3 failed, 20 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).mainc160d86: the lib test binary did not finish (the D32S8 test, andreservable_agrees_with_the_driverwaiting for the lock it holds, "running for over 60 seconds"); I ended it. With those two skipped: 806 passed, 1 failed, 22 ignored; the other binaries 46 passed, 3 failed, 20 ignored.gpu_depth_buffer_created_for_unordered_access_is_placed(lib),disk_free_space_ex_reports_pls_quota,set_predication_buffer_state_and_kickoff.test_title_runs_and_game_folder_is_untouchedfails on both at the same check,W: not cloaked(Wine). In the suite run on121bfeait had stopped at "build first", because the test title had not been built in that tree; run again with the workspace built (cargo test -p xcl --test e2e: 2 passed, 1 failed) it fails at that check, as onmain. On121bfeaalso the D32S8 test itself, with the timeout, wheremainwaits.b7aa9f3).cargo test --workspace --release --no-fail-fast -j 8 -- --test-threads=4on121bfea, MSVC toolchain, 1 run each, started over SSH: RTX 2070 SUPER 8 GB (driver 621.01, Ryzen 7 5700X3D, 25H2 build 26200.9711, rustc 1.100.0), and a Ryzen 7 9800X3D with an RTX 5070 Ti 16 GB (driver 621.24) and the processor's integrated AMD Radeon graphics (driver 32.0.21030.2001; 26H2 build 26300.9974, rustc 1.99.1). On each: 857 passed, 1 failed, 42 ignored (lib 809 / 0 / 22), SKIPPED the same three as above.d32s8_targets_take_their_own_size_of_video_memorypassed on both machines: the GPU finished its list and the 10 s limit was not reached. On the second machine it ran on the integrated AMD graphics, not on the RTX 5070 Ti: the test takes DXGI adapter 0, which over SSH is the AMD adapter there (4K targets of 42,926,080 bytes each; 66,846,720 on the RTX 2070 SUPER). The one failure istest_title_runs_and_game_folder_is_untouched, for the way the run was started and not for the change: an SSH session has no desktop (session 0), and the test title's swap chain cannot be made (CreateSwapChainForHwnd…0x887A0022). Started in the logged-in desktop session on the RTX 2070 SUPER machine,cargo test -p xcl --test e2e --releaseon121bfeagave 3 passed, 0 failed (1 run). (On the other machine the suite ran before the workspace was built, so there that test stopped at "build first"; rerun aftercargo build --workspace --release, still over SSH, it stopped at the swap chain as well: 2 passed, 1 failed. Started in the desktop session there too, the same command gave 3 passed, 0 failed, with the test title on the RTX 5070 Ti (1 run).)121bfeaon the Ryzen 7 9800X3D machine, started in the logged-in desktop session (1 run): 858 passed, 0 failed, 42 ignored (lib 809 / 0 / 22), SKIPPED the same three. Thered32s8_targets_take_their_own_size_of_video_memoryran on the RTX 5070 Ti and passed: its 4K targets were 41,811,968 bytes each, the size that card's driver reports for them (the integrated AMD graphics reports 42,926,080).Regression run
Both blocks are from
scripts/smoke.ps1, unchanged, run by PowerShell 7 on Linux withxcl.exestarted through Wine, on a retail title, withXCL_PSO_PRELOAD=0. Under Wine "peak commit" reads 0 MB, andexit: 0x89is the wrapper ending Wine after XCL's ownprocess ends, not XCL's exit code. The blocks sayRTX 4060 Ti 8GBbecause that is the name vkd3d-proton gives this 16 GB card. The change is insidemod tests, soxcl.exeis the same code in both.main:
xcl-smoke v1
commit:
c160d86ef2gpu: NVIDIA GeForce RTX 4060 Ti 8GB
title: 7952987A
seconds: 60
exit: 0x89
frames shown: 1548 (PresentX 1548)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB
PR:
xcl-smoke v1
commit:
121bfea746gpu: NVIDIA GeForce RTX 4060 Ti 8GB
title: 7952987A
seconds: 60
exit: 0x89
frames shown: 1544 (PresentX 1544)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB
Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:09:45Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T11:35:11Z.
Independent desktop NVIDIA verification of PR #1706 at head
121bfea74639318909661c6dd48f64426b872005(1commit; exact parent & merge-base:c160d86ef2efe3a07e4dfb473e4fa72eafb413c0, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12, Wave32-only Ada), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted GPU tests & build (
121bfea7)cargo test --release -p xcl --lib hle::d3d12x::vram:: -- --nocapture(3 consecutive runs)9 passed; 0 failed; 0 ignored; 822 filtered out× 3 (2.36s,2.38s,2.36s,0skipped; live RTX 4060 execution ofd32s8_targets_take_their_own_size_of_video_memorywith the new 10 s boundedfence::waitalongside all 8 othervram::tests)cargo build --release -p xcl1m 15s, exit0,0new warnings invram.rs)Paired quiet 60 s retail smoke (
title: 29640639)(Note:
scripts/smoke.ps1atc160d86epredates9683e7a6and printed the local folder basename ontitle:; replaced below with the standard9683e7a6title hash29640639, with all measured fields verbatim.)Exact parent & merge-base (
c160d86ef2efe3a07e4dfb473e4fa72eafb413c0, cached baseline on the same machine):PR #1706 (
121bfea74639318909661c6dd48f64426b872005):Limits of coverage
crates/xcl/src/hle/d3d12x/vram.rs#[cfg(test)],0production-code changes);d32s8_targets_take_their_own_size_of_video_memoryand all9/9hle::d3d12x::vram::tests executed and passed3/3(0skipped) on live RTX 4060, exercising the happy-path boundedfence::wait(..., 10_000)completion (the 10 s timeout/device-loss failure branch itself was not fault-injected).AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:32:35Z.
Triage (#1607) – head
121bfeaNo open or merged PR makes the same change. On main,
vram.rs::d32s8_targets_take_their_own_size_of_video_memorystill waits withSetEventOnCompletion(1, HANDLE::default()), which never returns if the list hangs;gpu::fence::waitwith a 10 s limit fails the test instead.No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by grathepic on 2026-12-02T22:59:16Z.
merge-check
base:
078358a058head:
121bfea746merge: clean (
git diff --check origin/main..HEADclean)build:
cargo +1.98.1-x86_64-pc-windows-msvc build --offline --locked --workspace-> oktests:
cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked --workspace --no-fail-fast -- --test-threads=4(withXCL_DXC_DIR=C:\VulkanSDK\1.4.363.0\Bin,XCL_SAMPLE_*unset) -> 3006 passed, 0 failed, 52 ignored across 44 harnesses; SKIPPED: 27 notices (22no wave64, 2no heap windows, 1no GPU_UPLOAD heaps, 1no dxil.dll, 1cannot disable the driver cache (Windows Developer Mode required)); failing: none. The modified testhle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memoryran and passed.title run: none (Tier 0 test-only diff; no production code outside
#[cfg(test)]changed)review: Full single-commit diff read (
+1/-2,crates/xcl/src/hle/d3d12x/vram.rs:5666, strictly#[cfg(test)]). Replaces an unboundedfence.SetEventOnCompletion(1, HANDLE::default()).unwrap()withcrate::gpu::fence::wait(&fence, 1, &dev, None, 10_000).unwrap(), matching other GPU tests in the crate. Auditedgpu::fence::wait(fence.rs:56-97): fast-paths completed fences, creates and drops its own Win32 event, detects device removal (u64::MAX/GetDeviceRemovedReason), and fails withFenceError::Timeout(10_000)instead of hanging indefinitely. Untested: fault-injecting the 10 s timeout path itself, Wine/vkd3d-proton reproduction, and AMD/wave64 hardware.performance: none (test-only bounded fence wait; no runtime frame-time or memory path changed)
verdict: safe to merge (clean merge, full workspace suite passes with 0 failures on NVIDIA RTX 3080, minimal test-only change using the standard
gpu::fence::waithelper)hardware / tool and model: NVIDIA GeForce RTX 3080 (driver 32.0.16.2140), AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Rust 1.98.1-x86_64-pc-windows-msvc, DXC 1.9.0.5512 (VulkanSDK, no dxil.dll) / Antigravity, Gemini 4 Neon
Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-03T00:52:37Z.
merge-check
base:
078358a058head:
121bfea746merge: clean (
git merge --no-ffonto078358a0, merge 541154a6; crates/xcl/src/hle/d3d12x/vram.rs +1/-2, insidemod tests)build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3006 passed, 0 failed, 52 ignored; failing: none (SKIPPED 25: 22 no wave64, 2 no heap windows, 1 cannot disable the driver cache).
hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memoryran and passed, the GPU finished its list well inside the 10 s limit. That is the third of three suite runs of the merge here: in the first two the lib test binary ended abnormally, before anyvram::test had finished and with the changed test not among the running threads in the last thread dump: run 1 with 0xc0000005 inside the NVIDIA user-mode driver whilegpu::agility::tests::create_device_sets_dred_firstcreated a device (86 tests in), run 2 with exit code 130088963 right afterD3D12.X: coherent window could not be restored at ... (Windows error 487) ... Map gave 0x..., wanted 0x...; stopping before guest memory is usedfrom theuma_drivertests (the address was apparently taken between the unmap and the map). The base078358a0passed 2 of 2 full suite runs on this machine in the same hour, andcargo test -p xcl --lib -- --test-threads=4passed 2 of 2 on the base and 2 of 2 on the merge. I read both as intermittent failures in tests this PR does not touch; reporting them since they happened only on this PR's runs.title run: none (the change is inside
#[cfg(test)] mod testsof vram.rs, so xcl.exe is built from the same code as main; theneeds:title-runlabel comes from the path)review: read the whole diff and
gpu::fence::wait(fence.rs). No blocking findings. 1) The unboundedSetEventOnCompletion(1, NULL)(a blocking wait in the driver) becomesfence::wait(&fence, 1, &dev, None, 10_000), which returns at once when the fence is already reached, otherwise waits on its own event, and on the limit returnsRemoved(reason)orTimeout(10000); theunwrapturns that into a test failure instead of a hang, as the other GPU tests in the crate do (runner.rs, texture.rs, bind.rs). 2) Minor: after a timeout the test panics while the GPU may still own the command list, allocator and read-back buffer, which are then released; that only matters on the hung-driver path the PR is about, where the test fails either way.performance: none (test-only; nothing in the runtime changes)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0, debug; Claude Code, Claude Opus 5.5
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.