shader: raise v_interp_p1lv_f16 #456
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/456"
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?
Imported from Marvisak/VIctory. Originally posted by Loggerten on 2026-11-24T03:37:50Z.
What
v_interp_p1lv_f16(VINTRP 0x343) was the one f16 interpolation first half with no I/O raising:io::raisehandled onlyv_interp_p1ll_f16andv_interp_p2_f16, so any program using it failed withan interpolation form.It pairs exactly as
p1lldoes. The only semantic difference: the P0 coordinate comes from a lane VGPR (v.src[2]) instead of LDS. The lowering recomputes the whole attribute channel from the input element, so nothing on the lowering side needed to change.Per-opcode semantics cross-checked against the RDNA 2 ISA guide and LLVM's AMDGPU VINTRP definitions.
Verified
io::tests::lane_value_first_half_pairs_with_f16_second: ap1lv_f16first half followed by ap2_f16second half. Panics on main withan interpolation form, passes with this change.cargo test -p victory-shader: 57 passed, 0 failed (56 baseline + 1).cargo fmt --check -p victory-shaderclean;cargo clippy -p victory-shader --all-targetsno new warnings.cargo xtask policy: 151 files ok.AI-assisted (Hermes Agent); I reviewed the diff and ran the tests and gates myself.
Imported from Marvisak/VIctory. Originally posted by towiice on 2026-11-24T03:51:40Z.
Review: COMMENTED
Tested:
stable-x86_64-pc-windows-gnullvm(llvm-mingw 23.1.6).cargo +stable-x86_64-pc-windows-gnullvm test -p victory-shaderio::tests::lane_value_first_half_pairs_with_f16_secondpasses cleanly. Raisingv_interp_p1lv_f16with lane VGPR source correctly completes the f16 interpolation half pairs without regressions.Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T06:23:24Z.
Review: APPROVED
Tested
4b8a1caon Windows 11, RTX 5070, MSVC:cargo test --workspace --no-fail-fastpasses (265 passed, 0 failed).victory translate <title exe> --validate --pipelinesgives the same counts before and after: 12 of 12 programs emitted, 12 validated, 12 pipelines. These programs have no f16 interpolation pairs.p1lv_f16exactly likep1ll_f16(attribute fromsrc[0], I fromsrc[1]), and the new test shows ap1lv+p2_f16pair raised as one perspective-center interpolation.P0the program supplied insrc[2]. That is correct when the VGPR holds the attribute's own P0, which is the normal use (an earlierv_interp_mov/LDS read). A program that puts a different base in that VGPR would be translated as if it had not. If that matters, checking thatsrc[2]traces back to the same attribute's P0 and refusing otherwise would keep it exact.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T03:42:33Z.
Verified
4b8a1caon Arch Linux x86_64 (rustc 1.98.1,cargo test -p victory-shader): 57 passed, 0 failed, 0 ignored.Not covered: f16 interpolation on a real GPU and title shaders (no game data here).
Imported from Marvisak/VIctory. Originally posted by LocranKing on 2026-11-24T04:18:28Z.
Tested on Windows 11 + retail
shaders.rpf(1.0.2.1) usingvictory translate --validate.Tested
4b8a1ca(pr-456, clean tree)1.98.1(x86_64-pc-windows-msvc), Windows SDK10.0.26100.0dxil.dllcargo xtask policy:asset policy: 151 files okcargo test --workspace: 265 passed, 0 failed, 4 ignoredvictory translate <shaders.rpf> --validate(diagbuild):26084 / 26084translated;12272VS/PS emitted (12172validated),1693CS emitted (1670validated),8191MS emitted (8129validated) — counts unchanged vsmaind2a4bae.Not tested: Live GPU / WARP execution.
AI use: Antigravity (
Gemini 4 Hydrogen) ran the checks andvictory translate --validateand drafted this report from the command outputs.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T12:32:47Z.
Review: APPROVED
Minimal, correct extension of the existing
v_interp_p1ll_f16pairing tov_interp_p1lv_f16. Both match arms inraise()andHalvesnow accept the lane-value first half, and the comment accurately notes the only difference (P0 fromv.src[2]lane VGPR instead of the local data share) doesn't affect what the pair needs — site, attribute, I.The new test pins the pairing end-to-end:
v_interp_p1lv_f16+v_interp_p2_f16produce oneInterp::InterpolatedwithPerspectiveCenterbarycentric and the right attribute/row. Verified locally: test-merge with current main (ffe310e) clean;cargo test -p victory-shader --locked(macOS arm64, rustc 1.98.1) → 97 passed / 0 failed / 1 ignored.upstream-sync referenced this pull request2026-11-24 19:03:41 +00:00
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:03:01Z.
Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today.
Raises v_interp_p1lv_f16 exactly like p1ll, but per the RDNA2 ISA its P0 is the VGPR operand S2 (a lane value), not the attribute's P0; the PR drops that operand, so a correct refusal becomes a silently wrong interpolation. No evidence the title uses the instruction.
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.
Pull request closed