D3D12.X: reuse split dispatch scratch when growth fails #2459

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

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


A split compute dispatch can use smaller slabs when a command list’s scratch buffer holds at least one thread group. If allocating a larger buffer failed, XCL discarded that option and built or bound the whole compute pipeline. Reusing the buffer avoids bringing an additional whole pipeline into use on this path. Part of #2403.

What is in it

  • In real/dispatch_chain.rs, reuse the same recording’s scratch after a failed growth request if one group fits. Report reuse to the command recorder so it issues its UAV barrier. Only a successful allocation updates scratch usage and replaces the shared buffer.
  • The CPU regression test injects an allocation failure and checks the returned buffer and reuse flag. It covers an exact-fit group, a buffer one byte too small, a missing buffer, successful growth and an already adequate buffer.
  • README.md describes when split dispatches can continue with the recording’s existing scratch buffer.

Tested

  • Windows 11 Pro build 22631, Core i7-10700K, RTX 3070 8 GB (driver 617.42), Rust 1.100.0 MSVC.
  • Two focused CPU tests passed on the rebased head. The original allocation-failure fixture failed without the reuse change. The rebase preserves the upstream GPU scratch-sharing test and the existing UAV barrier on reuse.
  • Debug workspace build passed. On f2062cda, cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output reported 1,443 passed, 0 failed and 47 ignored. The pass count includes 26 explicit GPU skip notices.
  • cargo build --offline --locked --release -p xcl succeeded.

Regression run

Both release builds ran the same retail title offline for 60 seconds on the RTX 3070. Both used the Series S profile, direct DXIL and copies of the same starting cache. This pair uses e120925, the preceding main commit. At 8b957be, smoke reached its startup deadline during #2555 shader preparation. The PR merges cleanly into 8b957be; the combined retail run remains unverified. The initial pair showed 703 frames on main and 378 on the PR. For this repeat, both started from copies of the cache left by the first main run, after builds completed.

Main

xcl-smoke v1
commit: e120925e3abc9956a8b9bae631969d32e8ccd43c
gpu: NVIDIA GeForce RTX 3070
title: 80ea98f7
seconds: 60
exit: 0x0
frames shown: 445 (PresentX 446)
presents per 2 s (last 3): 18 18 18
device removals: 0
crashes: 0
peak commit: 17596 MB

PR head

xcl-smoke v1
commit: f2062cdaeb31bbf83e442cce27066409b8162cb4
gpu: NVIDIA GeForce RTX 3070
title: 80ea98f7
seconds: 60
exit: 0x0
frames shown: 450 (PresentX 450)
presents per 2 s (last 3): 18 18 18
device removals: 0
crashes: 0
peak commit: 17630 MB

Not tested

The CPU test injects scratch allocation failure. The retail smoke checks startup and presents. It does not establish a reduction in shader-code usage during world loading.

AI use

Codex GPT-6.2 wrote and reviewed the code and tests, rebased the branch, ran the checks, and updated this description.

