Shader tests: 64-bit image atomics skip devices without typed 64-bit heap atomics #1857

Open
github-bot wants to merge 1 commit from github-bot/gh-1857 into main AGit
Owner

@⁠Ingenioeren on GitHub · 2026-11-24 23:31 UTC · original
Ingenioeren:fix/1829-int64-typed-atomics-skip → main · +32 −0 · 2 files · 1 commits · open

What

emit::valu_tests::image_atomics_of_64_bits now skips a device that can't run 64-bit atomics on typed heap resources, the same way it already skips a device without SM 6.6. The new Host::heap_atomics64 in the shader test host runs the same query as victory-gpu's heap_atomics64: OPTIONS9.AtomicInt64OnTypedResourceSupported and OPTIONS11.AtomicInt64OnDescriptorHeapResourceSupported.

Why

On the Intel UHD (Xe-LP) in #1829 the test panics with hardware: The parameter is incorrect., and the debug layer says Shader uses atomic int64 on typed resources, but the device does not support this. The device simply lacks the feature, so this isn't a translation bug. The runtime already checks for the feature before it uses these atomics, and now the test checks too.

Refs #1829. That issue lists 8 failures and this handles one of them (the 64-bit atomics feature skip). The wave-lane-count skip, the view-heap cap (#1779/#1848), the v_mad_f32 signed zeros, the BVH ULP and the FSPX dot product (#1790) are not touched here, so this PR shouldn't close the issue.

How tested

Windows 11, AMD Radeon RX 6750 XT plus WARP, Rust stable MSVC:

  • cargo test --locked -p victory-shader --lib image_atomics_of_64_bits -- --nocapture: 1 passed. No skip line was printed, so both the hardware device and WARP report the feature and still run the full check.
  • cargo test --locked -p victory-shader: 207 passed, 2 failed, 2 ignored. The two failures are emit::rect::tests::rectangles_get_their_fourth_corner and emit::tests::elements_sharing_a_row_keep_their_order (dxil.dll: "Container part 'Pipeline State Validation' does not match expected"). Unmodified main (70564ae) on this machine fails the same two in the same way, so they come from the local dxil.dll and not from this change.
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings: clean.
  • cargo fmt --check: no diffs in the lines this PR touches.
  • cargo run -p xtask -- policy --staged: 2 files ok.

Not tested: the skip path itself. Both devices here support the feature, so I couldn't watch the test skip on a device without it. That needs a device like the Intel UHD from #1829.

Outside data point (thanks @⁠kais7654): on an RTX 5070 Laptop GPU with driver 616.87, OPTIONS9.AtomicInt64OnTypedResourceSupported reports FALSE and the unpatched test fails PSO creation with E_INVALIDARG, while an RTX 3070 on 616.56 passes. So the gate matters on NVIDIA hardware too, not only on the Intel UHD.

AI assistance: prepared with Claude Code, reviewed by Ingenioeren.

🤖 Generated with Claude Code

