D3D12.X: reserve split compute scratch before allocating it #2522

Open
razormontana wants to merge 1 commit from upstream-pr/2532 into main
razormontana commented 2026-11-25 21:47:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by razormontana on 2026-11-25T21:47:39Z.


Two command lists could both ask D3D12 for 256 MiB of split-compute scratch under a shared 384 MiB budget. Each recording checked the available space before either driver allocation had returned. XCL now reserves a recording’s allowance when it chooses the buffer size. Part of #1833.

What is in it

  • A reservation in real/dispatch_chain.rs covers the allocation in progress and then the buffer’s lifetime. An allocation failure immediately returns the reservation. Live and peak scratch counters still measure successful allocations.
  • The configured minimum per recording remains available when the shared budget is full. The README documents the default and that exception.
  • The patch applies cleanly to main at 6d12f58. #2469 covers reusing a recording’s existing buffer after a failed growth request. The two patches conflict in scratch_for, and #2469 already has a separate test hunk that overlaps with #2118 on main.

Tested

  • Windows 11 Pro build 22631, Intel Core i7-10700K, GeForce RTX 3070 8 GB (driver 617.42), Rust 1.100.0 stable MSVC x64 and Windows SDK DXC. Exact head bb33ceed26be32dba18b4799d0b6396649bed840. The focused admission tests run on the CPU.
  • cargo +stable-x86_64-pc-windows-msvc test --offline --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests:: -- --nocapture --test-threads=1 --skip a_list_recorded_after_another_goes_on_in_its_scratch. The original charge-after-allocation behavior with the test seam produced 1 pass and 2 failures. Concurrent recordings each requested 256 MiB and an in-progress 16 MiB allocation counted as zero. After the fix, 3 passed, 0 failed, 0 ignored and 0 runtime skips. The concurrent requests were 256 and 128 MiB.
  • cargo build --offline --locked --workspace and cargo build --offline --locked --release --workspace succeeded. The debug cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output run with XCL_ADAPTER=3070 reported 1,425 passed, 0 failed and 46 ignored across 37 targets. The pass count includes 26 SKIPPED notices (21 native-wave64 checks, 3 unsupported per-lane forms, 1 reserved cube with mips and 1 heap-window check).

Regression run

Both clean release builds ran scripts/smoke.ps1 -Game <folder> -Seconds 60 on the same retail title in the Series S profile on the RTX 3070. They used XCL_DIRECT_DXIL=1, networking off and identical starting copies of XCL's warmed cache. NVIDIA's driver cache settings were left at their defaults.

Main

xcl-smoke v1
commit: 6d12f58a229bc73889878a448c64dc3af25eeba0
gpu: NVIDIA GeForce RTX 3070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 651 (PresentX 651)
presents per 2 s (last 3): 8 0 15
device removals: 0
crashes: 0
peak commit: 14469 MB

Candidate

xcl-smoke v1
commit: bb33ceed26be32dba18b4799d0b6396649bed840
gpu: NVIDIA GeForce RTX 3070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 778 (PresentX 778)
presents per 2 s (last 3): 0 0 22
device removals: 0
crashes: 0
peak commit: 14463 MB

Not tested

Both retail smoke logs reported zero chained dispatches and 0 MiB peak split scratch. The concurrent-admission case is covered by the synthetic test. Retail prevalence, effect on NVIDIA device removals, and behavior on AMD and Intel GPUs remain unmeasured.

AI use

OpenAI Codex (GPT-6.2 Astra) inspected the recording path, wrote the code and tests, ran the focused tests and drafted this description. OpenAI Codex (GPT-6.2 Sol) independently reviewed the diff and evidence and edited this description. The lead agent ran the workspace suite and retail smoke using OpenAI Codex (GPT-6.2).

