A half kept by v_fma_mixlo_f16 and replaced by v_fma_mixhi_f16 is refused as its old input (barycentrics; 79 shaders) #375

Closed
opened 2026-11-27 14:34:09 +00:00 by github-bot · 4 comments
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-27 14:30 UTC · original

The largest pixel class in #4's list: "barycentrics read directly" covers 146 pixel shaders in a 12,020-shader corpus (Series S, boot to the menus, main 905e7aa). Many of them, plus some refused for "the first half of an interpolation", have a false dependency.

The shape. v_fma_mixlo_f16 v1, ... writes the low half and keeps the high half of a register that still holds a barycentric input (or an interpolation's first half). Then v_fma_mixhi_f16 v1, ... replaces that high half, and exp ... compr writes the pair.

Why it is refused. The mix lowering already records the low half (low16) and marks the value unknown. But v_fma_mixhi_f16 refuses the unknown value, though it keeps only the low half.

Plan.

  • Let v_fma_mixhi_f16 take the low half from low16.
  • Keep everything else that reads such a value refused.
  • Add a GPU draw test and a by-output sweep.
**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-27 14:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372) The largest pixel class in #4's list: "barycentrics read directly" covers 146 pixel shaders in a 12,020-shader corpus (Series S, boot to the menus, main `905e7aa`). Many of them, plus some refused for "the first half of an interpolation", have a false dependency. **The shape.** `v_fma_mixlo_f16 v1, ...` writes the low half and keeps the high half of a register that still holds a barycentric input (or an interpolation's first half). Then `v_fma_mixhi_f16 v1, ...` replaces that high half, and `exp ... compr` writes the pair. **Why it is refused.** The mix lowering already records the low half (`low16`) and marks the value unknown. But `v_fma_mixhi_f16` refuses the unknown value, though it keeps only the low half. **Plan.** - Let `v_fma_mixhi_f16` take the low half from `low16`. - Keep everything else that reads such a value refused. - Add a GPU draw test and a by-output sweep.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 14:34:09 +00:00
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-27 14:30 UTC · original

/claim

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-27 14:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7220873235) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 14:30 UTC · original

Claimed by @⁠tiagonogueiraa-bit. Open a draft pull request with Refs #372 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 14:30 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7220879300) Claimed by @⁠tiagonogueiraa-bit. Open a draft pull request with `Refs #372` in its description within 24 hours, or the claim expires.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-27 14:35 UTC · original

Widened to the other order too (v_fma_mixhi_f16 first, then v_fma_mixlo_f16). #377 now gains 91 shaders (90 pixel, 1 vertex) with no regressions; 2 shaders now name the other unknown half.

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-27 14:35 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7220968336) Widened to the other order too (`v_fma_mixhi_f16` first, then `v_fma_mixlo_f16`). #377 now gains 91 shaders (90 pixel, 1 vertex) with no regressions; 2 shaders now name the other unknown half.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-28 00:35 UTC · original

Thank you. Both orders of v_fma_mixlo_f16 and v_fma_mixhi_f16 are followed now (#377, on main). Your sweep showed 79 shaders gained for the first order and 91 for both together, no regressions. Two pixel shaders now name another unknown half ("the first half of an interpolation"), so this class is not finished; I am not sure it is fully fixed. I did not see these pixel shaders draw in the game. Closing this one; please open a new issue for the 2 that remain.

**@⁠LakshanSivakumar** on GitHub · 2026-11-28 00:35 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7231036049) Thank you. Both orders of v_fma_mixlo_f16 and v_fma_mixhi_f16 are followed now (#377, on main). Your sweep showed 79 shaders gained for the first order and 91 for both together, no regressions. Two pixel shaders now name another unknown half ("the first half of an interpolation"), so this class is not finished; I am not sure it is fully fixed. I did not see these pixel shaders draw in the game. Closing this one; please open a new issue for the 2 that remain.
This discussion has been locked. Commenting is limited to contributors.
No description provided.