Repository navigation
Conversation
The dispatch harness built a structured SRV (StructureByteStride) for
`View::Buffer` with `Stride::Structured`, while `victory-gpu` binds every
title buffer as a raw byte-address SRV and carries the element size in the
view-stride table; the lowered code multiplies by that stride itself
("Buffer views at computed heap indices"). A driver that honours the
descriptor's stride then scales the byte index a second time: on an
RTX 5070 Ti, `a_heap_buffer_read_by_element_takes_the_views_stride` read
element 3·lane+1 instead of lane (12-byte elements), which is index ×
stride/4, and ran off the buffer into zeros after element 31 (Marvisak#2317). AMD
and WARP returned the byte address as written, which is why the test passes
on the card here.
Bind the raw view, as production does, and keep the typed arms unchanged.
The new test pins the raw descriptor so a structured one cannot come back.
249 passed, 3 ignored, clippy `-D warnings` clean on Windows 10 19045 /
RX 7800 XT with SM 6.6 through the Agility runtime for the test binaries.
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 (Blackwell) and WARP:
- Confirmed on RTX 5090 that
emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stridenow passes (fixing#2317)! (The remainingstride_testsfailure on RTX 5090 is the separate pre-existing#1835a_heap_buffer_read_where_no_buffer_view_is_reads_zeros.) cargo test -p victory-shader stride_tests: 5/6 passed on RTX 5090 (target test passing), 6/6 passed on WARP.cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
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 — test-only: structured view bound as the raw view the host takes.
|
Confirmed the translated shader fix on native Windows. I compared the parent
On the RTX the first three lanes changed from One follow-up for the differential suite: I tried AlanQiang0418’s |
|
RTX 5070 (Blackwell, driver 621.24), Ryzen 7 5700X, Windows 11, Rust 1.98.1 MSVC. No game files, unit tests only. Head
This matches what I saw with the same test-host change by hand yesterday (in #1762). #2323 fixes only the gather test of the two, so the two overlap. Written with AI help (Claude/Kiro); the numbers are from runs on my machine. |
Shader tests: bind a structured view as the raw view the host makes
The dispatch harness built a structured SRV (StructureByteStride) for
View::BufferwithStride::Structured, whilevictory-gpubinds everytitle buffer as a raw byte-address SRV and carries the element size in the
view-stride table; the lowered code multiplies by that stride itself
("Buffer views at computed heap indices"). A driver that honours the
descriptor's stride then scales the byte index a second time: on an
RTX 5070 Ti,
a_heap_buffer_read_by_element_takes_the_views_stridereadelement 3·lane+1 instead of lane (12-byte elements), which is index ×
stride/4, and ran off the buffer into zeros after element 31 (#2317). AMD
and WARP returned the byte address as written, which is why the test passes
on the card here.
Bind the raw view, as production does, and keep the typed arms unchanged.
The new test pins the raw descriptor so a structured one cannot come back.
249 passed, 3 ignored, clippy
-D warningsclean on Windows 10 19045 /RX 7800 XT with SM 6.6 through the Agility runtime for the test binaries.