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

Closed
opened 2026-11-27 14:30:37 +00:00 by tiagonogueiraa-bit · 4 comments
tiagonogueiraa-bit commented 2026-11-27 14:30:37 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by tiagonogueiraa-bit on 2026-11-27T14:30:37Z.


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.
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6648425073 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-27T14:30:37Z. --- 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 commented 2026-11-27 14:30:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by tiagonogueiraa-bit on 2026-11-27T14:30:38Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7220873235 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7220873235). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-27T14:30:38Z. --- /claim
github-actions[bot] commented 2026-11-27 14:30:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T14:30:55Z.


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

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7220879300 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7220879300). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T14:30:55Z. --- Claimed by @tiagonogueiraa-bit. Open a draft pull request with `Refs #372` in its description within 24 hours, or the claim expires.
tiagonogueiraa-bit commented 2026-11-27 14:35:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by tiagonogueiraa-bit on 2026-11-27T14:35:05Z.


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

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7220968336 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7220968336). Originally posted by [tiagonogueiraa-bit](https://github.com/tiagonogueiraa-bit) on 2026-11-27T14:35:05Z. --- Widened to the other order too (`v_fma_mixhi_f16` first, then `v_fma_mixlo_f16`). #374 now gains 91 shaders (90 pixel, 1 vertex) with no regressions; 2 shaders now name the other unknown half.
LakshanSivakumar commented 2026-11-28 00:35:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T00:35:37Z.


Thank you. Both orders of v_fma_mixlo_f16 and v_fma_mixhi_f16 are followed now (#374, 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.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7231036049 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/372#issuecomment-7231036049). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-28T00:35:37Z. --- Thank you. Both orders of v_fma_mixlo_f16 and v_fma_mixhi_f16 are followed now (#374, 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.
Sign in to join this conversation.
No labels
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.

Reference
LakshanSivakumar/Native-Victory-macOS#372
No description provided.