[ERROR] Shader preparation failed #3070

Closed
opened 2026-11-27 20:05:42 +00:00 by hellomynameisnone · 3 comments
hellomynameisnone commented 2026-11-27 20:05:42 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by hellomynameisnone on 2026-11-27T20:05:42Z.


s

<!-- greyfinch-sync:ivall/xcl:issue:6653707442 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3070). Originally posted by [hellomynameisnone](https://github.com/hellomynameisnone) on 2026-11-27T20:05:42Z. --- s
hellomynameisnone commented 2026-11-27 22:38:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by hellomynameisnone on 2026-11-27T22:38:18Z.


Update: I patched shaders.rs (make_one) so the two Err(_) branches that bump
refused print the error. The refused pipeline during shader preparation is:

REFUSED pipeline key 91eef70f93e47049, 73320 B DXIL, chained false,
error HRESULT(0x8007000E) "Not enough memory resources are available
to complete this operation."

  • It is a small compute pipeline (73 KB DXIL), so it is not the size cap.
  • Deterministic: same result with the default threads and with
    XCL_PIPELINE_THREADS=2. 2688 other pipelines are created fine.
  • With XCL_PREPARE=0 the game starts (it later logs 40 "mesh pipeline ... in
    the AS slot - refused" lines, same hashes as in report.prev.json).
  • Suggestion: the refused count currently discards the error (Err(_) at the
    two places in make_one), so the stop message says nothing useful. Logging
    the HRESULT and the key would help, and maybe a refused pipeline should be
    left to the runtime like the capped ones instead of aborting preparation.

RTX 5080, driver 616.56, Windows 11 26H2, XCL commit 6089122.

<!-- greyfinch-sync:ivall/xcl:comment:7229494197 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3070#issuecomment-7229494197). Originally posted by [hellomynameisnone](https://github.com/hellomynameisnone) on 2026-11-27T22:38:18Z. --- Update: I patched shaders.rs (make_one) so the two `Err(_)` branches that bump `refused` print the error. The refused pipeline during shader preparation is: REFUSED pipeline key 91eef70f93e47049, 73320 B DXIL, chained false, error HRESULT(0x8007000E) "Not enough memory resources are available to complete this operation." - It is a small compute pipeline (73 KB DXIL), so it is not the size cap. - Deterministic: same result with the default threads and with XCL_PIPELINE_THREADS=2. 2688 other pipelines are created fine. - With XCL_PREPARE=0 the game starts (it later logs 40 "mesh pipeline ... in the AS slot - refused" lines, same hashes as in report.prev.json). - Suggestion: the refused count currently discards the error (Err(_) at the two places in make_one), so the stop message says nothing useful. Logging the HRESULT and the key would help, and maybe a refused pipeline should be left to the runtime like the capped ones instead of aborting preparation. RTX 5080, driver 616.56, Windows 11 26H2, XCL commit 6089122.
snrubrm commented 2026-11-28 00:03:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by snrubrm on 2026-11-28T00:03:38Z.


Same refused pipeline on an RTX 5070 Ti (driver 621.40): it is weatherParticle:CS_BeginUpdate, refused because of the Blackwell driver bug #1919 works around, in a form #1919 does not cover

I got the same key as @hellomynameisnone above (91eef70f93e47049, 73,320 B, 0x8007000E) on main f9a0cb8, so it is the same DXIL on 616.56 and 621.40. The preparation ran 6 h 24 min on a cold cache (2,688 pipelines made, 1 refused) and stopped with exit code 2; a second start with everything cached stopped the same way after 32 s.

Which program. Record weatherParticle:CS_BeginUpdate_f7374ac1_Wrapped @0xf8f7507 (record hash f377ca6830935314), a compute program that is not split, on the HLSL + DXC path.

Why it is refused. It adds a negated value to LDS:

06a8: v_sub_nc_u32   v1, 0, v1
06ac: ds_add_rtn_u32 v1, v3, v1

which XCL emits as InterlockedAdd(xcl_lds[...], (0u - v1), ...). RTX 50 drivers refuse a group-shared atomic add of a negated non-constant value (the bug #1919 describes). Checked on the exported HLSL (xcl shaders --export-hlsl … --record-hash f377ca6830935314), compiled with DXC 1.9.2602.17 and built with XCL's ABI root signature:

  • the exported HLSL as it is: refused, 0x8007000E
  • the ds_add's value written as (v1 | WaveActiveBitOr(0u)) (#1919's workaround): built
  • without the negation, or negating a constant instead: built
  • with parts of the program removed: the refusal needs the block with these two instructions and the block at pc == 0, which sets up the registers that block reads; without either, it builds

#1919 as it is would not fix this title: it changes only ds_sub_u32, and here the title negates with a v_sub and then uses a plain ds_add. I have described the gap on #1919.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.40 (32.0.16.2140); Ryzen 7 9800X3D (iGPU not used: XCL_ADAPTER=nvidia); Windows 11 Pro 26300; rustc 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100); release build of main f9a0cb8
  • the preparation runs, with temporary logging in the preparation (not committed); the variants above with a temporary test that only calls CreateComputePipelineState on the 5070 Ti

Not tested

  • the direct DXIL path (XCL_DIRECT_DXIL=1); its LDS add lowering also uses the value unchanged, so it is probably affected too
  • the title with XCL_PREPARE=0 on this machine
  • AMD and older NVIDIA cards

Claude Code (Claude Opus 5.5) found the program, ran these tests and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7230614690 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3070#issuecomment-7230614690). Originally posted by [snrubrm](https://github.com/snrubrm) on 2026-11-28T00:03:38Z. --- **Same refused pipeline on an RTX 5070 Ti (driver 621.40): it is `weatherParticle:CS_BeginUpdate`, refused because of the Blackwell driver bug #1919 works around, in a form #1919 does not cover** I got the same key as @hellomynameisnone above (`91eef70f93e47049`, 73,320 B, `0x8007000E`) on `main` `f9a0cb8`, so it is the same DXIL on 616.56 and 621.40. The preparation ran 6 h 24 min on a cold cache (2,688 pipelines made, 1 refused) and stopped with exit code 2; a second start with everything cached stopped the same way after 32 s. **Which program.** Record `weatherParticle:CS_BeginUpdate_f7374ac1_Wrapped @0xf8f7507` (record hash `f377ca6830935314`), a compute program that is not split, on the HLSL + DXC path. **Why it is refused.** It adds a negated value to LDS: ``` 06a8: v_sub_nc_u32 v1, 0, v1 06ac: ds_add_rtn_u32 v1, v3, v1 ``` which XCL emits as `InterlockedAdd(xcl_lds[...], (0u - v1), ...)`. RTX 50 drivers refuse a group-shared atomic add of a negated non-constant value (the bug #1919 describes). Checked on the exported HLSL (`xcl shaders --export-hlsl … --record-hash f377ca6830935314`), compiled with DXC 1.9.2602.17 and built with XCL's ABI root signature: - the exported HLSL as it is: refused, `0x8007000E` - the `ds_add`'s value written as `(v1 | WaveActiveBitOr(0u))` (#1919's workaround): built - without the negation, or negating a constant instead: built - with parts of the program removed: the refusal needs the block with these two instructions and the block at `pc == 0`, which sets up the registers that block reads; without either, it builds #1919 as it is would not fix this title: it changes only `ds_sub_u32`, and here the title negates with a `v_sub` and then uses a plain `ds_add`. I have described the gap on #1919. **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.40 (32.0.16.2140); Ryzen 7 9800X3D (iGPU not used: `XCL_ADAPTER=nvidia`); Windows 11 Pro 26300; rustc 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100); release build of `main` `f9a0cb8` - the preparation runs, with temporary logging in the preparation (not committed); the variants above with a temporary test that only calls `CreateComputePipelineState` on the 5070 Ti **Not tested** - the direct DXIL path (`XCL_DIRECT_DXIL=1`); its LDS `add` lowering also uses the value unchanged, so it is probably affected too - the title with `XCL_PREPARE=0` on this machine - AMD and older NVIDIA cards _Claude Code (Claude Opus 5.5) found the program, ran these tests and wrote this comment._
UncommonDLL commented 2026-11-29 02:33:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by UncommonDLL on 2026-11-29T02:33:15Z.


We checked a synthetic v_sub_nc_u32 followed by ds_add_rtn_u32 on a host with an RTX 5070 Ti and driver 621.40, with XCL_ADAPTER=nvidia, at baseline 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 with and without the #1919 patch.

The HLSL path using DXC 1.9.2609.5 and the direct-DXIL path both dispatched and returned the expected old and final LDS values for all 64 lanes. In both disassemblies the group-shared atomicrmw add takes a runtime select between the negated value and the original. Applying #1919 left each shader byte-for-byte identical.

In the refused program compiled with DXC 1.9.2602.17, does the atomic read a bare sub i32 0, %x, or does a select survive there too? A short operand trace from the disassembly, including where the EXEC condition comes from if present, would let us compare the two cases.

AI assistance: Codex ran the synthetic fixture, and Claude Opus 5.5 independently reviewed the evidence.

<!-- greyfinch-sync:ivall/xcl:comment:7249500080 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3070#issuecomment-7249500080). Originally posted by [UncommonDLL](https://github.com/UncommonDLL) on 2026-11-29T02:33:15Z. --- We checked a synthetic `v_sub_nc_u32` followed by `ds_add_rtn_u32` on a host with an RTX 5070 Ti and driver 621.40, with `XCL_ADAPTER=nvidia`, at baseline `6089122a1c96dff16e93b6fdf04c8ed20cfb6102` with and without the #1919 patch. The HLSL path using DXC 1.9.2609.5 and the direct-DXIL path both dispatched and returned the expected old and final LDS values for all 64 lanes. In both disassemblies the group-shared `atomicrmw add` takes a runtime `select` between the negated value and the original. Applying #1919 left each shader byte-for-byte identical. In the refused program compiled with DXC 1.9.2602.17, does the atomic read a bare `sub i32 0, %x`, or does a `select` survive there too? A short operand trace from the disassembly, including where the EXEC condition comes from if present, would let us compare the two cases. AI assistance: Codex ran the synthetic fixture, and Claude Opus 5.5 independently reviewed the evidence.
Sign in to join this conversation.
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#3070
No description provided.