D3D12.X: serialize allocator and list resets #1721

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

@⁠hajduzsolt on GitHub · 2026-11-24 19:53 UTC · original
hajduzsolt:fix/allocator-reset-serialization → main · +80 −7 · 1 files · 1 commits · open

Runtime fix verified with unit tests and RX 9070 XT smoke run.

What is in it

  • Serialize list reset and allocator reset for each title allocator, so a native allocator reset cannot race the selection and recording registration of a list. Addresses XCL-BT-013 in #1488.
  • Keep independent allocators on independent gates, without holding the pool mutex across the native list reset. Add synthetic concurrency checks for both reset directions.

Tested

  • Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT 16 GB: cargo test -p xcl --lib alloc_pool::tests -- --test-threads=2 passed (5 passed).
  • cargo test --workspace -- --test-threads=2 passed; library tests: 816 passed, 22 ignored. Other test binaries also passed. Runtime GPU skips were not individually assessed in this run.

Regression run

main:

xcl-smoke v1
commit: 6c89285b8b529bde59cd17a26b911c39912fb677
gpu: AMD Radeon RX 9070 XT
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1676 (PresentX 1676)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14839 MB

PR:

xcl-smoke v1
commit: 0c5de128ff067ca1fab3000fb9bf9ceb24ab303e
gpu: AMD Radeon RX 9070 XT
title: A newer retail game
seconds: 60
exit: 0x0
frames shown: 1680 (PresentX 1680)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14839 MB

Not tested

  • Concurrent resets against a real GPU driver; NVIDIA and Intel GPUs.

AI use

  • Codex (GPT 6.1 Terra Medium) wrote the implementation and synthetic unit tests; human review and smoke verification are pending.
**@⁠hajduzsolt** on GitHub · 2026-11-24 19:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1721) `hajduzsolt:fix/allocator-reset-serialization` → `main` · +80 −7 · 1 files · 1 commits · open Runtime fix verified with unit tests and RX 9070 XT smoke run. **What is in it** - Serialize list reset and allocator reset for each title allocator, so a native allocator reset cannot race the selection and recording registration of a list. Addresses XCL-BT-013 in #1488. - Keep independent allocators on independent gates, without holding the pool mutex across the native list reset. Add synthetic concurrency checks for both reset directions. **Tested** - Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT 16 GB: `cargo test -p xcl --lib alloc_pool::tests -- --test-threads=2` passed (5 passed). - `cargo test --workspace -- --test-threads=2` passed; library tests: 816 passed, 22 ignored. Other test binaries also passed. Runtime GPU skips were not individually assessed in this run. **Regression run** main: ``` xcl-smoke v1 commit: 6c89285b8b529bde59cd17a26b911c39912fb677 gpu: AMD Radeon RX 9070 XT title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1676 (PresentX 1676) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14839 MB ``` PR: ``` xcl-smoke v1 commit: 0c5de128ff067ca1fab3000fb9bf9ceb24ab303e gpu: AMD Radeon RX 9070 XT title: A newer retail game seconds: 60 exit: 0x0 frames shown: 1680 (PresentX 1680) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14839 MB ``` **Not tested** - Concurrent resets against a real GPU driver; NVIDIA and Intel GPUs. **AI use** - Codex (GPT 6.1 Terra Medium) wrote the implementation and synthetic unit tests; human review and smoke verification are pending.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:40 +00:00
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-24 20:38 UTC · original

NVIDIA test report for 0c5de12: full suite green, the alloc_pool tests 10 of 10, and a clean smoke pair on the retail title.

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head 0c5de128ff067ca1fab3000fb9bf9ceb24ab303e, no local changes.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug): 865 passed, 0 failed, 42 ignored. SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • cargo test -p xcl --lib alloc_pool::tests -- --test-threads=2, 10 times in a row: 5 passed, 0 failed every time.

