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

Closed
WASDeKeys wants to merge 5 commits from upstream-pr/1089 into main
WASDeKeys commented 2026-11-24 11:27:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WASDeKeys on 2026-11-24T11:27:40Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:6580736399 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1089). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-24T11:27:40Z. --- **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.
towiice commented 2026-11-24 12:05:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T11:43:38Z.

Review: COMMENTED


Tested:

  • Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB / 3930 MiB DedicatedVideoMemory, driver 610.88), Windows 11 x64 (26H2 / 10.0.26300), toolchain stable-x86_64-pc-windows-gnullvm (llvm-mingw 23.1.6).
  • Test command: cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture
  • Result:
    SKIPPED hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory: < 8 GB VRAM
    test hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory ... ok
    

Cleanly detects dedicated video memory under 8 GiB on 4 GB GPUs and routes the skip through runner::skip_test("< 8 GB VRAM"), preventing VRAM exhaustion during concurrent test execution.

<!-- greyfinch-sync:ivall/xcl:review:6038577151 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1089#pullrequestreview-6038577151). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T11:43:38Z. **Review:** COMMENTED --- **Tested:** - Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB / 3930 MiB DedicatedVideoMemory, driver 610.88), Windows 11 x64 (26H2 / 10.0.26300), toolchain `stable-x86_64-pc-windows-gnullvm` (llvm-mingw 23.1.6). - Test command: `cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture` - Result: ``` SKIPPED hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory: < 8 GB VRAM test hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory ... ok ``` Cleanly detects dedicated video memory under 8 GiB on 4 GB GPUs and routes the skip through `runner::skip_test("< 8 GB VRAM")`, preventing VRAM exhaustion during concurrent test execution.
AlexandreSchuelter commented 2026-11-24 12:05:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AlexandreSchuelter on 2026-11-24T11:41:13Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7130416535 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1089#issuecomment-7130416535). Originally posted by [AlexandreSchuelter](https://github.com/AlexandreSchuelter) on 2026-11-24T11:41:13Z. --- 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.
upstream-sync closed this pull request 2026-11-24 13:02:57 +00:00
WASDeKeys commented 2026-11-24 13:03:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WASDeKeys on 2026-11-24T12:08:42Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7131027187 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1089#issuecomment-7131027187). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-24T12:08:42Z. --- 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.
AlexandreSchuelter commented 2026-11-24 13:03:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AlexandreSchuelter on 2026-11-24T12:57:36Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7132152308 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1089#issuecomment-7132152308). Originally posted by [AlexandreSchuelter](https://github.com/AlexandreSchuelter) on 2026-11-24T12:57:36Z. --- 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.
WASDeKeys commented 2026-11-24 14:06:42 +00:00 (Migrated from github.com)

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


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

<!-- greyfinch-sync:ivall/xcl:comment:7132841452 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1089#issuecomment-7132841452). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-24T13:26:50Z. --- 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

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!1080
No description provided.