Shader tests: bind raw SRVs in the waterfall buffer test #102
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!102
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-102"
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?
@vicennpacheco on GitHub · 2026-11-24 21:29 UTC · original
vicennpacheco:fix/waterfall-raw-buffer-views→main· +6 −2 · 1 files · 1 commits · openProblem
emit::waterfall_tests::lanes_load_from_the_buffer_their_nested_arms_chosefails on AMD GCN 5 hardware (Vega 8 /gfx90c):[100..115, 216..223, 0..0][100..107, 0..0]Root cause
WATERFALL_JOINED_BUFFER_WAVE32lowers its untypedbuffer_load_dword ... offento aByteAddressBufferhandle (dx.op.annotateHandlewithResourceProperties { i32 11, i32 0 },dx.op.rawBufferLoad.f32, verified withdxc -dumpbin), matchingvictory-gpu'sraw_windowcontract that binds structured views as raw (DXGI_FORMAT_R32_TYPELESS,D3D12_BUFFER_SRV_FLAG_RAW).However, the test created
Stride::Structured(4)SRVs (DXGI_FORMAT_UNKNOWN,NumElements = 32,StructureByteStride = 4,Flags = NONE). On GCN 5, structuredV#descriptors storeNUM_RECORDSin elements (32) rather than bytes (unlike RDNA / GFX10+), so raw byte-offset loads (lane * 4) pass bounds checks only for lanes0..7(0..28 < 32) and return0for lanes8..23(32..92 >= 32). (Doublingfirst/secondto 64 elements withStride::Structured(4)confirmed this directly: lanes0..15succeeded and lanes16..23returned0.)Fix
Bind
Stride::Rawfor both buffer SRVs inlanes_load_from_the_buffer_their_nested_arms_chose, matching the emittedByteAddressBufferhandle andvictory-gpu'sraw_windowhost views.Verification
Tested on Windows 11, AMD Radeon Vega 8 iGPU (Ryzen 7 5825U, GCN 5 /
gfx90c, PCI1002:15E7, AMD driver31.0.21921.13001), Rust1.98.1(x86_64-pc-windows-msvc), without game files:cargo test -p victory-shader --lib -- waterfall_tests: 5 passed, 0 failed (both Vega 8 hardware and WARP)VICTORY_D3D12_DEBUG=1 cargo test -p victory-shader --lib -- waterfall_tests: 5 passed, 0 failed, no debug-layer errorscargo clippy -p victory-shader --tests -- -D warnings: clean(AI-assisted investigation and patch.)
`lower` annotates untyped buffer loads as `ByteAddressBuffer` (`ResourceProperties { 11, 0 }`), matching `victory-gpu`'s `raw_window` host views. `lanes_load_from_the_buffer_their_nested_arms_chose` bound `Stride::Structured(4)` instead, which on AMD GCN 5 (Vega 8, gfx90c) truncates raw byte offsets against `NumElements` (32), returning zeros from lane 8 onward. Bind `Stride::Raw` so the test views match the emitted DXIL handle.@HAL9000RELOADED on GitHub · 2026-11-25 19:29 UTC · original
RX 7900 XTX (RDNA3), Windows 10 + #402, main
d510ee4:lanes_load_from_the_buffer_their_nested_arms_chosepasses with this PR and also on main without it, so the GCN 5 failure doesn't reproduce on RDNA3. No regression. Run table: #129 (#129).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.