<!-- greyfinch-sync:ivall/xcl:issue:5499733124 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532). Originally posted by [razormontana](https://github.com/razormontana) on 2026-11-25T21:47:39Z. --- Two command lists could both ask D3D12 for 256 MiB of split-compute scratch under a shared 384 MiB budget. Each recording checked the available space before either driver allocation had returned. XCL now reserves a recording’s allowance when it chooses the buffer size. Part of #1833. **What is in it** - A reservation in `real/dispatch_chain.rs` covers the allocation in progress and then the buffer’s lifetime. An allocation failure immediately returns the reservation. Live and peak scratch counters still measure successful allocations. - The configured minimum per recording remains available when the shared budget is full. The README documents the default and that exception. - The patch applies cleanly to `main` at `6d12f58`. #2469 covers reusing a recording’s existing buffer after a failed growth request. The two patches conflict in `scratch_for`, and #2469 already has a separate test hunk that overlaps with #2118 on `main`. **Tested** - Windows 11 Pro build 22631, Intel Core i7-10700K, GeForce RTX 3070 8 GB (driver 617.42), Rust 1.100.0 stable MSVC x64 and Windows SDK DXC. Exact head `bb33ceed26be32dba18b4799d0b6396649bed840`. The focused admission tests run on the CPU. - `cargo +stable-x86_64-pc-windows-msvc test --offline --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests:: -- --nocapture --test-threads=1 --skip a_list_recorded_after_another_goes_on_in_its_scratch`. The original charge-after-allocation behavior with the test seam produced 1 pass and 2 failures. Concurrent recordings each requested 256 MiB and an in-progress 16 MiB allocation counted as zero. After the fix, 3 passed, 0 failed, 0 ignored and 0 runtime skips. The concurrent requests were 256 and 128 MiB. - `cargo build --offline --locked --workspace` and `cargo build --offline --locked --release --workspace` succeeded. The debug `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output` run with `XCL_ADAPTER=3070` reported 1,425 passed, 0 failed and 46 ignored across 37 targets. The pass count includes 26 `SKIPPED` notices (21 native-wave64 checks, 3 unsupported per-lane forms, 1 reserved cube with mips and 1 heap-window check). **Regression run** Both clean release builds ran `scripts/smoke.ps1 -Game <folder> -Seconds 60` on the same retail title in the Series S profile on the RTX 3070. They used `XCL_DIRECT_DXIL=1`, networking off and identical starting copies of XCL's warmed cache. NVIDIA's driver cache settings were left at their defaults. Main ``` xcl-smoke v1 commit: 6d12f58a229bc73889878a448c64dc3af25eeba0 gpu: NVIDIA GeForce RTX 3070 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 651 (PresentX 651) presents per 2 s (last 3): 8 0 15 device removals: 0 crashes: 0 peak commit: 14469 MB ``` Candidate ``` xcl-smoke v1 commit: bb33ceed26be32dba18b4799d0b6396649bed840 gpu: NVIDIA GeForce RTX 3070 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 778 (PresentX 778) presents per 2 s (last 3): 0 0 22 device removals: 0 crashes: 0 peak commit: 14463 MB ``` **Not tested** Both retail smoke logs reported zero chained dispatches and 0 MiB peak split scratch. The concurrent-admission case is covered by the synthetic test. Retail prevalence, effect on NVIDIA device removals, and behavior on AMD and Intel GPUs remain unmeasured. **AI use** OpenAI Codex (GPT-6.2 Astra) inspected the recording path, wrote the code and tests, ran the focused tests and drafted this description. OpenAI Codex (GPT-6.2 Sol) independently reviewed the diff and evidence and edited this description. The lead agent ran the workspace suite and retail smoke using OpenAI Codex (GPT-6.2).
DavidM1911 commented 2026-11-25 23:09:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T22:08:29Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7175987397 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7175987397). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T22:08:29Z. --- 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!
emirduran707 commented 2026-11-25 23:09:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-25T22:38:00Z.


Independent AMD RDNA4 (native wave64) test report on exact head bb33ceed26be32dba18b4799d0b6396649bed840 (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1423 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu refused by per-lane form; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.
    • Both PR tests passed: hle::d3d12x::real::dispatch_chain::tests::pending_scratch_releases_its_charge_on_allocation_failure and simultaneous_scratch_allocations_share_the_total.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 seed 722 and fuzz_validate_and_gpu_3 seed 1599) are pre-existing on unmodified main on this GPU.

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

