D3D12.X: skip d32s8 VRAM test on adapters with under 8 GB of video me… #1859

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

@⁠WASDeKeys on GitHub · 2026-11-24 22:02 UTC · original
WASDeKeys:fix/vram-skip-under-8gb → main · +5 −1 · 1 files · 1 commits · open

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: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: d5605821
seconds: 60
exit: 0x0
frames shown: 1725 (PresentX 1728)
presents per 2 s (last 3): 39 37 39
device removals: 0
crashes: 0
peak commit: 7654 MB
xcl-smoke v1
commit: e0b02000c97d210d01da17c9d7d0fe3113651fc6
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: d5605821
seconds: 60
exit: 0x0
frames shown: 1742 (PresentX 1745)
presents per 2 s (last 3): 34 40 37
device removals: 0
crashes: 0
peak commit: 7656 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, drafted the skip placement, ran builds, tests, and smoke runs, and wrote this PR description.
**@⁠WASDeKeys** on GitHub · 2026-11-24 22:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1859) `WASDeKeys:fix/vram-skip-under-8gb` → `main` · +5 −1 · 1 files · 1 commits · open 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: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331 gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU title: d5605821 seconds: 60 exit: 0x0 frames shown: 1725 (PresentX 1728) presents per 2 s (last 3): 39 37 39 device removals: 0 crashes: 0 peak commit: 7654 MB ``` ``` xcl-smoke v1 commit: e0b02000c97d210d01da17c9d7d0fe3113651fc6 gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU title: d5605821 seconds: 60 exit: 0x0 frames shown: 1742 (PresentX 1745) presents per 2 s (last 3): 34 40 37 device removals: 0 crashes: 0 peak commit: 7656 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, drafted the skip placement, ran builds, tests, and smoke runs, and wrote this PR description.
d32s8_targets_take_their_own_size_of_video_memory allocates ~935 MB of depth-stencil targets. Under --test-threads=4, concurrent GPU tests on adapters with <= 6 GB of VRAM exhaust video memory, causing CreateCommittedResource to fail with 0x8007000E (E_OUTOFMEMORY). Panicking while holding VRAM_TEST_LOCK then poisoned the mutex, causing cascading failures in subsequent VRAM tests.

Query DXGI DedicatedVideoMemory and skip before acquiring VRAM_TEST_LOCK when under 8 GB so low-VRAM cards skip cleanly without lock contention or poison.

Fixes #42.

Assisted-by: Antigravity IDE (Claude 3.5 Sonnet)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:07:29 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 22:42 UTC · original · edited 2026-11-24 22:50 UTC