<!-- greyfinch-sync:ivall/xcl:issue:5497924959 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469). Originally posted by [razormontana](https://github.com/razormontana) on 2026-11-25T19:39:12Z. --- A split compute dispatch can use smaller slabs when a command list’s scratch buffer holds at least one thread group. If allocating a larger buffer failed, XCL discarded that option and built or bound the whole compute pipeline. Reusing the buffer avoids bringing an additional whole pipeline into use on this path. Part of #2403. **What is in it** - In `real/dispatch_chain.rs`, reuse the same recording’s scratch after a failed growth request if one group fits. Report reuse to the command recorder so it issues its UAV barrier. Only a successful allocation updates scratch usage and replaces the shared buffer. - The CPU regression test injects an allocation failure and checks the returned buffer and reuse flag. It covers an exact-fit group, a buffer one byte too small, a missing buffer, successful growth and an already adequate buffer. - `README.md` describes when split dispatches can continue with the recording’s existing scratch buffer. **Tested** - Windows 11 Pro build 22631, Core i7-10700K, RTX 3070 8 GB (driver 617.42), Rust 1.100.0 MSVC. - Two focused CPU tests passed on the rebased head. The original allocation-failure fixture failed without the reuse change. The rebase preserves the upstream GPU scratch-sharing test and the existing UAV barrier on reuse. - Debug workspace build passed. On `f2062cda`, `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output` reported 1,443 passed, 0 failed and 47 ignored. The pass count includes 26 explicit GPU skip notices. - `cargo build --offline --locked --release -p xcl` succeeded. **Regression run** Both release builds ran the same retail title offline for 60 seconds on the RTX 3070. Both used the Series S profile, direct DXIL and copies of the same starting cache. This pair uses `e120925`, the preceding main commit. At `8b957be`, smoke reached its startup deadline during #2555 shader preparation. The PR merges cleanly into `8b957be`; the combined retail run remains unverified. The initial pair showed 703 frames on main and 378 on the PR. For this repeat, both started from copies of the cache left by the first main run, after builds completed. Main ``` xcl-smoke v1 commit: e120925e3abc9956a8b9bae631969d32e8ccd43c gpu: NVIDIA GeForce RTX 3070 title: 80ea98f7 seconds: 60 exit: 0x0 frames shown: 445 (PresentX 446) presents per 2 s (last 3): 18 18 18 device removals: 0 crashes: 0 peak commit: 17596 MB ``` PR head ``` xcl-smoke v1 commit: f2062cdaeb31bbf83e442cce27066409b8162cb4 gpu: NVIDIA GeForce RTX 3070 title: 80ea98f7 seconds: 60 exit: 0x0 frames shown: 450 (PresentX 450) presents per 2 s (last 3): 18 18 18 device removals: 0 crashes: 0 peak commit: 17630 MB ``` **Not tested** The CPU test injects scratch allocation failure. The retail smoke checks startup and presents. It does not establish a reduction in shader-code usage during world loading. **AI use** Codex GPT-6.2 wrote and reviewed the code and tests, rebased the branch, ran the checks, and updated this description.
bmjask commented 2026-11-25 20:35:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:35:53Z.

Review: COMMENTED


No concrete defect found. Fallback reuse is capacity-safe, slabbed within its existing allocation, and inserts the required UAV barrier; current Windows CI is green. Nonblocking coverage gap: the test injects select_scratch failure rather than exercising the real D3D12 allocation-failure -> command-recording/slab path. A seam/integration test would strengthen it, but I found no blocker.

<!-- greyfinch-sync:ivall/xcl:review:6064609936 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#pullrequestreview-6064609936). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T20:35:53Z. **Review:** COMMENTED --- No concrete defect found. Fallback reuse is capacity-safe, slabbed within its existing allocation, and inserts the required UAV barrier; current Windows CI is green. Nonblocking coverage gap: the test injects select_scratch failure rather than exercising the real D3D12 allocation-failure -> command-recording/slab path. A seam/integration test would strengthen it, but I found no blocker.
DavidM1911 commented 2026-11-25 21:05:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:22:00Z.


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:7173562931 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7173562931). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T20:22:00Z. --- 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!
Ritolino commented 2026-11-26 18:07:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Ritolino on 2026-11-26T18:07:29Z.


Independent Windows 11 x64 + NVIDIA GeForce RTX 4080 (wave32) verification of #2469 head f2062cda merged cleanly onto current main (8b957bec):

