Tests: the D32S8 target test waits at most 10 s for its list #1706

Open
github-bot wants to merge 1 commit from github-bot/gh-1706 into main AGit
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 19:28 UTC · original
Royalflamejlh:fix/d32s8-test-wait → main · +1 −2 · 1 files · 1 commits · open

Under Wine + vkd3d-proton on NVIDIA, the lib test binary never finishes: hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory waits for its command list with SetEventOnCompletion(1, NULL), and the GPU never finishes that list. The test now waits with gpu::fence::wait and a 10 s limit, so it fails with Timeout(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, and GetDeviceRemovedReason reported 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 (on b7aa9f3, 1 run of each variant), leaving out the stencil plane's CopyTextureRegion removed 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 own CopyTextureRegion override, 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, in mod tests only: the wait after queue.Signal is crate::gpu::fence::wait(&fence, 1, &dev, None, 10_000).unwrap(), as in gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes (title_textures.rs). One line in, two out.

Tested

  • Linux through Wine and vkd3d-proton. NVIDIA GeForce RTX 4060 Ti 16 GB (driver 615.71.09), Ryzen 9 9950X3D, Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175, rustc 1.98.0, release, x86_64-pc-windows-gnu. The tests were pinned to that card with DXVK_FILTER_DEVICE_NAME and VKD3D_FILTER_DEVICE_NAME.
  • The two tests named above, --test-threads=1: on main c160d86 the run was still waiting after 60 s when I ended it (1 run; on b7aa9f3 1 run, ended after 45 s). On 121bfea it ended after 10.6 s: 1 passed, 1 failed with Timeout(10000) at vram.rs:1014 (1 run). The D32S8 test alone passes on 121bfea (1 run), as it did on b7aa9f3.
  • cargo test --workspace --release --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4 on 121bfea: 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).
  • The same command on main c160d86: the lib test binary did not finish (the D32S8 test, and reservable_agrees_with_the_driver waiting 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.
  • Failures on both trees, for the same reason on each: 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_untouched fails on both at the same check, W: not cloaked (Wine). In the suite run on 121bfea it 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 on main. On 121bfea also the D32S8 test itself, with the timeout, where main waits.
  • The fault and the wait were also seen on an RTX 4070 12 GB on the same machine (1 full serial lib run on b7aa9f3).
  • Native Windows 11, 2 machines, cargo test --workspace --release --no-fail-fast -j 8 -- --test-threads=4 on 121bfea, 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_memory passed 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 is test_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 --release on 121bfea gave 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 after cargo 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).)
  • The same command on 121bfea on 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. There d32s8_targets_take_their_own_size_of_video_memory ran 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 with xcl.exe started through Wine, on a retail title, with XCL_PSO_PRELOAD=0. Under Wine "peak commit" reads 0 MB, and exit: 0x89 is the wrapper ending Wine after XCL's own process ends, not XCL's exit code. The blocks say RTX 4060 Ti 8GB because that is the name vkd3d-proton gives this 16 GB card. The change is inside mod tests, so xcl.exe is the same code in both.

main:

xcl-smoke v1
commit: c160d86ef2
gpu: 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: 121bfea746
gpu: 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

  • The D32S8 test on native Windows on Intel graphics and on a discrete AMD card.
  • AMD and Intel under vkd3d-proton: whether the stencil-plane copy faults there too.
  • Which side the fault is on, vkd3d-proton or the NVIDIA driver, and whether a retail title's own stencil read-backs meet it.

AI use

  • Claude Code (Claude Fable 5.2) reproduced the hang, bisected it to the pair of tests and to the one copy, wrote the change, ran the suite and the regression runs on this machine, ran the suite on two Windows machines over SSH, and wrote this description.
