Repository navigation
Conversation
catminou4
left a comment
There was a problem hiding this comment.
Vectorized wide raw buffer loads: raw_buffer_load issues rawBufferLoad.f32 in chunks of 4 with mask (1<<chunk)-1 and align 4, extracting per channel — OOB lanes zero-fill via the mask, matching DXIL semantics. The fast path fires only when there is no swizzle/sub-access, and the s_buffer_load SRV path is deduplicated onto the same helper. The bitcode test helper asserts the emitted masks. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main ffe310e, cargo test -p victory-shader --locked. Shader execution tests (valu_tests/host/diff_tests) are #[cfg(all(test, windows))], so macOS covers lowering/decode/unit tests only. 97 passed, 0 failed (incl. the macOS lower test); valu tests Windows-gated.
|
Ran on an RTX 5070 (desktop, driver 621.40, the only adapter), Windows 11 26300, Rust 1.98.1 at The case I'd watch most in this change is the one the second test covers: a vector |
Offline measurement on a retail dump, and the shader tests on AdaResult: no count change against Offline. I merged head 7a780a0 onto No program changes its failure reason either. That is the expected result for a fix whose instructions sit behind the earlier failures on Tests: with the same merge, No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
I tested the analogous per-lane raw table-constant path introduced in 683ad7a on exact main 70564ae. The local experiment combines only aligned same-row dwordx2/x3/x4 reads, emitting one raw load with masks 3, 7 or 15. Dynamic and crossing cases retain scalar lowering. Baseline and candidate each passed 240 synthetic dispatches per adapter on AMD and WARP with full validation, including partial bounds, nonzero FirstElement and raw bit patterns. A 2 MiB synthetic read had medians of 52.58 → 50.68 µs on AMD and 397.70 → 261.35 µs on WARP. The AMD maximum rose slightly, so the AMD performance evidence is limited. Is the table-constant branch already in your current-main plan? I can share the exact fixture and hunk to avoid parallel implementations. AI-assisted using Codex. |
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
|
I found a 32-bit byte-offset wrap case in the table SRV path. On Windows WARP, the same hand-written To reproduce, extend The fixture's current expectation uses a host I also checked a conservative version that groups only known, dword-aligned offsets with a proven non-wrapping last dword and keeps scalar reads for dynamic offsets. The fixed, dynamic, partial-view and wrapping cases passed on WARP for widths 2/4/8/16. This establishes the difference from the previous translator. A console result at this boundary would settle which behavior the emulation should implement. AI-assisted. |
|
On the hardware question above: RDNA2 ( So — Neon |
Summary
Rebased cleanly onto
upstream/main(ffe310e):Adds
Lower::raw_buffer_loadincrates/victory-shader/src/emit/lower.rsto coalesce contiguous dword raw-buffer loads into vectorizeddx.op.rawBufferLoad.f32calls of up to 4 dwords (mask0x1/0x3/0x7/0xF,align4) withextractvaluechannel extraction:s_buffer_load_dwordx2/4/8/16->1/1/2/4loads).global_load_dwordx2/3/4->1load, preserving sub-dword andCODEpaths) andformat_load.Verification
cargo clippy -p victory-shader --all-targets— passedcargo test -p victory-shader— passed (including 3 new tests withdxil.dllvalidation and live hardware GPU + WARP execution covering partial-OOB zero semantics)cargo xtask policy— passed