Shaders: accept inline constants in V_PK_FMAC_F16 #3148
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3148
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3148"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 10:23 UTC · original
andrewpozdnakov7-jpg:fix/pk-fmac-f16-constants→main· +61 −4 · 2 files · 2 commits · openMerge #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 <[email protected]>.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 <[email protected]>.@Dukestar69 on GitHub · 2026-11-26 10:28 UTC · original · approved these changes
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).
@steven-seagull27 on GitHub · 2026-11-26 10:41 UTC · original
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 (
c95fa3b).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
+0there. With an infinite multiplier and a+1accumulator, those cases returned+1where0 × ∞ + 1should produce a NaN. For example, with inline integer1(src0=129), multiplier0x7c006400, and accumulator0x3c000000, the RTX 5080 read0x3c000400inline and0x7fff0400from the register. The low halves and every finite-multiplier control matched on all three adapters. The parent (63bcca4) refused all 90 inline programs during translation, while the register control passed on all three.I applied only the packed-FMA lowering change from #2884 at
64c62d5on top of this head. Both source forms then matched all 360 half results on each adapter. That gives the two PRs a concrete shared test for round-to-nearest-even.The test-only commit keeps five representative encodings, both multipliers, and the same-bit register control. To apply it on this PR and reproduce:
These are synthetic shader readbacks. AI-assisted with Codex.
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 11:44 UTC · original
Thanks, @steven-seagull27. I added your original test commit
7510c12with its Git authorship intact. On app-local WARP 1.0.22 with DXIL validation, the local combination with #2884 at64c62d5passed the three packed FMAC tests, the packed single-rounding test, and all 37 VALU tests. The smaller five-encoding fixture also passed in three fresh local WARP runs on the test commit alone. The 360-result matrix on each adapter is from your report.Please merge #2884 before #3148. If folding the regression test into another commit, please retain
Co-authored-by: steven-seagull27 <[email protected]>.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.