Skip d32s8_targets_take_their_own_size_of_video_memory on adapters with under 8 GB of dedicated video memory. Fixes #42. #1089

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

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

What is in it

  • crates/xcl/src/hle/d3d12x/vram.rs: check DedicatedVideoMemory and call skip_test("< 8 GB VRAM") if under 8 GiB.

Tested

  • NVIDIA GeForce RTX 3050 6GB Laptop GPU (driver 595.97, 6144 MiB), AMD64 CPU, Windows 11 x64 (build 26200), rustc 1.100.0 (MSVC x64, debug).
  • cargo test --workspace -- --test-threads=4: 697 passed, 0 failed, 33 ignored.
  • SKIPPED GPU tests on this adapter: d32s8_targets_take_their_own_size_of_video_memory: < 8 GB VRAM.

@⁠ivall Could you please add the 'test-only' label to waive the 'smoke.ps1' check for this unit test fix? thanks

Regression run
Test-only diff (touches only #[cfg(test)] mod tests in crates/xcl/src/hle/d3d12x/vram.rs). Requesting the test-only label per CONTRIBUTING.md.

Not tested

  • Retail game runtime changes (test-only change in unit tests).

AI use

  • Antigravity IDE (Claude Sonnet 4.6): analyzed VRAM allocation concurrency across thread counts and wrote the skip guard.
**@⁠WASDeKeys** on GitHub · 2026-11-24 11:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/1089) `WASDeKeys:main` → `main` · +5 −1 · 1 files · 5 commits · closed without merging **What is in it** - `crates/xcl/src/hle/d3d12x/vram.rs`: check `DedicatedVideoMemory` and call `skip_test("< 8 GB VRAM")` if under 8 GiB. **Tested** - NVIDIA GeForce RTX 3050 6GB Laptop GPU (driver 595.97, 6144 MiB), AMD64 CPU, Windows 11 x64 (build 26200), rustc 1.100.0 (MSVC x64, debug). - `cargo test --workspace -- --test-threads=4`: 697 passed, 0 failed, 33 ignored. - SKIPPED GPU tests on this adapter: `d32s8_targets_take_their_own_size_of_video_memory: < 8 GB VRAM`. @⁠ivall Could you please add the 'test-only' label to waive the 'smoke.ps1' check for this unit test fix? thanks **Regression run** Test-only diff (touches only `#[cfg(test)] mod tests` in `crates/xcl/src/hle/d3d12x/vram.rs`). Requesting the `test-only` label per CONTRIBUTING.md. **Not tested** - Retail game runtime changes (test-only change in unit tests). **AI use** - Antigravity IDE (Claude Sonnet 4.6): analyzed VRAM allocation concurrency across thread counts and wrote the skip guard.
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:43:02 +00:00
github-bot closed this pull request 2026-11-26 04:43:02 +00:00
Author
Owner

@⁠AlexandreSchuelter on GitHub · 2026-11-24 11:41 UTC · original

A data point and a question: on a 16 GB card this test also fails in full runs, but not for lack of VRAM.

