Repository navigation
D3D12.X: reuse split dispatch scratch when growth fails - #2469
razormontana wants to merge 1 commit into
Conversation
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
bmjask
left a comment
There was a problem hiding this comment.
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.
…ry (port upstream xcl-dev#2469 + xcl-dev#2532 + xcl-dev#2543 + xcl-dev#2629) (cherry picked from commit bc14f1d8b191b3935c9829a539454b6226c542d0)
A recording can dispatch a split program in smaller slabs if its current scratch holds at least one group. Keep that buffer and request the reuse barrier when creating a larger resource fails, so dispatch does not build a whole pipeline for this case. Assisted-by: Codex (GPT-6.2 Astra) Assisted-by: Codex GPT-6.2
44a66e6 to
f2062cd
Compare
|
Independent Windows 11 x64 + NVIDIA GeForce RTX 4080 ( Tested
AI use: Antigravity with Gemini 4 Hydrogen (Medium) ran the merge/build/test pass and drafted this report; reviewed by human. |
|
Independent Windows 11 / NVIDIA test report on exact PR head Tested
Not tested
AI use
|
|
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2469 rebased head Setup
Targeted RTX 4060 release unit & GPU tests (
|
|
Independent test and smoke report for head Tested
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. |
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
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.README.mddescribes when split dispatches can continue with the recording’s existing scratch buffer.Tested
f2062cda,cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputreported 1,443 passed, 0 failed and 47 ignored. The pass count includes 26 explicit GPU skip notices.cargo build --offline --locked --release -p xclsucceeded.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. At8b957be, smoke reached its startup deadline during #2555 shader preparation. The PR merges cleanly into8b957be; 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
PR head
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.