Shader tests: the gather-at-a-level test reads its records through a raw view (false failure on NVIDIA) #2323
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2323
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2323"
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?
@Bullet18x on GitHub · 2026-11-25 10:40 UTC · original
Bullet18x:fix/gather-test-raw-view→main· +1 −1 · 1 files · 1 commits · openProblem
emit::synthetic_tests::gathers_at_a_level_match_the_hardwarefails on NVIDIA, and it looks like a gather bug. It is not one.The test reads each lane's record (offset, u, v, level) by byte offset through a structured view (
Stride::Structured(16)). On NVIDIA a raw load through a structured descriptor multiplies the offset by the stride (the bug #2178 fixes at runtime), so every lane reads zeros. Every lane then returns the gather of (0, 0) at level 0,[0, 1, 0, 0]. So doesgot(2), the native gather the test checks itself against. RTX 5090, driver 621.40, all 32 lanes:Change
The records go through a raw view (
Stride::Raw), as #2178 does forstride_tests. The view's kind is incidental to what the test checks. One line.Tested
gathers_at_a_level_match_the_hardwarepasses on the hardware and on WARP. The gathers were right all along.cargo test -p victory-shader --libon that machine: 237 passed, 10 failed (was 11). The 10 are the twostride_tests(#2178) and 8 that fail only on this Windows build's WARP (10.0.28000), where the hardware matches.cargo clippy -p victory-shader --all-targets --locked -- -D warnings: clean.AI-assisted (Claude Code).
🤖 Generated with Claude Code
@steven-seagull27 on GitHub · 2026-11-25 10:48 UTC · original
Confirmed on an RTX 5080 (driver 621.40). Changing the input view to raw fixed all 64 gather comparisons from my earlier report. The generated gather shader was byte-for-byte identical on the parent and PR. Earlier #1752 readback
I ran the existing test on parent
940d32fand head9c6e094. I also collected all 32 lanes and ran a separate input check that writes each four-dword record directly to the output immediately after the same record load.On the RTX parent, 29 lanes read four zero dwords. The other three lanes (5, 6, 7) each repeated one offset value across all four dwords. Lane 4 is an example of the effect on the result. It gathered
[0, 1, 0, 0]on the parent and the expected[65, 66, 34, 33]on the PR. The RTX hardware-only comparison against its native level-zero gather improved from 13/16 to 16/16. Both WARP runs used the expected software device and their respective DLLs.The original assertions failed on the parent RTX and passed on the PR RTX. Both WARP versions passed the original assertions on both revisions. I ran the existing test on Windows with the following command.
@JAEdotUK on GitHub · 2026-11-25 10:52 UTC · original
Tested PR #2323 on Windows 11 with an AMD Radeon RX 9070 XT. Ran cargo test -p victory-shader --lib --locked -- --test-threads=1 — all 247 tests passed (0 failed) with no regressions on RDNA 4.
@welisonzika14-jpg on GitHub · 2026-11-25 11:37 UTC · original
RTX 5070 (Blackwell, driver 621.24), Ryzen 7 5700X, Windows 11, Rust 1.98.1 MSVC. No game files, unit tests only. Head
9c6e094merged ontomain940d32f,cargo test -p victory-gpu -p victory-shader --lib --no-fail-fast.victory-shader: 245 ok, 2 fail (main: 244 ok, 3 fail).gathers_at_a_level_match_the_hardwarepasses on this card with it. The two left are the stride test and the view heap cap test from #1744. No new failures.Note: #2322 makes the whole test host's structured views raw, and with it both the gather and the stride test pass here (248 ok, 1 fail). So #2322 looks like it covers this one too.
Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
@qtLkz on GitHub · 2026-11-25 12:38 UTC · original
Tested on an RTX 4070 Ti (NVIDIA driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned), on top of main
940d32f,cargo test -p victory-shader --lib --locked --no-fail-fast:synthetic_tests::gathers_at_a_level_match_the_hardware: now passes, as describedstride_testsNVIDIA failures from #2317 (a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros) are unchanged, as expected since this PR does not touch themResult: 245 passed, 2 failed, 3 ignored (on plain
940d32f: 244 passed, 3 failed).Overlap note: #2322 fixes the same gather failure through the shared test harness, plus both stride tests; on this card it gives 249 passed, 0 failed (#2317). #2357 is a third PR on the same failures. Only one of the three should land.
AI-assisted (Claude).
@Marvisak on GitHub · 2026-11-25 15:18 UTC · original
Automated triage for the maintainers.
Proposed close (duplicate). The change is correct: the gather test reads its records by byte address, so a raw view is the right fixture, and the NVIDIA readbacks in the comments confirm it. However, open PR #2357 makes exactly this one-line change in
synthetic_tests::gathers_at_a_level_match_the_hardwareand also fixes the matching NVIDIA failure instride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, so only one of them should land. CI: passing.This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.
Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.