On an RX 6900 XT (16 GB, RDNA2), main 47efa2e, cargo test -p xcl --lib -- --test-threads=4, debug:

  • d32s8_targets_take_their_own_size_of_video_memory fails with PoisonError at vram.rs:935:49, the VRAM_TEST_LOCK.lock().unwrap(), after the RDNA2 packed-mip panic in placed_title_textures_share_vram_and_preserve_pixels poisons that lock (the cascade #673 is about).
  • Run alone, it passes: 5/5 on main.
  • With this PR merged (3925533) the same full run gives the same 3 failures, which is expected here since the card has more than 8 GB.

The new check runs after VRAM_TEST_LOCK.lock().unwrap(), so on a card where the failure is this cascade, the skip is never reached. Could you post the panic message from the RTX 3050 6 GB run on main, and whether the test also fails there when run alone? If it is a real out-of-memory failure, the skip makes sense; if it is the PoisonError, #673 is the fix.

Not tested: a card under 8 GB (the skip path itself).

AI use: Claude Code (Claude Opus 5.5) ran the tests, read the diff and wrote this comment; I checked the points above against the code and the run output.

**@⁠AlexandreSchuelter** on GitHub · 2026-11-24 11:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1089#issuecomment-7130416535) A data point and a question: on a 16 GB card this test also fails in full runs, but not for lack of VRAM. On an RX 6900 XT (16 GB, RDNA2), `main` `47efa2e`, `cargo test -p xcl --lib -- --test-threads=4`, debug: - `d32s8_targets_take_their_own_size_of_video_memory` fails with `PoisonError` at `vram.rs:935:49`, the `VRAM_TEST_LOCK.lock().unwrap()`, after the RDNA2 packed-mip panic in `placed_title_textures_share_vram_and_preserve_pixels` poisons that lock (the cascade #673 is about). - Run alone, it passes: 5/5 on `main`. - With this PR merged (`3925533`) the same full run gives the same 3 failures, which is expected here since the card has more than 8 GB. The new check runs after `VRAM_TEST_LOCK.lock().unwrap()`, so on a card where the failure is this cascade, the skip is never reached. Could you post the panic message from the RTX 3050 6 GB run on `main`, and whether the test also fails there when run alone? If it is a real out-of-memory failure, the skip makes sense; if it is the `PoisonError`, #673 is the fix. Not tested: a card under 8 GB (the skip path itself). AI use: Claude Code (Claude Opus 5.5) ran the tests, read the diff and wrote this comment; I checked the points above against the code and the run output.
Author
Owner

@⁠WASDeKeys on GitHub · 2026-11-24 12:08 UTC · original · edited 2026-11-24 12:14 UTC

Thanks @⁠towiice for confirming on the 4 GB GTX 1650 SUPER

@⁠AlexandreSchuelter to answer your questions for the RTX 3050 6 GB Laptop GPU:

  1. Alone: All tests pass in isolation (13/13 in title_textures and 9/9 in vram).
  2. Failure on main: Under --test-threads=4, the failure on this 6 GB card was a flood of 0x8007000E (E_OUTOFMEMORY) errors when d32s8_targets_take_their_own_size_of_video_memory allocated 14 4K depth-stencil targets (~935 MB) concurrently with the rest of the suite. That OOM panic held VRAM_TEST_LOCK, which then caused the subsequent tests to fail on mutex poison.
  3. Verification: With this < 8 GB VRAM skip guard active, the entire workspace test suite under --test-threads=4 passes completely clean: 685 passed, 0 failed, 21 ignored (no crashes, no lock poisoning).

your point about checking before VRAM_TEST_LOCK is spot on. I'll push an update moving the DXGI adapter VRAM query before acquiring VRAM_TEST_LOCK, so low-VRAM GPUs skip cleanly without touching the mutex.

**@⁠WASDeKeys** on GitHub · 2026-11-24 12:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/1089#issuecomment-7131027187) · edited 2026-11-24 12:14 UTC Thanks @⁠towiice for confirming on the 4 GB GTX 1650 SUPER @⁠AlexandreSchuelter to answer your questions for the RTX 3050 6 GB Laptop GPU: 1. **Alone:** All tests pass in isolation (13/13 in `title_textures` and 9/9 in `vram`). 2. **Failure on main:** Under `--test-threads=4`, the failure on this 6 GB card was a flood of `0x8007000E` (`E_OUTOFMEMORY`) errors when `d32s8_targets_take_their_own_size_of_video_memory` allocated 14 4K depth-stencil targets (~935 MB) concurrently with the rest of the suite. That OOM panic held `VRAM_TEST_LOCK`, which then caused the subsequent tests to fail on mutex poison. 3. **Verification:** With this `< 8 GB VRAM` skip guard active, the entire workspace test suite under `--test-threads=4` passes completely clean: **685 passed, 0 failed, 21 ignored** (no crashes, no lock poisoning). your point about checking before `VRAM_TEST_LOCK` is spot on. I'll push an update moving the DXGI adapter VRAM query before acquiring `VRAM_TEST_LOCK`, so low-VRAM GPUs skip cleanly without touching the mutex.
Author
Owner

@⁠AlexandreSchuelter on GitHub · 2026-11-24 12:57 UTC · original

Thanks, 1bfd1f7 addresses it: the VRAM query now runs before VRAM_TEST_LOCK is taken, so a small card skips without touching the lock. On the RX 6900 XT (16 GB) the test still runs and passes at 1bfd1f7 (cargo test -p xcl --lib -- d32s8_targets_take_their_own_size_of_video_memory: 1 passed, not SKIPPED).

AI use: Claude Code (Claude Opus 5.5) read the diff, ran the test and wrote this comment.

**@⁠AlexandreSchuelter** on GitHub · 2026-11-24 12:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1089#issuecomment-7132152308) Thanks, `1bfd1f7` addresses it: the VRAM query now runs before `VRAM_TEST_LOCK` is taken, so a small card skips without touching the lock. On the RX 6900 XT (16 GB) the test still runs and passes at `1bfd1f7` (`cargo test -p xcl --lib -- d32s8_targets_take_their_own_size_of_video_memory`: 1 passed, not SKIPPED). AI use: Claude Code (Claude Opus 5.5) read the diff, ran the test and wrote this comment.
Author
Owner

@⁠WASDeKeys on GitHub · 2026-11-24 13:26 UTC · original · edited 2026-11-24 13:48 UTC

So 1bfd1f7 is a valid commit? if yes, could you let me know how i can get my pull request approved? i cannot figure out the smoke.ps1 thing since i dont have an authorised Xbox GDK title build? any help maintainers? @⁠ivall

@⁠AlexandreSchuelter

**@⁠WASDeKeys** on GitHub · 2026-11-24 13:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/1089#issuecomment-7132841452) · edited 2026-11-24 13:48 UTC So 1bfd1f7 is a valid commit? if yes, could you let me know how i can get my pull request approved? i cannot figure out the smoke.ps1 thing since i dont have an authorised Xbox GDK title build? any help maintainers? @⁠ivall @⁠AlexandreSchuelter

Pull request closed

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