Tests: skip low-VRAM test before taking VRAM_TEST_LOCK (#42) #1251

Closed
github-bot wants to merge 12 commits from gh-pr/1251/head into gh-pr/1251/base
Owner

@⁠WASDeKeys on GitHub · 2026-11-24 13:44 UTC · original
WASDeKeys:main → main · +5 −1 · 1 files · 12 commits · closed without merging

Skips d32s8_targets_take_their_own_size_of_video_memory on adapters with under 8 GB of dedicated video memory before acquiring VRAM_TEST_LOCK. Prevents VRAM exhaustion (0x8007000E / E_OUTOFMEMORY) during concurrent test runs on <= 6 GB cards, which previously panicked while holding the mutex and poisoned subsequent VRAM tests. Fixes #42.

What is in it

  • crates/xcl/src/hle/d3d12x/vram.rs: query DXGI DedicatedVideoMemory and call runner::skip_test("< 8 GB VRAM") before acquiring VRAM_TEST_LOCK when under 8 GB.

Tested

  • Hardware: NVIDIA GeForce RTX 3050 6GB Laptop GPU (driver 32.0.15.9597), AMD Ryzen 5 7235HS, Microsoft Windows NT 10.0.26200.0, rustc 1.100.0 (0ef1bc386 2026-11-09), debug (cargo test) and release (cargo build --release -p xcl).
  • cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture: 1 passed, 0 failed, 0 ignored (863 filtered out); cleanly skips with SKIPPED hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory: < 8 GB VRAM in 0.02 s.
  • cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 41 ignored; SKIPPED GPU tests: 2 no wave64 (gpu::recomp::tests), 1 < 8 GB VRAM (hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory).
  • Also verified on a 4 GB NVIDIA GeForce GTX 1650 SUPER by @⁠towiice.
  • Zero new compiler warnings (only the 2 pre-existing fetch_update deprecation warnings in real.rs and xgameruntime/mod.rs).

Regression run

xcl-smoke v1
commit: e9e94ce665d16bb0e2d2e4cb6b37e149f0d27721
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: d5605821
seconds: 60
exit: 0x0
frames shown: 3197 (PresentX 3198)
presents per 2 s (last 3): 120 119 118
device removals: 0
crashes: 0
peak commit: 7658 MB

xcl-smoke v1
commit: 03c5affe2094c29b7e648f600776245a5d9e070f
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: d5605821
seconds: 60
exit: 0x0
frames shown: 3387 (PresentX 3387)
presents per 2 s (last 3): 119 118 120
device removals: 0
crashes: 0
peak commit: 7660 MB

Not tested

  • Adapters with >= 8 GB VRAM (tested on main and with this PR by @⁠AlexandreSchuelter on an RX 6900 XT 16 GB), non-Windows hosts (unsupported), and XCL_SAMPLE_* retail test inputs.

AI use

  • Antigravity IDE (Claude 3.5 Sonnet): diagnosed the VRAM exhaustion and lock poison, ran smoke runs, and wrote this PR description.
**@⁠WASDeKeys** on GitHub · 2026-11-24 13:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/1251) `WASDeKeys:main` → `main` · +5 −1 · 1 files · 12 commits · closed without merging Skips `d32s8_targets_take_their_own_size_of_video_memory` on adapters with under 8 GB of dedicated video memory before acquiring `VRAM_TEST_LOCK`. Prevents VRAM exhaustion (`0x8007000E` / `E_OUTOFMEMORY`) during concurrent test runs on <= 6 GB cards, which previously panicked while holding the mutex and poisoned subsequent VRAM tests. Fixes #42. **What is in it** - `crates/xcl/src/hle/d3d12x/vram.rs`: query DXGI `DedicatedVideoMemory` and call `runner::skip_test("< 8 GB VRAM")` before acquiring `VRAM_TEST_LOCK` when under 8 GB. **Tested** - Hardware: NVIDIA GeForce RTX 3050 6GB Laptop GPU (driver `32.0.15.9597`), AMD Ryzen 5 7235HS, Microsoft Windows NT 10.0.26200.0, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug (`cargo test`) and release (`cargo build --release -p xcl`). - `cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture`: 1 passed, 0 failed, 0 ignored (863 filtered out); cleanly skips with `SKIPPED hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory: < 8 GB VRAM` in 0.02 s. - `cargo test --workspace -- --test-threads=4`: 751 passed, 0 failed, 41 ignored; `SKIPPED` GPU tests: 2 `no wave64` (`gpu::recomp::tests`), 1 `< 8 GB VRAM` (`hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory`). - Also verified on a 4 GB NVIDIA GeForce GTX 1650 SUPER by @⁠towiice. - Zero new compiler warnings (only the 2 pre-existing `fetch_update` deprecation warnings in `real.rs` and `xgameruntime/mod.rs`). **Regression run** ``` xcl-smoke v1 commit: e9e94ce665d16bb0e2d2e4cb6b37e149f0d27721 gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU title: d5605821 seconds: 60 exit: 0x0 frames shown: 3197 (PresentX 3198) presents per 2 s (last 3): 120 119 118 device removals: 0 crashes: 0 peak commit: 7658 MB xcl-smoke v1 commit: 03c5affe2094c29b7e648f600776245a5d9e070f gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU title: d5605821 seconds: 60 exit: 0x0 frames shown: 3387 (PresentX 3387) presents per 2 s (last 3): 119 118 120 device removals: 0 crashes: 0 peak commit: 7660 MB ``` **Not tested** - Adapters with >= 8 GB VRAM (tested on main and with this PR by @⁠AlexandreSchuelter on an RX 6900 XT 16 GB), non-Windows hosts (unsupported), and `XCL_SAMPLE_*` retail test inputs. **AI use** - Antigravity IDE (Claude 3.5 Sonnet): diagnosed the VRAM exhaustion and lock poison, ran smoke runs, and wrote this PR description.
Under `--test-threads=4`, the full test suite exhausted VRAM (0x8007000E) on
a 6 GB GPU when `d32s8_targets_take_their_own_size_of_video_memory` placed
14 4K D32S8 targets (~935 MB) concurrently with other GPU tests. The
mutex poison from that failure then cascaded into title_textures tests.
All tests pass at `--test-threads=1` and `--test-threads=2`.

Check the adapter's dedicated video memory and call `skip_test("< 8 GB VRAM")`
when under 8 GiB so the suite completes cleanly on 6 GB and smaller adapters.

Fixes #42
Assisted by : Antigravity IDE (Claude Sonnet 4.6)
Move the `< 8 GB VRAM` skip check before acquiring `VRAM_TEST_LOCK`.
On GPUs under 8 GiB, the test now skips immediately without contending for
or risking poisoning from `VRAM_TEST_LOCK`.

Fixes #42
Assisted by : Antigravity IDE (Claude Sonnet 4.6)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:48:30 +00:00
github-bot closed this pull request 2026-11-26 04:48:30 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 14:02 UTC · original

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

  • cargo test -p xcl --lib lib recomp: 189 passed, 0 failed.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 14:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1251#issuecomment-7133735030) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - cargo test -p xcl --lib lib recomp: 189 passed, 0 failed. Thanks!
Author
Owner

@⁠WASDeKeys on GitHub · 2026-11-24 17:52 UTC · original

please merge this? @⁠ivall

**@⁠WASDeKeys** on GitHub · 2026-11-24 17:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/1251#issuecomment-7139823279) please merge this? @⁠ivall
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 04:32 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 04:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1251#issuecomment-7182685876) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.