Shader tests: the 64-bit image atomics skip a device without them #1907
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1909"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by kais7654 on 2026-11-25T00:39:30Z.
Problem
image_atomics_of_64_bitsfails on NVIDIA hardware: the PSO creationreturns
E_INVALIDARGbefore anything runs. WARP runs the very sameshader 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.i64over an
R32G32_UINTtexture UAV). The runtime rejects pipelines whosemodule claims a capability the device does not report:
WARP's device reports all of them.
Fix
The host asks the device (
Host::atomic64_typed(), D3D12 options 9 and11) 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_bitspasses (hardware skipped, WARP equal).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.Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T00:42:09Z.
This is the same change as #1857 (Ingenioeren, opened about an hour earlier). It touches the same two files,
emit/host.rsandvalu_tests.rs, with an options 9 + 11 query on the host and a skip inimage_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_bitsruns and passes, not skipped, at #1857's head, #1890's and #1907's. So the missingAtomicInt64OnTypedResourceSupportedis 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).
Imported from Marvisak/VIctory. Originally posted by kais7654 on 2026-11-25T00:48:03Z.
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.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:47:16Z.
Review: APPROVED
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main
940d32f69b,cargo test -p victory-shader --locked.144 passed / 0 failed / 2 ignored. 64-bit image atomic tests now skip on devices lacking them — correct capability gating in the test harness.
Pull request closed