Repository navigation
Conversation
…raw view gathers_at_a_level_match_the_hardware reads each lane's record (offset, u, v, level) by byte offset through a structured view (stride 16). On NVIDIA a raw load through a structured descriptor multiplies the offset by the stride (Marvisak#2178), so every lane read zeros and every lane failed with the gather of (0, 0) at level 0, [0, 1, 0, 0], including the native gather the test compares against: it looked like a gather bug, and is none. The records go through a raw view, as Marvisak#2178 does for stride_tests. On an RTX 5090 the test then passes on the hardware and on WARP; the gathers were right all along. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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
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 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. cargo test -p victory-shader --lib --locked emit::synthetic_tests::gathers_at_a_level_match_the_hardware -- --exact --nocapture --test-threads=1 |
|
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. |
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: merged into main 940d32f, cargo test -p victory-shader --locked on macOS arm64 — 144 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — one-line test fix (gather-at-a-level reads its records).
|
RTX 5070 (Blackwell, driver 621.24), Ryzen 7 5700X, Windows 11, Rust 1.98.1 MSVC. No game files, unit tests only. Head
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. |
|
Tested on an RTX 4070 Ti (NVIDIA driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned), on top of main
Result: 245 passed, 2 failed, 3 ignored (on plain 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 (comment)). #2357 is a third PR on the same failures. Only one of the three should land. AI-assisted (Claude). |
Problem
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(GPU+shader: back structured buffer views with raw descriptors for NVIDIA rawBufferLoad #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