Shader tests: the 64-bit image atomics skip a device without them #1909

Closed
github-bot wants to merge 1 commit from gh-pr/1909/head into gh-pr/1909/base
Owner

@⁠kais7654 on GitHub · 2026-11-25 00:39 UTC · original
kais7654:shader/atomic64-caps → main · +34 −0 · 2 files · 1 commits · closed without merging

Problem

image_atomics_of_64_bits fails on NVIDIA hardware: the PSO creation
returns E_INVALIDARG before anything runs. WARP runs the very same
shader and it matches the reference — the emitted DXIL is well formed.

The shader's module flags 64-bit atomics on typed resources and heap
handles (SM 6.6's dx.op.atomicBinOp.i64 / atomicCompareExchange.i64
over an R32G32_UINT texture UAV). The runtime rejects pipelines whose
module claims a capability the device does not report:

OPTIONS9.AtomicInt64OnTypedResourceSupported      = FALSE  (NVIDIA's drivers do)
OPTIONS9.AtomicInt64OnGroupSharedSupported        = FALSE
OPTIONS11.AtomicInt64OnDescriptorHeapResourceSupported = TRUE

WARP's device reports all of them.

Fix

The host asks the device (Host::atomic64_typed(), D3D12 options 9 and
11) and the test skips one that lacks the capability — the same shape as
wave-length gates elsewhere (#1857, #1858). WARP still checks the
lowering word for word.

Testing

  • image_atomics_of_64_bits passes (hardware skipped, WARP equal).
  • Full suite on the hardware: 240 passed; the remaining failures are
    exactly the ones open PRs #1903 (BVH) and #1896 (packed dot) fix, plus
    two pre-existing (arithmetic_matches_the_hardware, stride_tests).
  • cargo clippy -p victory-shader --all-targets: clean.
  • 34 insertions, no deletions.
**@⁠kais7654** on GitHub · 2026-11-25 00:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1909) `kais7654:shader/atomic64-caps` → `main` · +34 −0 · 2 files · 1 commits · closed without merging ## Problem `image_atomics_of_64_bits` fails on NVIDIA hardware: the PSO creation returns `E_INVALIDARG` before anything runs. WARP runs the very same shader and it matches the reference — the emitted DXIL is well formed. The shader's module flags 64-bit atomics on typed resources and heap handles (SM 6.6's `dx.op.atomicBinOp.i64` / `atomicCompareExchange.i64` over an `R32G32_UINT` texture UAV). The runtime rejects pipelines whose module claims a capability the device does not report: OPTIONS9.AtomicInt64OnTypedResourceSupported = FALSE (NVIDIA's drivers do) OPTIONS9.AtomicInt64OnGroupSharedSupported = FALSE OPTIONS11.AtomicInt64OnDescriptorHeapResourceSupported = TRUE WARP's device reports all of them. ## Fix The host asks the device (`Host::atomic64_typed()`, D3D12 options 9 and 11) and the test skips one that lacks the capability — the same shape as wave-length gates elsewhere (#1857, #1858). WARP still checks the lowering word for word. ## Testing - `image_atomics_of_64_bits` passes (hardware skipped, WARP equal). - Full suite on the hardware: 240 passed; the remaining failures are exactly the ones open PRs #1903 (BVH) and #1896 (packed dot) fix, plus two pre-existing (`arithmetic_matches_the_hardware`, `stride_tests`). - `cargo clippy -p victory-shader --all-targets`: clean. - 34 insertions, no deletions.
The module the test runs flags 64-bit atomics on typed resources and
heap handles, and the runtime rejects the pipeline where the device
says it does not run those (options 9's typed bit; NVIDIA's drivers do
not, WARP's device does). The host asks, and the test skips such a
device: WARP still checks the lowering word for word.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:48:27 +00:00
github-bot closed this pull request 2026-11-26 04:48:27 +00:00
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 00:42 UTC · original

This is the same change as #1857 (Ingenioeren, opened about an hour earlier). It touches the same two files, emit/host.rs and valu_tests.rs, with an options 9 + 11 query on the host and a skip in image_atomics_of_64_bits. On #1857 you'd said #1858 would leave the atomics test to that PR, so one of the two can probably close.

A data point on "fails on NVIDIA": on an RTX 3070 (Ampere, driver 616.56, Windows 11), image_atomics_of_64_bits runs and passes, not skipped, at #1857's head, #1890's and #1907's. So the missing AtomicInt64OnTypedResourceSupported is specific to the device or driver rather than all of NVIDIA. Naming the GPU and driver in the description would help whoever reads the skip later.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 00:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/1909#issuecomment-7148786875) This is the same change as #1857 (Ingenioeren, opened about an hour earlier). It touches the same two files, `emit/host.rs` and `valu_tests.rs`, with an options 9 + 11 query on the host and a skip in `image_atomics_of_64_bits`. On #1857 you'd said #1858 would leave the atomics test to that PR, so one of the two can probably close. A data point on "fails on NVIDIA": on an RTX 3070 (Ampere, driver 616.56, Windows 11), `image_atomics_of_64_bits` runs and passes, not skipped, at #1857's head, #1890's and #1907's. So the missing `AtomicInt64OnTypedResourceSupported` is specific to the device or driver rather than all of NVIDIA. Naming the GPU and driver in the description would help whoever reads the skip later. AI-assisted (Claude Code).
Author
Owner

@⁠kais7654 on GitHub · 2026-11-25 00:48 UTC · original

Closing in favor of #1857, the same change opened an hour earlier.

Data point for whoever reads the skip later: on this machine the gate
fires — NVIDIA GeForce RTX 5070 Laptop GPU, driver 616.87
(32.0.16.1687) reports OPTIONS9.AtomicInt64OnTypedResourceSupported =
FALSE (OPTIONS11's heap bit is TRUE), and image_atomics_of_64_bits's
PSO creation then fails with E_INVALIDARG before anything runs. WARP
runs the shader correctly.

Side note: the PR's failing CI check is main's own — the Tests step
fails at 4118f33 (dynamic_slots_are_held_until_released,
lists_share_a_table_and_copies_keep_their_views in victory-gpu),
unrelated to this change.

**@⁠kais7654** on GitHub · 2026-11-25 00:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/1909#issuecomment-7148888913) Closing in favor of #1857, the same change opened an hour earlier. Data point for whoever reads the skip later: on this machine the gate fires — NVIDIA GeForce RTX 5070 Laptop GPU, driver 616.87 (32.0.16.1687) reports OPTIONS9.AtomicInt64OnTypedResourceSupported = FALSE (OPTIONS11's heap bit is TRUE), and image_atomics_of_64_bits's PSO creation then fails with E_INVALIDARG before anything runs. WARP runs the shader correctly. Side note: the PR's failing CI check is main's own — the Tests step fails at 4118f33 (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views in victory-gpu), unrelated to this change.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1909
No description provided.