xcl-smoke v1
commit: bb33ceed26be32dba18b4799d0b6396649bed840
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1613 (PresentX 1613)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13911 MB

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7176602842 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7176602842). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-25T22:38:00Z. --- Independent AMD RDNA4 (native wave64) test report on exact head `bb33ceed26be32dba18b4799d0b6396649bed840` (clean detached checkout, no local changes). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2602.17; tests debug, smoke release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: **1423 passed, 2 failed, 46 ignored; 8 SKIPPED** (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu` refused by per-lane form; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`). All native wave64 GPU tests ran and passed. - Both PR tests passed: `hle::d3d12x::real::dispatch_chain::tests::pending_scratch_releases_its_charge_on_allocation_failure` and `simultaneous_scratch_allocations_share_the_total`. - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` seed 722 and `fuzz_validate_and_gpu_3` seed 1599) are pre-existing on unmodified `main` on this GPU. **Regression run** (60 s retail-title smoke, `XCL_NETWORK=0`, release) ``` xcl-smoke v1 commit: bb33ceed26be32dba18b4799d0b6396649bed840 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1613 (PresentX 1613) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13911 MB ``` (Matched `main` `68a284a` baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.) **Not tested** - D3D12 debug layer; Intel GPUs. **AI use** - Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
xpatfussy69x commented 2026-11-25 23:09:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by xpatfussy69x on 2026-11-25T22:40:50Z.


Test run on exact head bb33cee (bb33ceed26be32dba18b4799d0b6396649bed840, on its base 6d12f58), clean tree.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0; debug build for the tests, release for the smoke runs
  • cargo test --workspace -- --test-threads=4: 1425 passed, 0 failed, 46 ignored
  • SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 (on main too)
  • cargo test -p xcl --lib scratch: 7 passed, 0 failed
  • This PR's new tests in the workspace run:
    • simultaneous_scratch_allocations_share_the_total: ok
    • pending_scratch_releases_its_charge_on_allocation_failure: ok
  • Conflicts with #2543 in crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs (git merge-tree of both heads); whichever lands second needs a rebase

Regression run (60 s, default settings, a retail title)

main:

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 3060
title: c3f791f3
seconds: 60
exit: 0x0
frames shown: 1091 (PresentX 1091)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

this PR:

xcl-smoke v1
commit: bb33ceed26be32dba18b4799d0b6396649bed840
gpu: NVIDIA GeForce RTX 3060
title: c3f791f3
seconds: 60
exit: 0x0
frames shown: 1143 (PresentX 1143)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14787 MB

No crash or device removal; frames 105 % of main's, peak commit 100 %.

Not tested

  • Whether the title allocates split compute scratch in this run: a regression check only
  • The PR merged into current main (tested on its own base; it merges into e1d84b7 without conflicts)
  • AMD / native wave64

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and both smoke runs on the machine above and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7176660328 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7176660328). Originally posted by [xpatfussy69x](https://github.com/xpatfussy69x) on 2026-11-25T22:40:50Z. --- Test run on exact head `bb33cee` (`bb33ceed26be32dba18b4799d0b6396649bed840`, on its base `6d12f58`), clean tree. **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.2124, 32-lane waves only), AMD Ryzen 5 7500F, Windows 11, Rust 1.100.0; debug build for the tests, release for the smoke runs - `cargo test --workspace -- --test-threads=4`: 1425 passed, 0 failed, 46 ignored - SKIPPED (25): 21 × no wave64; 1 × no heap windows; 3 × per-lane form refused `V_MUL_F16` / `V_PK_MUL_F16` / `V_CVT_F16_F32` (on `main` too) - `cargo test -p xcl --lib scratch`: 7 passed, 0 failed - This PR's new tests in the workspace run: - `simultaneous_scratch_allocations_share_the_total`: ok - `pending_scratch_releases_its_charge_on_allocation_failure`: ok - Conflicts with #2543 in `crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs` (`git merge-tree` of both heads); whichever lands second needs a rebase **Regression run** (60 s, default settings, a retail title) main: ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1091 (PresentX 1091) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` this PR: ``` xcl-smoke v1 commit: bb33ceed26be32dba18b4799d0b6396649bed840 gpu: NVIDIA GeForce RTX 3060 title: c3f791f3 seconds: 60 exit: 0x0 frames shown: 1143 (PresentX 1143) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14787 MB ``` No crash or device removal; frames 105 % of `main`'s, peak commit 100 %. **Not tested** - Whether the title allocates split compute scratch in this run: a regression check only - The PR merged into current `main` (tested on its own base; it merges into `e1d84b7` without conflicts) - AMD / native wave64 **AI use** - Claude Code (Claude Opus 5.5) ran the tests and both smoke runs on the machine above and wrote this report.
SlopTart commented 2026-11-25 23:09:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T23:07:56Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.
Targeted run of pending_scratch_releases_its_charge_on_allocation_failure and simultaneous_scratch_allocations_share_the_total: 2 passed.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7177183055 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7177183055). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T23:07:56Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Targeted run of `pending_scratch_releases_its_charge_on_allocation_failure` and `simultaneous_scratch_allocations_share_the_total`: 2 passed. **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
Prime1997 commented 2026-11-26 13:30:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-26T13:30:27Z.