**@⁠Royalflamejlh** on GitHub · 2026-11-24 19:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1706) `Royalflamejlh:fix/d32s8-test-wait` → `main` · +1 −2 · 1 files · 1 commits · open Under Wine + vkd3d-proton on NVIDIA, the lib test binary never finishes: `hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory` waits for its command list with `SetEventOnCompletion(1, NULL)`, and the GPU never finishes that list. The test now waits with `gpu::fence::wait` and a 10 s limit, so it fails with `Timeout(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, and `GetDeviceRemovedReason` reported 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 (on `b7aa9f3`, 1 run of each variant), leaving out the stencil plane's `CopyTextureRegion` removed 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 own `CopyTextureRegion` override, 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`, in `mod tests` only: the wait after `queue.Signal` is `crate::gpu::fence::wait(&fence, 1, &dev, None, 10_000).unwrap()`, as in `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` (`title_textures.rs`). One line in, two out. **Tested** - Linux through Wine and vkd3d-proton. NVIDIA GeForce RTX 4060 Ti 16 GB (driver 615.71.09), Ryzen 9 9950X3D, Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175, rustc 1.98.0, release, `x86_64-pc-windows-gnu`. The tests were pinned to that card with `DXVK_FILTER_DEVICE_NAME` and `VKD3D_FILTER_DEVICE_NAME`. - The two tests named above, `--test-threads=1`: on `main` `c160d86` the run was still waiting after 60 s when I ended it (1 run; on `b7aa9f3` 1 run, ended after 45 s). On `121bfea` it ended after 10.6 s: 1 passed, 1 failed with `Timeout(10000)` at `vram.rs:1014` (1 run). The D32S8 test alone passes on `121bfea` (1 run), as it did on `b7aa9f3`. - `cargo test --workspace --release --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4` on `121bfea`: 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). - The same command on `main` `c160d86`: the lib test binary did not finish (the D32S8 test, and `reservable_agrees_with_the_driver` waiting 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. - Failures on both trees, for the same reason on each: `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_untouched` fails on both at the same check, `W: not cloaked` (Wine). In the suite run on `121bfea` it 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 on `main`. On `121bfea` also the D32S8 test itself, with the timeout, where `main` waits. - The fault and the wait were also seen on an RTX 4070 12 GB on the same machine (1 full serial lib run on `b7aa9f3`). - Native Windows 11, 2 machines, `cargo test --workspace --release --no-fail-fast -j 8 -- --test-threads=4` on `121bfea`, 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_memory` passed 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 is `test_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 --release` on `121bfea` gave 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 after `cargo 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).) - The same command on `121bfea` on 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. There `d32s8_targets_take_their_own_size_of_video_memory` ran 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 with `xcl.exe` started through Wine, on a retail title, with `XCL_PSO_PRELOAD=0`. Under Wine "peak commit" reads 0 MB, and `exit: 0x89` is the wrapper ending Wine after XCL's own `process ends`, not XCL's exit code. The blocks say `RTX 4060 Ti 8GB` because that is the name vkd3d-proton gives this 16 GB card. The change is inside `mod tests`, so `xcl.exe` is the same code in both. main: xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: 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: 121bfea74639318909661c6dd48f64426b872005 gpu: 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** - The D32S8 test on native Windows on Intel graphics and on a discrete AMD card. - AMD and Intel under vkd3d-proton: whether the stencil-plane copy faults there too. - Which side the fault is on, vkd3d-proton or the NVIDIA driver, and whether a retail title's own stencil read-backs meet it. **AI use** - Claude Code (Claude Fable 5.2) reproduced the hang, bisected it to the pair of tests and to the one copy, wrote the change, ran the suite and the regression runs on this machine, ran the suite on two Windows machines over SSH, and wrote this description.
`d32s8_targets_take_their_own_size_of_video_memory` waited for its
command list with `SetEventOnCompletion(1, NULL)`, which returns only
when the fence has the value. On a GPU that never finishes the list the
test, and with it the whole lib test binary, stays there for good.

That happens in every full lib run under Wine + vkd3d-proton on NVIDIA
(RTX 4060 Ti and RTX 4070, driver 615.71.09): once an earlier test has
drawn something, the copy of the stencil plane to the read-back buffer
faults on the GPU (kernel: Xid 31) and the queue never signals. Two
tests reproduce it, `gpu_graphics_vs_ps_draw` and then this one.

The test now waits with `gpu::fence::wait` and a limit, as
`gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` does. With that
pair of tests it fails after 10.6 s with `Timeout(10000)` and the run
goes on; before, it was still waiting after 60 s. Alone it passes as
before.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:10 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 22:09 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 22:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/1706#issuecomment-7145883630) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1706/head:github-bot/gh-1706'
git switch 'github-bot/gh-1706'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1706'
git switch 'github-bot/gh-1706'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1706'
git switch 'github-bot/gh-1706'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1706'
git switch 'main'
git merge --squash 'github-bot/gh-1706'
git switch 'main'
git merge --ff-only 'github-bot/gh-1706'
git switch 'main'
git merge 'github-bot/gh-1706'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.