Tested

  • Windows 11 x64, AMD Ryzen 9 7950X, NVIDIA GeForce RTX 4080 (wave32), rustc 1.100.0 (stable-x86_64-pc-windows-msvc), debug
  • cargo build --workspace: succeeded
  • hle::d3d12x::real::dispatch_chain::tests::failed_scratch_growth_reuses_a_buffer_that_fits_a_group: ok
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --skip blob_enumeration_sees_one_submitted_update:
    • xcl --lib: 1318 passed, 0 failed, 27 ignored, 1 filtered out
    • All 37 other workspace test targets: 128 passed, 0 failed, 20 ignored
    • Total: 1446 passed, 0 failed, 47 ignored, 1 filtered out (blob_enumeration_sees_one_submitted_update skipped due to pre-existing #2421 / #2373).

AI use: Antigravity with Gemini 4 Hydrogen (Medium) ran the merge/build/test pass and drafted this report; reviewed by human.

<!-- greyfinch-sync:ivall/xcl:comment:7200080719 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7200080719). Originally posted by [Ritolino](https://github.com/Ritolino) on 2026-11-26T18:07:29Z. --- Independent Windows 11 x64 + NVIDIA GeForce RTX 4080 (`wave32`) verification of `#2469` head `f2062cda` merged cleanly onto current `main` (`8b957bec`): **Tested** - Windows 11 x64, AMD Ryzen 9 7950X, NVIDIA GeForce RTX 4080 (`wave32`), `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), debug - `cargo build --workspace`: succeeded - `hle::d3d12x::real::dispatch_chain::tests::failed_scratch_growth_reuses_a_buffer_that_fits_a_group`: `ok` - `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip blob_enumeration_sees_one_submitted_update`: - `xcl --lib`: `1318 passed, 0 failed, 27 ignored, 1 filtered out` - All 37 other workspace test targets: `128 passed, 0 failed, 20 ignored` - Total: `1446 passed, 0 failed, 47 ignored, 1 filtered out` (`blob_enumeration_sees_one_submitted_update` skipped due to pre-existing `#2421` / `#2373`). AI use: Antigravity with Gemini 4 Hydrogen (Medium) ran the merge/build/test pass and drafted this report; reviewed by human.
a-DuckGod commented 2026-11-26 19:15:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by a-DuckGod on 2026-11-26T19:15:38Z.


Independent Windows 11 / NVIDIA test report on exact PR head f2062cdaeb31bbf83e442cce27066409b8162cb4 (clean detached checkout; merge-base e120925e).

Tested

  • Hardware / OS / toolchain: NVIDIA GeForce RTX 3080 Ti (12 GB, wave32, mesh shaders), driver 32.0.16.2114; Intel Core i7-8700K, 32 GB RAM; Windows 11 Pro (Version Dev 29708.1003); rustc 1.100.0 (0ef1bc386 2026-11-09) (x86_64-pc-windows-msvc), Windows SDK DXC 1.8.2502.11, D3D12 debug layer installed, debug build.
  • cargo build --workspace: succeeded.
  • cargo test -p xcl --lib failed_scratch_growth_reuses_a_buffer_that_fits_a_group -- --nocapture: 1 passed, 0 failed, 0 ignored, 0 skipped.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1442 passed, 1 failed, 47 ignored (including all e2e tests under the D3D12 debug layer and DRED).
    • The 1 failure was hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory (vram.rs:2040:26, HRESULT(0x80004005) under parallel GPU load).
    • Standalone rerun cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture: 1 passed, 0 failed, 0 ignored (2.83 s).
  • SKIPPED GPU tests (26): 21 no wave64 (RTX 3080 Ti is 32-lane waves only), 3 per-lane #1426 refused forms (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), 1 shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (cannot disable driver cache; Windows Developer Mode required), 1 heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

Not tested

  • Release build, retail title / scripts/smoke.ps1 run, XCL_SAMPLE_* tests, live OOM scratch-growth fallback during a game dispatch, AMD / Intel / native wave64 GPUs.

AI use

  • Antigravity (Gemini 4 Neon) checked out the PR, read commit f2062cda (dispatch_chain.rs and README.md), ran the build and tests, and drafted this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7201378571 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7201378571). Originally posted by [a-DuckGod](https://github.com/a-DuckGod) on 2026-11-26T19:15:38Z. --- Independent Windows 11 / NVIDIA test report on exact PR head `f2062cdaeb31bbf83e442cce27066409b8162cb4` (clean detached checkout; merge-base `e120925e`). **Tested** - Hardware / OS / toolchain: NVIDIA GeForce RTX 3080 Ti (12 GB, wave32, mesh shaders), driver 32.0.16.2114; Intel Core i7-8700K, 32 GB RAM; Windows 11 Pro (Version Dev 29708.1003); `rustc 1.100.0 (0ef1bc386 2026-11-09)` (`x86_64-pc-windows-msvc`), Windows SDK DXC `1.8.2502.11`, D3D12 debug layer installed, debug build. - `cargo build --workspace`: succeeded. - `cargo test -p xcl --lib failed_scratch_growth_reuses_a_buffer_that_fits_a_group -- --nocapture`: **1 passed, 0 failed, 0 ignored, 0 skipped**. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: **1442 passed, 1 failed, 47 ignored** (including all `e2e` tests under the D3D12 debug layer and DRED). - The 1 failure was `hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory` (`vram.rs:2040:26`, `HRESULT(0x80004005)` under parallel GPU load). - Standalone rerun `cargo test -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --nocapture`: **1 passed, 0 failed, 0 ignored** (2.83 s). - `SKIPPED` GPU tests (26): 21 `no wave64` (RTX 3080 Ti is 32-lane waves only), 3 per-lane #1426 refused forms (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`), 1 `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (cannot disable driver cache; Windows Developer Mode required), 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` (`no heap windows`). **Not tested** - Release build, retail title / `scripts/smoke.ps1` run, `XCL_SAMPLE_*` tests, live OOM scratch-growth fallback during a game dispatch, AMD / Intel / native wave64 GPUs. **AI use** - Antigravity (Gemini 4 Neon) checked out the PR, read commit `f2062cda` (`dispatch_chain.rs` and `README.md`), ran the build and tests, and drafted this report. I checked it before posting.
Decodere commented 2026-11-26 19:22:35 +00:00 (Migrated from github.com)

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


Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2469 rebased head f2062cdaeb31bbf83e442cce27066409b8162cb4 (exact parent & merge-base e120925e3abc9956a8b9bae631969d32e8ccd43c). 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 (f2062cda)

  • cargo test --release -p xcl --lib failed_scratch_growth_reuses_a_buffer_that_fits_a_group -- --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): 3 passed, 0 failed, 0 ignored on all 3 passes (0.25 s / 0.17 s / 0.17 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib hle::d3d12x::real::: 64 passed, 0 failed, 0 ignored (0.36 s, 0 SKIPPED).

Paired 60 s RTX 4060 smoke (exact parent e120925e vs f2062cda)

Both runs completed cleanly at steady 60/2 s pacing with 0 device removals and 0 crashes (f2062cda vs e120925e xcl.log: 6,176 / 6,115 MB vs 6,114 / 6,114 MB peak/end local VRAM, 4,651 MB end non-local VRAM on both, 19,450 vs 19,588 translated draws / 1,024 dispatches with 0 skipped).

Exact parent (e120925e):

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

PR #2469 head (f2062cda):

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

Limits of coverage

  • Full workspace test suite was not run on f2062cda (only failed_scratch_growth_reuses_a_buffer_that_fits_a_group, 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 hit 0 split-compute programs (compute split: 0 programs split, 0 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB), so scratch-growth failure fallback and buffer reuse were exercised by the targeted release unit test above rather than live split-compute OOM pressure.
  • 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:7201515576 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7201515576). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T19:22:35Z. --- **Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2469 rebased head `f2062cdaeb31bbf83e442cce27066409b8162cb4`** (exact parent & merge-base `e120925e3abc9956a8b9bae631969d32e8ccd43c`). 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 (`f2062cda`) - `cargo test --release -p xcl --lib failed_scratch_growth_reuses_a_buffer_that_fits_a_group -- --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): **3 passed, 0 failed, 0 ignored** on all 3 passes (`0.25 s` / `0.17 s` / `0.17 s`, `0` `SKIPPED`). - `cargo test --release -p xcl --lib hle::d3d12x::real::`: **64 passed, 0 failed, 0 ignored** (`0.36 s`, `0` `SKIPPED`). ### Paired 60 s RTX 4060 smoke (exact parent `e120925e` vs `f2062cda`) Both runs completed cleanly at steady 60/2 s pacing with `0` device removals and `0` crashes (`f2062cda` vs `e120925e` `xcl.log`: `6,176` / `6,115 MB` vs `6,114` / `6,114 MB` peak/end local VRAM, `4,651 MB` end non-local VRAM on both, `19,450` vs `19,588` translated draws / `1,024` dispatches with `0` skipped). Exact parent (`e120925e`): ``` xcl-smoke v1 commit: e120925e3abc9956a8b9bae631969d32e8ccd43c gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1602 (PresentX 1602) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13979 MB ``` PR #2469 head (`f2062cda`): ``` xcl-smoke v1 commit: f2062cdaeb31bbf83e442cce27066409b8162cb4 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1591 (PresentX 1591) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 13997 MB ``` ### Limits of coverage - Full workspace test suite was not run on `f2062cda` (only `failed_scratch_growth_reuses_a_buffer_that_fits_a_group`, 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 hit `0` split-compute programs (`compute split: 0 programs split, 0 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB`), so scratch-growth failure fallback and buffer reuse were exercised by the targeted release unit test above rather than live split-compute OOM pressure. - 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.
thiagocalile commented 2026-11-26 20:10:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thiagocalile on 2026-11-26T20:10:17Z.


Independent test and smoke report for head f2062cdaeb31bbf83e442cce27066409b8162cb4 on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- dispatch_chain --test-threads=4: 11 passed, 0 failed, 0 ignored (0 skipped).

Not tested: full workspace suite, 60 s smoke run on this head, NVIDIA/Intel GPUs, or Linux/Wine.

AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.

<!-- greyfinch-sync:ivall/xcl:comment:7202376893 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7202376893). Originally posted by [thiagocalile](https://github.com/thiagocalile) on 2026-11-26T20:10:17Z. --- Independent test and smoke report for head `f2062cdaeb31bbf83e442cce27066409b8162cb4` on an **AMD Radeon RX 6600** (8 GB VRAM, RDNA2, native wave64). **Tested** - Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver `32.0.21045.29003`, `XCL_ADAPTER=radeon`), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (`10.0.26200.0`), Rust `1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.8.2502.11`. - `XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- dispatch_chain --test-threads=4`: **11 passed, 0 failed, 0 ignored** (`0` skipped). **Not tested:** full workspace suite, 60 s smoke run on this head, NVIDIA/Intel GPUs, or Linux/Wine. **AI use:** Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
UncommonDLL commented 2026-11-27 17:09:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by UncommonDLL on 2026-11-27T17:09:24Z.


merge-check
base: 6089122a1c
head: f2062cdaeb
merge: clean
build: cargo build --workspace -> ok, exit 0 in 29.45 s
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1462 passed, 4 failed, 47 ignored, 0 filtered. Exit 101 in 87.92 s. All 38 targets completed. The logs contained 26 explicit runtime skip notices, including subcases within passing tests.
review: No blocking finding after reviewing both changed files on local merge c27cf681baed24ecc9a0e017de1979d86d6f07da. Source inspection confirmed that failed growth preserves the recording’s existing scratch buffer and allocation counters. Reuse requires capacity for at least one thread group. The recorder bounds each slab to that capacity and issues a UAV barrier before reuse. The injected allocation-failure test passed. The suite exercised the physical RTX on other checks. A real D3D12 scratch-growth allocation failure remains untested.
performance: Assessed from source. Successful growth retains its allocation behavior. After failed growth, reuse can avoid building or binding a whole pipeline. Smaller slabs can require additional dispatches and barriers. Frame time and memory were unmeasured.
verdict: safe to merge
hardware / tool and model: Windows 11 Pro build 26200, Ryzen 7 7800X3D, RTX 5070 Ti, NVIDIA 621.40. OpenAI Codex ran the build, tests and source review using Git, PowerShell and Cargo. Rust/Cargo 1.100.0 MSVC x64, DXC 1.9.2609.5. Exact Codex variant and reasoning setting: not recorded.

Baseline comparison: cargo test -p xcl --lib -- --test-threads=4 reproduced all four failures on the pinned base. On both revisions, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0, _1, _2 and _3 failed at seeds 70, 545, 1019 and 1507 respectively. Each stopped at CreateComputePipelineState with 0x8007000E before reaching the scratch-buffer path changed by this PR.

<!-- greyfinch-sync:ivall/xcl:comment:7224090307 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7224090307). Originally posted by [UncommonDLL](https://github.com/UncommonDLL) on 2026-11-27T17:09:24Z. --- merge-check base: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 head: f2062cdaeb31bbf83e442cce27066409b8162cb4 merge: clean build: cargo build --workspace -> ok, exit 0 in 29.45 s tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1462 passed, 4 failed, 47 ignored, 0 filtered. Exit 101 in 87.92 s. All 38 targets completed. The logs contained 26 explicit runtime skip notices, including subcases within passing tests. review: No blocking finding after reviewing both changed files on local merge c27cf681baed24ecc9a0e017de1979d86d6f07da. Source inspection confirmed that failed growth preserves the recording’s existing scratch buffer and allocation counters. Reuse requires capacity for at least one thread group. The recorder bounds each slab to that capacity and issues a UAV barrier before reuse. The injected allocation-failure test passed. The suite exercised the physical RTX on other checks. A real D3D12 scratch-growth allocation failure remains untested. performance: Assessed from source. Successful growth retains its allocation behavior. After failed growth, reuse can avoid building or binding a whole pipeline. Smaller slabs can require additional dispatches and barriers. Frame time and memory were unmeasured. verdict: safe to merge hardware / tool and model: Windows 11 Pro build 26200, Ryzen 7 7800X3D, RTX 5070 Ti, NVIDIA 621.40. OpenAI Codex ran the build, tests and source review using Git, PowerShell and Cargo. Rust/Cargo 1.100.0 MSVC x64, DXC 1.9.2609.5. Exact Codex variant and reasoning setting: not recorded. Baseline comparison: cargo test -p xcl --lib -- --test-threads=4 reproduced all four failures on the pinned base. On both revisions, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0, _1, _2 and _3 failed at seeds 70, 545, 1019 and 1507 respectively. Each stopped at CreateComputePipelineState with 0x8007000E before reaching the scratch-buffer path changed by this PR.
Decodere commented 2026-11-27 17:30:59 +00:00 (Migrated from github.com)

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


merge-check
base: 6089122a1c
head: f2062cdaeb
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored; failing: none (including the new dispatch_chain test failed_scratch_growth_reuses_a_buffer_that_fits_a_group; base 6089122a passes 1465 passed, 0 failed, 47 ignored across 38 test binaries)
review: none (read the full 2-file merged diff, +42/-10 across README.md and crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs, and the full dispatch_chain.rs file: select_scratch preserves the normal allocation and no-growth reuse paths, keeps LIVE/PEAK/SHARED untouched when scratch_buffer returns None, falls back to the recording's existing scratch buffer only when capacity >= group with used = true so record_dispatch_chain emits the required UAV barrier and dispatch_slabs sizes slabs to (s.bytes / group).max(1), falls through cleanly to chain.whole() when no usable buffer exists, holds no lock across CreateCommittedResource, and covers all branches in the new unit test)
performance: No default frame-time or memory regression (reasoned from the full diff): when scratch allocation succeeds or no growth is needed, runtime behavior is identical to base 6089122a. The fallback only activates after a CreateCommittedResource failure during split-dispatch scratch growth, where reusing the recording's existing buffer in smaller slabs avoids both additional VRAM allocation and lazy compilation of the unsplit whole compute PSO.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 (driver 32.0.16.2114), Intel Core i5-11400F, Windows 11, Rust 1.100.0; Google Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7224493221 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7224493221). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T17:30:59Z. --- merge-check base: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 head: f2062cdaeb31bbf83e442cce27066409b8162cb4 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored; failing: none (including the new dispatch_chain test failed_scratch_growth_reuses_a_buffer_that_fits_a_group; base 6089122a passes 1465 passed, 0 failed, 47 ignored across 38 test binaries) review: none (read the full 2-file merged diff, +42/-10 across README.md and crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs, and the full dispatch_chain.rs file: select_scratch preserves the normal allocation and no-growth reuse paths, keeps LIVE/PEAK/SHARED untouched when scratch_buffer returns None, falls back to the recording's existing scratch buffer only when capacity >= group with used = true so record_dispatch_chain emits the required UAV barrier and dispatch_slabs sizes slabs to (s.bytes / group).max(1), falls through cleanly to chain.whole() when no usable buffer exists, holds no lock across CreateCommittedResource, and covers all branches in the new unit test) performance: No default frame-time or memory regression (reasoned from the full diff): when scratch allocation succeeds or no growth is needed, runtime behavior is identical to base 6089122a. The fallback only activates after a CreateCommittedResource failure during split-dispatch scratch growth, where reusing the recording's existing buffer in smaller slabs avoids both additional VRAM allocation and lazy compilation of the unsplit whole compute PSO. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 (driver 32.0.16.2114), Intel Core i5-11400F, Windows 11, Rust 1.100.0; Google Antigravity (Gemini 4 Neon)
Foniass commented 2026-12-01 08:07:52 +00:00 (Migrated from github.com)

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


Triage (#1607) – head f2062cd

No open or merged PR makes this change: main's scratch_for in real/dispatch_chain.rs still returns None when scratch_buffer fails, so the chain falls back to the whole pipeline. The PRs sharing #2403 (#2496, #2526, #2590, #2641) change other things.
select_scratch falls back to the list's existing buffer only when it holds one group, and returns it with used = true so the recorder keeps its UAV barrier; dispatch sizes the slabs from the returned buffer's bytes. On the !make path the new filter is a no-op (scratch_bytes only returns make = false when the buffer holds at least one group). No problems found in the diff.
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:7304913777 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2469#issuecomment-7304913777). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:07:52Z. --- **Triage (#1607)** – head f2062cd No open or merged PR makes this change: main's `scratch_for` in `real/dispatch_chain.rs` still returns `None` when `scratch_buffer` fails, so the chain falls back to the whole pipeline. The PRs sharing #2403 (#2496, #2526, #2590, #2641) change other things. `select_scratch` falls back to the list's existing buffer only when it holds one group, and returns it with `used = true` so the recorder keeps its UAV barrier; `dispatch` sizes the slabs from the returned buffer's `bytes`. On the `!make` path the new filter is a no-op (`scratch_bytes` only returns `make = false` when the buffer holds at least one group). No problems found in the diff. 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/2469:upstream-pr/2469'
git switch 'upstream-pr/2469'

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