Repository navigation
Shader tests: bind raw SRVs in the waterfall buffer test - #102
Open
vicennpacheco wants to merge 1 commit into
Open
vicennpacheco wants to merge 1 commit into
vicennpacheco wants to merge 1 commit into
Conversation
`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.
oceansde012
pushed a commit
to oceansde012/victory-gta6
that referenced
this pull request
Nov 25, 2026
…RVs in the waterfall buffer test (by vicennpacheco)
|
RX 7900 XTX (RDNA3), Windows 10 + #402, main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.)