Repository navigation
Shaders: accept inline constants in V_PK_FMAC_F16 - #3148
andrewpozdnakov7-jpg wants to merge 2 commits into
Conversation
Dukestar69
left a comment
There was a problem hiding this comment.
Verified on RTX 5090 & WARP against origin/main (63bcca4):
cargo test -p victory-shader --lib packed_fmac_accepts_inline_constants -- --test-threads=1: passed on RTX 5090 and WARP.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Clean fix allowing inline constants in V_PK_FMAC_F16.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
|
I confirmed the three existing packed-FMAC inline cases on an RTX 5080, Windows WARP, and WARP 1.0.22. That agrees with the RTX 5090 review. I also found one case where the inline and register forms give different answers on this head ( I tested all 90 inline encodings with a finite and an infinite high-half multiplier, reading both halves of each packed word. The register control loaded the same 32-bit pattern at run time. Each column counts mismatched halves out of 360. NaNs were compared by class, so different NaN signs or payloads pass.
All 74 differences were in the high half: the 65 nonnegative integer encodings and nine floating-point encodings contributed I applied only the packed-FMA lowering change from #2884 at The test-only commit keeps five representative encodings, both multipliers, and the same-bit register control. To apply it on this PR and reproduce: git fetch https://github.com/steven-seagull27/VIctory.git refs/heads/codex/pr3148-packed-inline-coverage
git cherry-pick 7510c1286abe5da4041b60be1c64746e69e2beb1
cargo test --locked -p victory-shader --lib packed_fmac_ -- --test-threads=1 --nocaptureThese are synthetic shader readbacks. AI-assisted with Codex. |
|
Thanks, @steven-seagull27. I added your original test commit Please merge #2884 before #3148. If folding the regression test into another commit, please retain |
Merge #2884 before #3148. The nearest-even packed FMA lowering in #2884 covers the infinite-multiplier case observed by Steven on the RTX 5080 and app-local WARP 1.0.22. With that dependency, Steven reported 360/360 results on each of three adapters. Adapter results
The PR now includes Steven's original test commit
7510c12for representative inline encodings, finite and infinite multipliers, and a register control. The local combination with #2884 at64c62d5passed all three packed FMAC tests, the packed single-rounding test, and 37 VALU tests on app-local WARP 1.0.22 with DXIL validation. The five-encoding fixture also passed in three fresh local WARP runs on the test commit alone.Please retain Steven's Git authorship for the regression test. If folding it into a different commit, use
Co-authored-by: steven-seagull27 <242719754+steven-seagull27@users.noreply.github.com>.V_PK_FMAC_F16fails to lower when SRC0 is an inline constant. Use the existing GFX10 FP16 operand decoder, which places inline FP16 constants in the low half with zero in the high half. LLVM AMDGPU encoding. The inline-float case was also noted in #1136.The synthetic VOP2 fixture returns
Unsupportedon main. With the change, it checks both output halves on WARP for inline 0.5, -4.0, and integer zero. The register-source control and all 36 VALU tests passed on WARP. Strict shader Clippy and the asset policy passed.AI-assisted with Codex. Please retain the Git author when cherry-picking or rebasing. If folded into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <andrewpozdnakov7-jpg@users.noreply.github.com>.