Skip to content

Tests: the sparse VRAM test binds the heaps its root signature indexes - #2017

Merged
raylitebull merged 1 commit into
xcl-dev:mainfrom
cindertheblue:tests/sparse-vram-binds-descriptor-heaps
Nov 25, 2026
Merged

raylitebull merged 1 commit into
xcl-dev:mainfrom
cindertheblue:tests/sparse-vram-binds-descriptor-heaps

Conversation

@cindertheblue

@cindertheblue cindertheblue commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

gpu_sparse_vram_descriptors_buffers_and_xmem sets the ABI root signature (pso::abi_root_signature, with CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and SAMPLER_HEAP_DIRECTLY_INDEXED) without calling SetDescriptorHeaps first. D3D12 requires the heaps to be bound before such a root signature is set; with the debug layer on, each submit logs error 1419 twice (once per heap type), four times per run. The runner's own tests bind heaps through bind_resources; this test builds its command list by hand and doesn't.

Related: #2016 (the 19 / 23 failures with XCL_D3D12_DEBUG=1, which this does not fix: those come from the debug layer being enabled after the runner's device exists).

What is in it

  • Tests: the sparse VRAM test binds the heaps its root signature indexes (crates/xcl/src/gpu/recomp/tests.rs, +6 lines): a one-descriptor shader-visible CBV/SRV/UAV heap and sampler heap, bound with SetDescriptorHeaps before SetComputeRootSignature on every recording (the list is reset between the two submits). The shader reads nothing through them.

Tested

  • AMD Radeon RX 7600 XT 16 GB (RDNA3), driver 32.0.31041.1004 (AMD Software 26.8.1), Ryzen 5 9600X, Windows 11 Home 26200.9974, rustc 1.99.1 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100), debug; this head d8391cd on main 6567c5f, no uncommitted changes.
  • XCL_D3D12_DEBUG=1 cargo test -p xcl --lib gpu_sparse_vram_descriptors_buffers_and_xmem -- --nocapture: on main 6567c5f the test passes and logs error 1419 four times; on this head it passes with no debug-layer error.
  • The same test without the debug layer, on this head: 1 passed, 3 runs of 3.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4, twice on this head: 996 passed, 1 failed, 45 ignored both times. The failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722, res[30] = 0x1, CPU 0x7fffffff), the AMD mismatch from Direct DXIL: geometry mode, MSAA loads and directed f32 rounding #1679; it fails the same way on main. Without --no-fail-fast cargo stops at that failure in the lib binary: 947 passed, 1 failed, 25 ignored.
  • SKIPPED GPU tests: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (Developer Mode off), and six per-lane f16 / f32 forms in lower_dxil::tests (refused (unsupported …)).

Regression run

  • Not needed: only crates/xcl/src/gpu/recomp/tests.rs changes.

Not tested

  • NVIDIA / Intel GPUs, a release build.
  • scripts\test.ps1 itself (the same build and test commands, run directly).

AI use

  • Claude Code (Claude Opus 5.5) found the debug-layer error, wrote the change, ran the tests and wrote this description.
  • I read the diff and checked it.

gpu_sparse_vram_descriptors_buffers_and_xmem sets the ABI root signature,
which has D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and
SAMPLER_HEAP_DIRECTLY_INDEXED, without SetDescriptorHeaps first. With the
debug layer on that is error 1419, twice per submit (four times per run).
Bind a one-descriptor CBV/SRV/UAV heap and a sampler heap before it, on
every recording, as the runner does through bind_resources. The shader
reads nothing through them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nnonno91

Copy link
Copy Markdown

Independent RTX 5090 test of d8391cdeb7683230c33c666d98cba6d964046013 and its parent 6567c5ffa38fbc7039b2d6bf520154689cc1f482. The changed test passed with default settings and with the D3D12 debug layer enabled. This setup did not emit error 1419 on either revision.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, NVIDIA GeForce RTX 5090 (32.0.16.1742), Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11, debug/test profiles. Inbox d3d12SDKLayers.dll 10.0.26100.9818. XCL_ADAPTER='RTX 5090'.
  • cargo build --workspace --locked passed on both revisions. cargo test --locked -p xcl --lib gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem -- --exact --nocapture passed in three separate runs on the head and one on its parent with default settings. Each ran the GPU assertions with no skips.
  • The same focused command with XCL_D3D12_DEBUG=1 and other diagnostic overrides removed gave 1 passed, 0 failed, 0 ignored on each revision, no skips. Both logs confirmed the debug layer was enabled and showed the process-exit live-object warnings. Neither logged 1419. Initial debug attempts with empty-valued diagnostic overrides present exited 0xc0000005 on both revisions. I removed those overrides and reran the comparison above.
  • With default environment settings, cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output on each revision gave 993 passed, 4 failed, 45 ignored. The changed sparse test passed on both. The same four fuzz batches failed on both at seeds 70, 545, 1019 and 1507, each with CreateComputePipelineState returning 0x8007000E. Both runs logged 24 explicit skips inside the pass count (19 no native wave64, 3 unsupported per-lane shader cases, 1 unable to disable the driver cache, 1 heap windows off).

Not tested

The cause of the initial debug-process exit, retail titles, or other GPUs on this revision.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable) ran and verified the tests and wrote this report.

@cindertheblue
cindertheblue marked this pull request as ready for review November 25, 2026 01:12
@raylitebull
raylitebull merged commit b282d6b into xcl-dev:main Nov 25, 2026
4 checks passed
@cindertheblue

Copy link
Copy Markdown
Contributor Author

Thanks for testing it on NVIDIA. That's a difference I didn't expect, so here is exactly what the same test logs on my side with the debug layer, for comparison.

XCL_D3D12_DEBUG=1 cargo test -p xcl --lib gpu_sparse_vram_descriptors_buffers_and_xmem -- --nocapture, RX 7600 XT, driver 32.0.31041.1004, the same inbox d3d12SDKLayers.dll 10.0.26100.9818 (no Agility SDK line in the log), no other XCL_* set. The D3D12 debug layer (…) lines XCL logs:

parent 6567c5f head d8391cd
error 1419 (SetComputeRootSignature: SetDescriptorHeaps must be called…, once for CBV/SRV/UAV and once for samplers, per submit) 4 0
warning id 0 (the live-object report at process exit) 8 8

In my log the live-object warnings and 1419 arrive the same way (XCL's ID3D12InfoQueue1 callback, real.rs:536), and only the parent logs 1419. I don't know why the RTX 5090 doesn't raise it with the same layer version. The ABI root signature always has both *_HEAP_DIRECTLY_INDEXED flags (pso.rs:1015), and the vendor-specific code I found in real.rs, list_x.rs, bind.rs and pso.rs is about pipeline compiles, barriers and indirect arguments, not heap binding, but I haven't traced the 5090's path.

AI use: Claude Code (Claude Opus 5.5) ran the comparison and wrote this comment from the logs.

@cindertheblue
cindertheblue deleted the tests/sparse-vram-binds-descriptor-heaps branch November 25, 2026 01:39
@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants