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

Closed
WASDeKeys wants to merge 12 commits from upstream-pr/1251 into main
WASDeKeys commented 2026-11-24 13:44:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WASDeKeys on 2026-11-24T13:44:28Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:6583175571 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1251). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-24T13:44:28Z. --- 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.
DavidM1911 commented 2026-11-24 14:06:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T14:02:17Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7133735030 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1251#issuecomment-7133735030). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T14:02:17Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - cargo test -p xcl --lib lib recomp: 189 passed, 0 failed. Thanks!
WASDeKeys commented 2026-11-24 18:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WASDeKeys on 2026-11-24T17:52:14Z.


please merge this? @ivall

<!-- greyfinch-sync:ivall/xcl:comment:7139823279 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1251#issuecomment-7139823279). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-24T17:52:14Z. --- please merge this? @ivall
upstream-sync closed this pull request 2026-11-24 22:04:16 +00:00
DavidM1911 commented 2026-11-26 05:05:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T04:32:35Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7182685876 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1251#issuecomment-7182685876). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T04:32:35Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1241
No description provided.