Repository navigation
shader: lower 6 RDNA2 integer dot-product instructions without INT64 - #1694
geiyiliyabumo wants to merge 1 commit into
Conversation
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, with dxil.dll validator):
cargo test -p victory-shader --lib dot— all 5 new dot-product tests (v_dot2c_f32_f16_reads_old_destination,v_dot4c_i32_i8_reads_old_destination_and_wraps,v_dot2_f32_f16_applies_packed_modifiers_and_clamp,vop3p_integer_dots_clamp_or_wrap_the_full_sum,vop3p_integer_dot2_selects_each_source_half) passed on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— ok
Clean 32-bit-only lowering of RDNA2 VOP2/VOP3P dot-product instructions without INT64, thoroughly verified on hardware and WARP. Looks good.
AI-assisted (Gemini 4 Neon).
26551e9 to
da18cb8
Compare
|
Reviewed head da18cb8 locally (isolated worktree, fresh CARGO_TARGET_DIR, real GPU dispatch, ~90s for the dot tests). What it does: lowers the six RDNA2 integer dot products — Verified locally:
Findings, ranked:
LGTM. |
catminou4
left a comment
There was a problem hiding this comment.
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (ffe310e), cargo test -p victory-shader --locked → 96 passed, 0 failed. Hardware/valu/waterfall execution tests are #[cfg(all(test, windows))] and run only on Windows; macOS covers lowering/structure unit tests.
Six RDNA2 integer dot-product instructions lowered without INT64 (vop2_dot/vop3p_dot const encoders, dot_int helper); tests pin old-destination reads and wraparound per backend.
|
NVIDIA run: RTX 3070 8 GB, driver 616.56, Windows 11, debug, at the PR head |
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1292. The six integer dot products of #1292 in one helper. Its v_dot4_i32_i8/v_dot4c_i32_i8 arms ignore op_sel, which main's (added today for the upscaler's shaders, lower.rs:5371-5428) handle; the other four are not used by the title. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
Upstream model preferred throughout; our additive diagnostics kept: Marvisak#1750 250ms wait slices + stall reporting, copy/timing stats, texture-flow made/freed, stencil-view log, costs wiring, FrameWindow meter, lazy host-copy semantics via upstream made_copy, Marvisak#1267/Marvisak#1824/Marvisak#1694/Marvisak#1699 kept (Parts, opcode key, dot_int, 16-bit). Port adaptations where our async model differs: withholding wired at completion (note_submission + expansion + memory_withheld), per-range settle in copy_page_mappings instead of drain-everything, sync-model drain() in async-sensitive GPU tests. Dropped as superseded: manual settle around texture refresh (upstream per-thread Scratch + kept-alive per-submission uploads), Touches.staging, per-list timing grouping (upstream cuts).
Summary
crates/victory-shader/src/emit/lower.rs(Lower::dot_int):v_dot4c_i32_i8(0x00d, reading oldvdstalready supplied byir.rs).v_dot2_i32_i16(0x014),v_dot2_u32_u16(0x015),v_dot4_i32_i8(0x016),v_dot4_u32_u8(0x017),v_dot8_u32_u4(0x019).INT64(0x8000) nor native 16-bit (0x40000) feature flags inSFI0.op_sel/op_sel_hihalf selection ondot2, exact signed/unsignedCLAMPsaturation (includingi16x2+2^31andu16x2double-carry saturation), and wraparound whenclampis clear.v_dot2_f32_f16/v_dot2c_f32_f16).Verification
cargo test -p victory-shader --lib valu_tests: PASS on both AMD Radeon RX 9060 XT (D3D12 hardware) and Microsoft Basic Render Driver (WARP) (v_dot4c_i32_i8_reads_old_destination_and_wraps,vop3p_integer_dots_clamp_or_wrap_the_full_sum,vop3p_integer_dot2_selects_each_source_half, asserting bothINT64and native 16-bitSFI0flags are clear).cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: pass (154 files).AI-assisted; synthetic tests only, no game files.