Shader tests: bind raw SRVs in the waterfall buffer test #102
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by vicennpacheco on 2026-11-24T21:29:34Z.
Problem
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.)
Imported from fxceless/victory-fork. Originally posted by HAL9000RELOADED on 2026-11-25T19:29:34Z.
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 (https://github.com/fxceless/victory-fork/pull/129#issuecomment-7172358511).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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.