test(shader): check v_fma_mix_f32 in FmaRounding #1445

Merged
Deftera186 merged 1 commit from upstream-pr/1445 into main 2026-10-09 09:41:10 +00:00
Deftera186 commented 2026-10-08 06:46:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Deftera186 on 2026-10-08T06:46:50Z.


What

#1878 merged the same roundsProductSeparately fix while this was open, so this PR now only keeps its FmaRounding row.

FmaRounding checks v_fma_f32, v_fmac_f32, v_fmaak_f32 and v_fmamk_f32 against the fused result on the GPU, but not v_fma_mix_f32. It now also runs v_fma_mix_f32 v20, v4, v5, v6 with all sources f32 on its 64 rows and expects the fused value. The row is in the group that is skipped when the device splits fma, so it checks the values on drivers that fuse, next to the IR routing test from #1878.

Tested

Gentoo Linux, RX 7700 XT (gfx1101), RADV from Mesa 26.2.3, on top of f1451396:

  • agc_driver_fma_rounding passes, and all 494 tests pass. Before #1878, the same test failed with lane 1 v_fma_mix_f32 is 0x00000000, expected 0x2f8e8ae0.
  • tools/hw-oracle on the same GPU: the hardware's v_fma_mix_f32 matches the test's fused column on 64 of 64 rows (51 of them differ from separate).

yahya308 ran the earlier head on Windows with an RTX 4070 and a Radeon 780M. Neither splits fma, so the row was checked there and passed. On lavapipe the fused group is skipped, as before.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4782959298 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1445). Originally posted by [Deftera186](https://github.com/Deftera186) on 2026-10-08T06:46:50Z. --- ### What #1878 merged the same `roundsProductSeparately` fix while this was open, so this PR now only keeps its `FmaRounding` row. `FmaRounding` checks `v_fma_f32`, `v_fmac_f32`, `v_fmaak_f32` and `v_fmamk_f32` against the fused result on the GPU, but not `v_fma_mix_f32`. It now also runs `v_fma_mix_f32 v20, v4, v5, v6` with all sources f32 on its 64 rows and expects the fused value. The row is in the group that is skipped when the device splits fma, so it checks the values on drivers that fuse, next to the IR routing test from #1878. ### Tested Gentoo Linux, RX 7700 XT (gfx1101), RADV from Mesa 26.2.3, on top of f1451396: - `agc_driver_fma_rounding` passes, and all 494 tests pass. Before #1878, the same test failed with `lane 1 v_fma_mix_f32 is 0x00000000, expected 0x2f8e8ae0`. - `tools/hw-oracle` on the same GPU: the hardware's `v_fma_mix_f32` matches the test's `fused` column on 64 of 64 rows (51 of them differ from `separate`). yahya308 ran the earlier head on Windows with an RTX 4070 and a Radeon 780M. Neither splits fma, so the row was checked there and passed. On lavapipe the fused group is skipped, as before. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
yahya308 commented 2026-10-08 15:28:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yahya308 on 2026-10-08T15:28:56Z.


Tested on top of main 9e2ffe0d, Windows 11, MinGW-w64 GCC 16.2.0, full ctest with ANYPS5_REQUIRE_VULKAN=1 --repeat until-fail:3, NVIDIA RTX 4070 Laptop (32.0.16.1074) and AMD Radeon 780M (32.0.31041.1004). vopc_compare_table fails on the 780M on main too (#825, #1473).

Head 9400a049: no change from main on either GPU. FmaRounding reported no split fma on either device, so the fused group with the new v_fma_mix_f32 row was checked, and it passed.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6063310708 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1445#issuecomment-6063310708). Originally posted by [yahya308](https://github.com/yahya308) on 2026-10-08T15:28:56Z. --- Tested on top of main `9e2ffe0d`, Windows 11, MinGW-w64 GCC 16.2.0, full ctest with `ANYPS5_REQUIRE_VULKAN=1 --repeat until-fail:3`, NVIDIA RTX 4070 Laptop (32.0.16.1074) and AMD Radeon 780M (32.0.31041.1004). `vopc_compare_table` fails on the 780M on main too (#825, #1473). Head `9400a049`: no change from main on either GPU. `FmaRounding` reported no split fma on either device, so the fused group with the new `v_fma_mix_f32` row was checked, and it passed. AI-assisted: yes (Claude Code).
Deftera186 commented 2026-10-09 02:25:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Deftera186 on 2026-10-09T02:25:05Z.


Rebased after #1878 merged the same fix: this PR now only adds the v_fma_mix_f32 row to FmaRounding.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6072987564 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1445#issuecomment-6072987564). Originally posted by [Deftera186](https://github.com/Deftera186) on 2026-10-09T02:25:05Z. --- Rebased after #1878 merged the same fix: this PR now only adds the `v_fma_mix_f32` row to `FmaRounding`.
Sign in to join this conversation.
No reviewers
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
boykopovar/AnyPS5!1445
No description provided.