**@⁠Ingenioeren** on GitHub · 2026-11-24 23:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1857) `Ingenioeren:fix/1829-int64-typed-atomics-skip` → `main` · +32 −0 · 2 files · 1 commits · open ## What `emit::valu_tests::image_atomics_of_64_bits` now skips a device that can't run 64-bit atomics on typed heap resources, the same way it already skips a device without SM 6.6. The new `Host::heap_atomics64` in the shader test host runs the same query as `victory-gpu`'s `heap_atomics64`: `OPTIONS9.AtomicInt64OnTypedResourceSupported` and `OPTIONS11.AtomicInt64OnDescriptorHeapResourceSupported`. ## Why On the Intel UHD (Xe-LP) in #1829 the test panics with `hardware: The parameter is incorrect.`, and the debug layer says `Shader uses atomic int64 on typed resources, but the device does not support this`. The device simply lacks the feature, so this isn't a translation bug. The runtime already checks for the feature before it uses these atomics, and now the test checks too. Refs #1829. That issue lists 8 failures and this handles one of them (the 64-bit atomics feature skip). The wave-lane-count skip, the view-heap cap (#1779/#1848), the `v_mad_f32` signed zeros, the BVH ULP and the FSPX dot product (#1790) are not touched here, so this PR shouldn't close the issue. ## How tested Windows 11, AMD Radeon RX 6750 XT plus WARP, Rust stable MSVC: - `cargo test --locked -p victory-shader --lib image_atomics_of_64_bits -- --nocapture`: 1 passed. No skip line was printed, so both the hardware device and WARP report the feature and still run the full check. - `cargo test --locked -p victory-shader`: 207 passed, 2 failed, 2 ignored. The two failures are `emit::rect::tests::rectangles_get_their_fourth_corner` and `emit::tests::elements_sharing_a_row_keep_their_order` (`dxil.dll`: "Container part 'Pipeline State Validation' does not match expected"). Unmodified `main` (70564ae) on this machine fails the same two in the same way, so they come from the local `dxil.dll` and not from this change. - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings`: clean. - `cargo fmt --check`: no diffs in the lines this PR touches. - `cargo run -p xtask -- policy --staged`: 2 files ok. Not tested: the skip path itself. Both devices here support the feature, so I couldn't watch the test skip on a device without it. That needs a device like the Intel UHD from #1829. Outside data point (thanks @⁠kais7654): on an RTX 5070 Laptop GPU with driver 616.87, `OPTIONS9.AtomicInt64OnTypedResourceSupported` reports FALSE and the unpatched test fails PSO creation with `E_INVALIDARG`, while an RTX 3070 on 616.56 passes. So the gate matters on NVIDIA hardware too, not only on the Intel UHD. AI assistance: prepared with Claude Code, reviewed by Ingenioeren. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
image_atomics_of_64_bits created its pipeline on every SM 6.6 device and
failed with "The parameter is incorrect." where the device has no 64-bit
atomics on typed resources (Intel UHD, #1829). Host::heap_atomics64 asks
D3D12 OPTIONS9 and OPTIONS11 the same way victory-gpu's heap_atomics64
does, and the test skips such a device as it skips one without SM 6.6.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:46:42 +00:00
Author
Owner

@⁠kais7654 on GitHub · 2026-11-24 23:47 UTC · original

Noted on my #1858: it now covers only the permute test's wave-lane skip (with a Host::wave_lanes() query on OPTIONS1) and leaves the atomics test to this PR — yours also checks OPTIONS11's heap-resource variant, which the test-only Host here doesn't. Together the two close the "known refusal" failures of #1829.

**@⁠kais7654** on GitHub · 2026-11-24 23:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/1857#issuecomment-7147805965) Noted on my #1858: it now covers only the permute test's wave-lane skip (with a Host::wave_lanes() query on OPTIONS1) and leaves the atomics test to this PR — yours also checks OPTIONS11's heap-resource variant, which the test-only Host here doesn't. Together the two close the "known refusal" failures of #1829.
Author
Owner

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

Another data point on "fails on NVIDIA": on an RTX 5070 Laptop GPU
(driver 616.87, Windows 11), CheckFeatureSupport reports
OPTIONS9.AtomicInt64OnTypedResourceSupported = FALSE, and the test's
PSO creation fails with E_INVALIDARG — so the gate is load-bearing on
that machine, and naming the driver in the description is worth it:
the RTX 3070 here passes at 616.56 while the 5070 does not at 616.87.

**@⁠kais7654** on GitHub · 2026-11-25 00:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/1857#issuecomment-7148923647) Another data point on "fails on NVIDIA": on an RTX 5070 Laptop GPU (driver 616.87, Windows 11), CheckFeatureSupport reports OPTIONS9.AtomicInt64OnTypedResourceSupported = FALSE, and the test's PSO creation fails with E_INVALIDARG — so the gate is load-bearing on that machine, and naming the driver in the description is worth it: the RTX 3070 here passes at 616.56 while the 5070 does not at 616.87.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 07:26 UTC · original

Automated triage for the maintainers.

image_atomics_of_64_bits (crates/victory-shader/src/emit/valu_tests.rs) now skips devices without 64-bit atomics on typed heap resources, as it already skips devices without SM 6.6. The new Host::heap_atomics64 (crates/victory-shader/src/emit/host.rs) runs the same OPTIONS9/OPTIONS11 query as victory-gpu's Host::heap_atomics64, which the runtime already uses to guard these atomics. That makes this a test-environment fix, not a behaviour change. The skip path itself is untested (both of the author's devices support the feature). CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 07:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/1857#issuecomment-7155854306) <!-- victory-triage v1 head=6758d28b6cda83ebc572f0cc833a2a62832861ed verdict=merge-candidate at=2026-11-25T07:26:01Z --> Automated triage for the maintainers. `image_atomics_of_64_bits` (`crates/victory-shader/src/emit/valu_tests.rs`) now skips devices without 64-bit atomics on typed heap resources, as it already skips devices without SM 6.6. The new `Host::heap_atomics64` (`crates/victory-shader/src/emit/host.rs`) runs the same `OPTIONS9`/`OPTIONS11` query as `victory-gpu`'s `Host::heap_atomics64`, which the runtime already uses to guard these atomics. That makes this a test-environment fix, not a behaviour change. The skip path itself is untested (both of the author's devices support the feature). CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 12:05 UTC · original

Offline measurement on a retail dump

Result: no count change against main.

I merged head 6758d28b onto main 940d32f (clean merge) and ran victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with main program by program (25,889 programs). Validated: 23,918 on main, 23,918 with this PR.

No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.

No shader names or data are included, per the asset policy. AI-assisted (Claude Code).

**@⁠sinan-cmyk** on GitHub · 2026-11-25 12:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/1857#issuecomment-7161913502) ### Offline measurement on a retail dump **Result: no count change against `main`.** I merged head 6758d28b onto `main` 940d32f (clean merge) and ran `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with `main` program by program (25,889 programs). Validated: 23,918 on `main`, 23,918 with this PR. No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1857/head:github-bot/gh-1857'
git switch 'github-bot/gh-1857'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1857'
git switch 'github-bot/gh-1857'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1857'
git switch 'github-bot/gh-1857'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1857'
git switch 'main'
git merge --squash 'github-bot/gh-1857'
git switch 'main'
git merge --ff-only 'github-bot/gh-1857'
git switch 'main'
git merge 'github-bot/gh-1857'
git push origin 'main'
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!1857
No description provided.