Full-suite run, since this PR has no test report yet. Tested exact head e0b0200 (on its base 1d027e5).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: 954 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 959 passed, 0 failed, 43 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • On NVIDIA, --skip leaves out five tests where this PR's base has them. They fail on main 689f2db too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. These are heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 22:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/1859#issuecomment-7146555457) · edited 2026-11-24 22:50 UTC Full-suite run, since this PR has no test report yet. Tested exact head `e0b0200` (on its base `1d027e5`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu`: **954 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - No new `#[test]` functions in the diff. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **959 passed, 0 failed, 43 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - On NVIDIA, `--skip` leaves out five tests where this PR's base has them. They fail on main `689f2db` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. These are `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 01:28 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 01:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1859#issuecomment-7149594474) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:14 UTC · original

XCL PR #1859 — STOR-WINLAB verification

Clean detached head e0b02000c97d210d01da17c9d7d0fe3113651fc6 at start and finish. The only changed file is crates/xcl/src/hle/d3d12x/vram.rs. The D32S8 test adds an inline 8 GiB guard before taking the VRAM lock.

Windows 11 x64 (10.0.26200.9974), Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Unoptimized slot-4 builds with incremental compilation and debug info disabled.

Tested

  • Outside the Arc mutex, cargo build --workspace and cargo test --workspace --no-run both exited 0.
  • Outside the mutex with XCL_ADAPTER=NONE_CPU_ONLY, cargo test -p xcl --lib -- tile_ranges_per_heap tile_pool_keeps_churned_allocations_in_single_heap_and_contiguous idle_pages_are_swept_from_their_queue owned_pages_never_alias_disjoint_ranges reserved_needs_tiled_format_and_tiled_msaa an_arena_is_shared_at_its_addresses_and_otherwise_its_placements_size an_arena_no_resource_uses_goes_after_two_seconds reported 7 passed, 0 failed, 0 ignored, 0 explicit skips. These tests do not cover the cutoff.
  • Inside Invoke-ArcTest.ps1 with XCL_ADAPTER=A770, cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture reported 1 passed, 0 failed, 0 ignored, 0 explicit skips. A probe confirmed DXGI adapter 0 has 17,047,748,608 dedicated bytes and creates a D3D12 device with Resource Heap Tier 1. The VRAM guard lets that adapter through, then the existing Tier 2 requirement causes a silent return before allocations in both runs.
  • One mutex-protected A770 run of cargo test --workspace --no-fail-fast -- --test-threads=4 (exit 101) reported 940 passed, 19 failed, 43 ignored across 19 binaries plus doc tests, from all 20 result lines in pr1859-suite.log.

Workspace failures and skips

18 GPU library failures (14 compute pipeline creation errors, 4 assertion mismatches) and 1 title e2e failure (dynamic depth bias). The log has 25 lines starting with SKIPPED . Those cases provide no coverage.

Not tested

STOR-WINLAB had no GPU below 8 GiB, and the PR has no CPU test for that branch. D32S8 allocations need a Tier 2 adapter. No matched main run or retail title run.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1859-suite.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1859#issuecomment-7152667895) # XCL PR #1859 — STOR-WINLAB verification Clean detached head `e0b02000c97d210d01da17c9d7d0fe3113651fc6` at start and finish. The only changed file is `crates/xcl/src/hle/d3d12x/vram.rs`. The D32S8 test adds an inline 8 GiB guard before taking the VRAM lock. Windows 11 x64 (10.0.26200.9974), Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Unoptimized slot-4 builds with incremental compilation and debug info disabled. **Tested** - Outside the Arc mutex, `cargo build --workspace` and `cargo test --workspace --no-run` both exited 0. - Outside the mutex with `XCL_ADAPTER=NONE_CPU_ONLY`, `cargo test -p xcl --lib -- tile_ranges_per_heap tile_pool_keeps_churned_allocations_in_single_heap_and_contiguous idle_pages_are_swept_from_their_queue owned_pages_never_alias_disjoint_ranges reserved_needs_tiled_format_and_tiled_msaa an_arena_is_shared_at_its_addresses_and_otherwise_its_placements_size an_arena_no_resource_uses_goes_after_two_seconds` reported 7 passed, 0 failed, 0 ignored, 0 explicit skips. These tests do not cover the cutoff. - Inside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770`, `cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture` reported 1 passed, 0 failed, 0 ignored, 0 explicit skips. A probe confirmed DXGI adapter 0 has 17,047,748,608 dedicated bytes and creates a D3D12 device with Resource Heap Tier 1. The VRAM guard lets that adapter through, then the existing Tier 2 requirement causes a silent return before allocations in both runs. - One mutex-protected A770 run of `cargo test --workspace --no-fail-fast -- --test-threads=4` (exit 101) reported 940 passed, 19 failed, 43 ignored across 19 binaries plus doc tests, from all 20 result lines in `pr1859-suite.log`. **Workspace failures and skips** 18 GPU library failures (14 compute pipeline creation errors, 4 assertion mismatches) and 1 title e2e failure (dynamic depth bias). The log has 25 lines starting with `SKIPPED `. Those cases provide no coverage. **Not tested** STOR-WINLAB had no GPU below 8 GiB, and the PR has no CPU test for that branch. D32S8 allocations need a Tier 2 adapter. No matched main run or retail title run. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1859-suite.log` and published.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/vram.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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