Regression run (scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen; XCL_PSO_PRELOAD=0 for both builds, because this machine's preload list holds the program of #1307 and preloading it with b8b1f49 takes the commit past 40 GB)

base (main commit this PR is on):

xcl-smoke v1
commit: 6c89285b8b529bde59cd17a26b911c39912fb677
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1656 (PresentX 1656)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14603 MB

this PR:

xcl-smoke v1
commit: 0c5de128ff067ca1fab3000fb9bf9ceb24ab303e
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1656 (PresentX 1656)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14471 MB

Not tested: a run long enough to reach the world load (where list resets are frequent); AMD; a stress test of concurrent resets beyond the PR's own tests.

AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.

**@⁠frenziedcoder** on GitHub · 2026-11-24 20:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1721#issuecomment-7143852610) **NVIDIA test report for `0c5de12`: full suite green, the `alloc_pool` tests 10 of 10, and a clean smoke pair on the retail title.** **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head `0c5de128ff067ca1fab3000fb9bf9ceb24ab303e`, no local changes. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` (debug): **865 passed, 0 failed, 42 ignored**. SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `cargo test -p xcl --lib alloc_pool::tests -- --test-threads=2`, 10 times in a row: **5 passed, 0 failed every time**. **Regression run** (`scripts/smoke.ps1 -Seconds 60`, release, the retail title of #505 at its start screen; `XCL_PSO_PRELOAD=0` for both builds, because this machine's preload list holds the program of #1307 and preloading it with `b8b1f49` takes the commit past 40 GB) base (`main` commit this PR is on): ``` xcl-smoke v1 commit: 6c89285b8b529bde59cd17a26b911c39912fb677 gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1656 (PresentX 1656) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14603 MB ``` this PR: ``` xcl-smoke v1 commit: 0c5de128ff067ca1fab3000fb9bf9ceb24ab303e gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1656 (PresentX 1656) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14471 MB ``` **Not tested:** a run long enough to reach the world load (where list resets are frequent); AMD; a stress test of concurrent resets beyond the PR's own tests. *AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.*
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 22:28 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 22:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1721#issuecomment-7146279694) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:56 UTC · original

PR #1721 — D3D12.X allocator and command-list reset verification

Tested clean detached head 0c5de128ff on STOR-WINLAB. Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave lanes 8–32, DoublePrecisionFloatShaderOps=0). DXC/DXIL 1.9.2609.5, rustc 1.100.0 (0ef1bc386 2026-11-09), unoptimized profiles with debug info disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded. All Cargo test commands, including the compile-only invocation, used the shared Arc lock through Invoke-ArcTest.ps1.
  • cargo test -p xcl alloc_pool::tests -- --nocapture passed all 5 tests. The two new unit tests checked the per-allocator lock during native allocator fallback and list reset, independent locking for another allocator, and recording tracking after success. The existing GPU case submitted a recording again after allocator reset, completed queue fences without device removal, and checked backing reuse.
  • cargo test -p xcl reset_commits_state_only_after_native_success_and_always_restores_vtable -- --nocapture passed 1 test. Both focused runs had 0 failures, 0 ignored, and 0 SKIPPED lines.

Full workspace

cargo test --workspace --no-fail-fast -- --test-threads=4 exited 101. Across 20 libtest summaries, 847 passed, 18 failed, 42 ignored. The log contains 3 SKIPPED lines (2 no wave64, 1 no heap windows). Those tests are included in Cargo's pass total and provide no coverage for the skipped paths. All six focused tests passed again.

  • 17 GPU library failures. 13 compute PSO creations returned E_INVALIDARG (0x80070057), including FP64 cases. Four output mismatches covered fused FMA overflow, FP16 high-half preservation, pixel-shader mip LOD, and split-wave64 pixel reductions.
  • 1 test-title e2e failure. The RSSetDepthBiasX check (#94) read blue where it expected green.

Not tested

Main baseline or retail-title smoke comparison, external game samples, other adapters, and D3D12 debug-layer validation (d3d12SDKLayers.dll absent). This run does not establish whether the suite failures also occur on main.

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 pr1721-suite.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1721#issuecomment-7152379462) # PR #1721 — D3D12.X allocator and command-list reset verification Tested clean detached head 0c5de128ff067ca1fab3000fb9bf9ceb24ab303e on STOR-WINLAB. Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave lanes 8–32, DoublePrecisionFloatShaderOps=0). DXC/DXIL 1.9.2609.5, rustc 1.100.0 (0ef1bc386 2026-11-09), unoptimized profiles with debug info disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded. All Cargo test commands, including the compile-only invocation, used the shared Arc lock through `Invoke-ArcTest.ps1`. - `cargo test -p xcl alloc_pool::tests -- --nocapture` passed all 5 tests. The two new unit tests checked the per-allocator lock during native allocator fallback and list reset, independent locking for another allocator, and recording tracking after success. The existing GPU case submitted a recording again after allocator reset, completed queue fences without device removal, and checked backing reuse. - `cargo test -p xcl reset_commits_state_only_after_native_success_and_always_restores_vtable -- --nocapture` passed 1 test. Both focused runs had 0 failures, 0 ignored, and 0 `SKIPPED` lines. **Full workspace** `cargo test --workspace --no-fail-fast -- --test-threads=4` exited 101. Across 20 libtest summaries, **847 passed, 18 failed, 42 ignored**. The log contains **3 `SKIPPED` lines** (2 no wave64, 1 no heap windows). Those tests are included in Cargo's pass total and provide no coverage for the skipped paths. All six focused tests passed again. - 17 GPU library failures. 13 compute PSO creations returned E_INVALIDARG (0x80070057), including FP64 cases. Four output mismatches covered fused FMA overflow, FP16 high-half preservation, pixel-shader mip LOD, and split-wave64 pixel reductions. - 1 test-title e2e failure. The RSSetDepthBiasX check (#94) read blue where it expected green. **Not tested** Main baseline or retail-title smoke comparison, external game samples, other adapters, and D3D12 debug-layer validation (d3d12SDKLayers.dll absent). This run does not establish whether the suite failures also occur on main. **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 `pr1721-suite.log` and published.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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