Review: COMMENTED


Good within the targeted test scope; retain for integration. Reserves scratch allocation charges atomically across concurrent callers and releases failed allocation charges.

Reviewed PR head bb33ceed26be32dba18b4799d0b6396649bed840. Tested an isolated, uncommitted merge-tree integration with latest main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, tree e4c55ae457a47405bc9c2e1b6ae7c33ad5e53c77; this is not a clean PR-head run. Integration source overlay SHA-256: b2678aaed83e7a4a03919ea87f1bc64eb22a68e5118ca474ae5963734a8ca68f.

Measured: 2 passed, 0 failed, 0 ignored, 0 skipped. Exact selected filters, each run in a fresh process:

  • hle::d3d12x::real::dispatch_chain::tests::simultaneous_scratch_allocations_share_the_total
  • hle::d3d12x::real::dispatch_chain::tests::pending_scratch_releases_its_charge_on_allocation_failure

Build: cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>. Run each: <test-exe> <exact-filter> --exact --test-threads=1 --nocapture. Private target/executable paths are placeholders. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug; private temporary/cache paths, two low-priority build jobs, 90-second per-test bound.

Scope: CPU mutex/barrier reservation model covering simultaneous reservations, failure rollback and reuse. No CreateCommittedResource call or real memory exhaustion was induced. No full suite, retail run, sustained memory pressure or performance benefit is established. Passing these fixtures is not merge certification.

AI use: Codex (GPT-6) inspected the changes and fixtures, ran the checks and verified raw receipts. Optional temporary Discord for coordinating contributor work, testing and comparing results.

<!-- greyfinch-sync:ivall/xcl:review:6074979632 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#pullrequestreview-6074979632). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-26T13:30:27Z. **Review:** COMMENTED --- **Good within the targeted test scope; retain for integration.** Reserves scratch allocation charges atomically across concurrent callers and releases failed allocation charges. Reviewed PR head `bb33ceed26be32dba18b4799d0b6396649bed840`. Tested an isolated, uncommitted merge-tree integration with latest main `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, tree `e4c55ae457a47405bc9c2e1b6ae7c33ad5e53c77`; this is not a clean PR-head run. Integration source overlay SHA-256: `b2678aaed83e7a4a03919ea87f1bc64eb22a68e5118ca474ae5963734a8ca68f`. **Measured: 2 passed, 0 failed, 0 ignored, 0 skipped.** Exact selected filters, each run in a fresh process: - `hle::d3d12x::real::dispatch_chain::tests::simultaneous_scratch_allocations_share_the_total` - `hle::d3d12x::real::dispatch_chain::tests::pending_scratch_releases_its_charge_on_allocation_failure` Build: `cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>`. Run each: `<test-exe> <exact-filter> --exact --test-threads=1 --nocapture`. Private target/executable paths are placeholders. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug; private temporary/cache paths, two low-priority build jobs, 90-second per-test bound. **Scope:** CPU mutex/barrier reservation model covering simultaneous reservations, failure rollback and reuse. No CreateCommittedResource call or real memory exhaustion was induced. No full suite, retail run, sustained memory pressure or performance benefit is established. Passing these fixtures is not merge certification. AI use: Codex (GPT-6) inspected the changes and fixtures, ran the checks and verified raw receipts. Optional temporary [Discord](https://discord.gg/gK3y7WRRY) for coordinating contributor work, testing and comparing results.
Decodere commented 2026-11-26 17:11:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T17:11:11Z.


Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2532 at bb33ceed26be32dba18b4799d0b6396649bed840 (exact parent & merge-base 6d12f58a229bc73889878a448c64dc3af25eeba0). Measurements and targeted test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0, default flags, no input)

