shader: raise v_interp_p1lv_f16 #456

Closed
github-bot wants to merge 1 commit from gh-pr/456/head into gh-pr/456/base
Owner

@⁠Loggerten on GitHub · 2026-11-24 03:37 UTC · original
Loggerten:fix/interp-p1lv-f16 → main · +45 −5 · 1 files · 1 commits · closed without merging

What

v_interp_p1lv_f16 (VINTRP 0x343) was the one f16 interpolation first half with no I/O raising: io::raise handled only v_interp_p1ll_f16 and v_interp_p2_f16, so any program using it failed with an interpolation form.

It pairs exactly as p1ll does. 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

  • New test io::tests::lane_value_first_half_pairs_with_f16_second: a p1lv_f16 first half followed by a p2_f16 second half. Panics on main with an interpolation form, passes with this change.
  • cargo test -p victory-shader: 57 passed, 0 failed (56 baseline + 1).
  • cargo fmt --check -p victory-shader clean; cargo clippy -p victory-shader --all-targets no new warnings.
  • cargo xtask policy: 151 files ok.

AI-assisted (Hermes Agent); I reviewed the diff and ran the tests and gates myself.

**@⁠Loggerten** on GitHub · 2026-11-24 03:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/456) `Loggerten:fix/interp-p1lv-f16` → `main` · +45 −5 · 1 files · 1 commits · closed without merging ## What `v_interp_p1lv_f16` (VINTRP 0x343) was the one f16 interpolation first half with no I/O raising: `io::raise` handled only `v_interp_p1ll_f16` and `v_interp_p2_f16`, so any program using it failed with `an interpolation form`. It pairs exactly as `p1ll` does. 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 - New test `io::tests::lane_value_first_half_pairs_with_f16_second`: a `p1lv_f16` first half followed by a `p2_f16` second half. Panics on main with `an interpolation form`, passes with this change. - `cargo test -p victory-shader`: 57 passed, 0 failed (56 baseline + 1). - `cargo fmt --check -p victory-shader` clean; `cargo clippy -p victory-shader --all-targets` no new warnings. - `cargo xtask policy`: 151 files ok. AI-assisted (Hermes Agent); I reviewed the diff and ran the tests and gates myself.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:04:44 +00:00
github-bot closed this pull request 2026-11-26 04:04:44 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 03:42 UTC · original

Verified 4b8a1ca on 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).

**@⁠DaviTostes** on GitHub · 2026-11-24 03:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/456#issuecomment-7121346290) Verified `4b8a1ca` on **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).
Author
Owner

@⁠LocranKing on GitHub · 2026-11-24 04:18 UTC · original

Tested on Windows 11 + retail shaders.rpf (1.0.2.1) using victory translate --validate.

Tested

  • Commit: 4b8a1ca (pr-456, clean tree)
  • Environment: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, Rust 1.98.1 (x86_64-pc-windows-msvc), Windows SDK 10.0.26100.0 dxil.dll
  • cargo xtask policy: asset policy: 151 files ok
  • cargo test --workspace: 265 passed, 0 failed, 4 ignored
  • victory translate <shaders.rpf> --validate (diag build): 26084 / 26084 translated; 12272 VS/PS emitted (12172 validated), 1693 CS emitted (1670 validated), 8191 MS emitted (8129 validated) — counts unchanged vs main d2a4bae.

Not tested: Live GPU / WARP execution.

AI use: Antigravity (Gemini 4 Hydrogen) ran the checks and victory translate --validate and drafted this report from the command outputs.

**@⁠LocranKing** on GitHub · 2026-11-24 04:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/456#issuecomment-7121898261) Tested on Windows 11 + retail `shaders.rpf` (1.0.2.1) using `victory translate --validate`. **Tested** - Commit: `4b8a1ca` (`pr-456`, clean tree) - Environment: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, Rust `1.98.1` (`x86_64-pc-windows-msvc`), Windows SDK `10.0.26100.0` `dxil.dll` - `cargo xtask policy`: `asset policy: 151 files ok` - `cargo test --workspace`: **265 passed, 0 failed, 4 ignored** - `victory translate <shaders.rpf> --validate` (`diag` build): `26084 / 26084` translated; `12272` VS/PS emitted (`12172` validated), `1693` CS emitted (`1670` validated), `8191` MS emitted (`8129` validated) — counts unchanged vs `main` `d2a4bae`. **Not tested:** Live GPU / WARP execution. **AI use:** Antigravity (`Gemini 4 Hydrogen`) ran the checks and `victory translate --validate` and drafted this report from the command outputs.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:03 UTC · original

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.

**@⁠Marvisak** on GitHub · 2026-11-25 00:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/456#issuecomment-7148081564) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!456
No description provided.