Targeted RTX 4060 release unit & GPU tests (bb33ceed)

  • cargo test --release -p xcl --lib simultaneous_scratch_allocations_share_the_total -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib pending_scratch_releases_its_charge_on_allocation_failure -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib hle::d3d12x::real::dispatch_chain:: (3 consecutive parallel passes): 4 passed, 0 failed, 0 ignored on all 3 passes (0.19 s / 0.19 s / 0.19 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib hle::d3d12x::real::: 61 passed, 0 failed, 0 ignored (0.39 s, 0 SKIPPED).

Paired 60 s RTX 4060 smoke (exact parent 6d12f58a vs bb33ceed)

Both runs completed cleanly at steady 60/2 s pacing with 0 device removals and 0 crashes (bb33ceed vs 6d12f58a xcl.log: 6,175 / 6,115 MB vs 6,176 / 6,116 MB peak/end local VRAM, 4,650 MB vs 4,683 MB end non-local VRAM, 19,087 vs 19,600 translated draws / 1,024 dispatches with 0 skipped).

Exact parent (6d12f58a):

xcl-smoke v1
commit: 6d12f58a229bc73889878a448c64dc3af25eeba0
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1606 (PresentX 1606)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14004 MB

PR #2532 head (bb33ceed):

xcl-smoke v1
commit: bb33ceed26be32dba18b4799d0b6396649bed840
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1568 (PresentX 1569)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13981 MB

Limits of coverage

  • Full workspace test suite was not run on bb33ceed (only the 2 new tests individually, 3 parallel passes of dispatch_chain::, hle::d3d12x::real::, release build, and exact-parent paired 60 s smokes).
  • The 60 s no-input menu/intro smoke triggered 0 split-compute programs (compute split: 0 programs split, 0 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB), so concurrent scratch-cap enforcement and allocation-failure rollback were exercised by the targeted release unit tests rather than live split-compute slab contention.
  • Single discrete NVIDIA 8 GB GPU (RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.

AI use

Ran the targeted release unit/GPU tests, release build, and exact-parent paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory figures, and smoke blocks were extracted directly from cargo test, xcl.log, and scripts/smoke.ps1 outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7198621396 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7198621396). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T17:11:11Z. --- **Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2532 at `bb33ceed26be32dba18b4799d0b6396649bed840`** (exact parent & merge-base `6d12f58a229bc73889878a448c64dc3af25eeba0`). Measurements and targeted test results only; not a full source review. ### Setup - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` - **Toolchain / caches:** `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5`, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs) - **Workload:** Retail workload `title: 29640639` via `scripts/smoke.ps1 -Seconds 60` (`XCL_NETWORK=0`, default flags, no input) ### Targeted RTX 4060 release unit & GPU tests (`bb33ceed`) - `cargo test --release -p xcl --lib simultaneous_scratch_allocations_share_the_total -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.00 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib pending_scratch_releases_its_charge_on_allocation_failure -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.00 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib hle::d3d12x::real::dispatch_chain::` (3 consecutive parallel passes): **4 passed, 0 failed, 0 ignored** on all 3 passes (`0.19 s` / `0.19 s` / `0.19 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib hle::d3d12x::real::`: **61 passed, 0 failed, 0 ignored** (`0.39 s`, `0` `SKIPPED`). ### Paired 60 s RTX 4060 smoke (exact parent `6d12f58a` vs `bb33ceed`) Both runs completed cleanly at steady 60/2 s pacing with `0` device removals and `0` crashes (`bb33ceed` vs `6d12f58a` `xcl.log`: `6,175` / `6,115 MB` vs `6,176` / `6,116 MB` peak/end local VRAM, `4,650 MB` vs `4,683 MB` end non-local VRAM, `19,087` vs `19,600` translated draws / `1,024` dispatches with `0` skipped). Exact parent (`6d12f58a`): ``` xcl-smoke v1 commit: 6d12f58a229bc73889878a448c64dc3af25eeba0 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1606 (PresentX 1606) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14004 MB ``` PR #2532 head (`bb33ceed`): ``` xcl-smoke v1 commit: bb33ceed26be32dba18b4799d0b6396649bed840 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1568 (PresentX 1569) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13981 MB ``` ### Limits of coverage - Full workspace test suite was not run on `bb33ceed` (only the 2 new tests individually, 3 parallel passes of `dispatch_chain::`, `hle::d3d12x::real::`, release build, and exact-parent paired 60 s smokes). - The 60 s no-input menu/intro smoke triggered `0` split-compute programs (`compute split: 0 programs split, 0 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB`), so concurrent scratch-cap enforcement and allocation-failure rollback were exercised by the targeted release unit tests rather than live split-compute slab contention. - Single discrete NVIDIA 8 GB GPU (`RTX 4060`) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host. ### AI use Ran the targeted release unit/GPU tests, release build, and exact-parent paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory figures, and smoke blocks were extracted directly from `cargo test`, `xcl.log`, and `scripts/smoke.ps1` outputs.
throny commented 2026-11-28 02:45:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:45:40Z.


merge-check claim
head: bb33ceed26

<!-- greyfinch-sync:ivall/xcl:comment:7232576467 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7232576467). Originally posted by [throny](https://github.com/throny) on 2026-11-28T02:45:40Z. --- merge-check claim head: bb33ceed26be32dba18b4799d0b6396649bed840
throny commented 2026-11-28 03:01:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T03:01:08Z.


merge-check
base: 753e8b1a
head: bb33ceed26
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1514 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored
review: none. The charge is released on every path (a failed allocation drops the reservation without it ever counting as live; the last reference drops it otherwise), nothing is counted twice, and a refusal can only happen when the list already has a buffer, which is then returned as on main. Lock order is the existing one. For whoever merges: conflicts with #2543 (reported in the thread) and with #2469 (named in the description).
performance: one uncontended mutex lock per split dispatch (reasoned).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7232740010 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7232740010). Originally posted by [throny](https://github.com/throny) on 2026-11-28T03:01:08Z. --- merge-check base: 753e8b1a head: bb33ceed26be32dba18b4799d0b6396649bed840 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1514 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored review: none. The charge is released on every path (a failed allocation drops the reservation without it ever counting as live; the last reference drops it otherwise), nothing is counted twice, and a refusal can only happen when the list already has a buffer, which is then returned as on main. Lock order is the existing one. For whoever merges: conflicts with #2543 (reported in the thread) and with #2469 (named in the description). performance: one uncontended mutex lock per split dispatch (reasoned). verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Foniass commented 2026-12-01 08:18:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:18:02Z.


Triage (#1607) – head bb33cee

No open or merged PR makes the same change: main's dispatch_chain::scratch_for still reads LIVE and adds to it after scratch_buffer returns, so two recordings can both see room and overshoot XCL_SPLIT_SCRATCH_TOTAL_MB. The reservation under one lock (ScratchReservation::reserve) closes that, and the failure path releases its charge; both tests cover it. #2469 (reuse scratch when growth fails) and #2543 (clear SHARED on list lifecycle) touch the same file for different problems.
The branch conflicts with main and needs a rebase.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7305135748 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2532#issuecomment-7305135748). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:18:02Z. --- **Triage (#1607)** – head bb33cee No open or merged PR makes the same change: main's `dispatch_chain::scratch_for` still reads `LIVE` and adds to it after `scratch_buffer` returns, so two recordings can both see room and overshoot `XCL_SPLIT_SCRATCH_TOTAL_MB`. The reservation under one lock (`ScratchReservation::reserve`) closes that, and the failure path releases its charge; both tests cover it. #2469 (reuse scratch when growth fails) and #2543 (clear `SHARED` on list lifecycle) touch the same file for different problems. The branch conflicts with main and needs a rebase. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2532:upstream-pr/2532'
git switch 'upstream-pr/2532'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2532'
git switch 'upstream-pr/2532'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2532'
git switch 'upstream-pr/2532'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2532'
git switch 'main'
git merge --squash 'upstream-pr/2532'
git switch 'main'
git merge --ff-only 'upstream-pr/2532'
git switch 'main'
git merge 'upstream-pr/2532'
git push origin 'main'
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!2522
No description provided.