build.py, check.py: take the f16 interpolation fallback from the device, as run_gpu_tests.py does; no false failures on MoltenVK (TEST-CHECK-F16-INTERP-AUTO) #2176

Open
github-bot wants to merge 2 commits from github-bot/gh-2176 into main AGit
Owner

@⁠Tauwni on GitHub · 2026-11-26 02:08 UTC · original
Tauwni:fix/check-f16-interp-fallback-auto → main · +56 −11 · 3 files · 2 commits · draft

Claimed in the coordination issue as: TEST-CHECK-F16-INTERP-AUTO (#1608)

What and why

scripts/run_gpu_tests.py turns on --f16-interp-fallback by itself where tools/vk_subgroup_info.py reports per_vertex_inputs: false (MoltenVK can't convert PerVertexKHR inputs to Metal). runtime/test/shaders/build.py and check.py took it only from LEONIDA_F16_INTERP_FALLBACK=1. So the standalone build.py + check.py run that docs/testing.md describes fails two fixtures on a Mac:

ps_ij_computed       vk_harness failed or returned no pixels
ps_interp_f16_high   vk_harness failed or returned no pixels

Both were translated with PerVertexKHR inputs that MoltenVK can't compile.

With this change, build.py and check.py ask the same question as run_gpu_tests.py. The variable still forces the answer either way, and now also takes 0. build.py caches the answer, as run_gpu_tests.py does. docs/testing.md is updated to match.

Tested

Apple M3, macOS 26.5.1. build.py + check.py on main with this change and the open fixes the run needs (#1444 so build.py gets past cs_dpp_cmp), test programs rebuilt:

before after
MoltenVK 1.4.2 ps_interp_f16_high, ps_ij_computed FAIL ps_interp_f16_high ok, ps_ij_computed SKIP
KosmicKrisp (Mesa 26.3.1) both SKIP (no VK_KHR_fragment_shader_barycentric) ps_interp_f16_high ok, ps_ij_computed SKIP
llvmpipe (Mesa 26.3.1) both SKIP ps_interp_f16_high ok, ps_ij_computed SKIP

These now match what run_gpu_tests.py reports on the same three drivers. No other fixture changes. tests/test_run_gpu_tests.py, tests/test_shader_checks.py and the docs tests are OK.

GPUs tested: Apple M3 (10-core GPU), MoltenVK 1.4.2 and KosmicKrisp (Mesa 26.3.1), macOS 26.5.1 (25F80); llvmpipe (Mesa 26.3.1)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🤖 Generated with Claude Code

**@⁠Tauwni** on GitHub · 2026-11-26 02:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2176) `Tauwni:fix/check-f16-interp-fallback-auto` → `main` · +56 −11 · 3 files · 2 commits · draft Claimed in the coordination issue as: TEST-CHECK-F16-INTERP-AUTO (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why `scripts/run_gpu_tests.py` turns on `--f16-interp-fallback` by itself where `tools/vk_subgroup_info.py` reports `per_vertex_inputs: false` (MoltenVK can't convert `PerVertexKHR` inputs to Metal). `runtime/test/shaders/build.py` and `check.py` took it only from `LEONIDA_F16_INTERP_FALLBACK=1`. So the standalone `build.py` + `check.py` run that `docs/testing.md` describes fails two fixtures on a Mac: ``` ps_ij_computed vk_harness failed or returned no pixels ps_interp_f16_high vk_harness failed or returned no pixels ``` Both were translated with `PerVertexKHR` inputs that MoltenVK can't compile. With this change, `build.py` and `check.py` ask the same question as `run_gpu_tests.py`. The variable still forces the answer either way, and now also takes `0`. `build.py` caches the answer, as `run_gpu_tests.py` does. `docs/testing.md` is updated to match. ### Tested Apple M3, macOS 26.5.1. `build.py` + `check.py` on `main` with this change and the open fixes the run needs (#1444 so `build.py` gets past `cs_dpp_cmp`), test programs rebuilt: | | before | after | |---|---|---| | MoltenVK 1.4.2 | `ps_interp_f16_high`, `ps_ij_computed` FAIL | `ps_interp_f16_high` ok, `ps_ij_computed` SKIP | | KosmicKrisp (Mesa 26.3.1) | both SKIP (no `VK_KHR_fragment_shader_barycentric`) | `ps_interp_f16_high` ok, `ps_ij_computed` SKIP | | llvmpipe (Mesa 26.3.1) | both SKIP | `ps_interp_f16_high` ok, `ps_ij_computed` SKIP | These now match what `run_gpu_tests.py` reports on the same three drivers. No other fixture changes. `tests/test_run_gpu_tests.py`, `tests/test_shader_checks.py` and the docs tests are OK. GPUs tested: Apple M3 (10-core GPU), MoltenVK 1.4.2 and KosmicKrisp (Mesa 26.3.1), macOS 26.5.1 (25F80); llvmpipe (Mesa 26.3.1) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Unset, LEONIDA_F16_INTERP_FALLBACK only turned the fallback on in run_gpu_tests.py. A standalone build.py + check.py
run on MoltenVK translated ps_interp_f16_high and ps_ij_computed with PerVertexKHR inputs it can't compile, and
both failed (vk_harness returned no pixels).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:21:18 +00:00
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 10:20 UTC · original

Partly verified on main a73a57e1 with Mesa llvmpipe (Mesa 25.2.8, LLVM 20.1.2, Ubuntu 24.04 x86-64, no GPU), llvm-mc 21.1.8, LEONIDA_F16_INTERP_FALLBACK unset. Merges cleanly into main.

  • Standalone build.py + check.py, which this PR changes: on both trees build.py stops at cs_dpp_cmp.asm ("dpp variant of this instruction is not supported"), the failure #1444 fixes. Before it stops, with this PR it prints "not built (computed I/J pairs need PerVertexKHR inputs, off under the fallback): ps_ij_computed", and check.py reports ps_ij_computed as SKIP with that reason instead of main's "missing ps_ij_computed.spv".
  • Not confirmed here: ps_interp_f16_high (build.py stops before it), and the MoltenVK case itself. llvmpipe has no VK_KHR_fragment_shader_barycentric, so even a complete build skips both shaders there for that reason (checked with #1444 alone: 117 of 234 pass, both SKIP).

Note for review: it conflicts with #1444 in runtime/test/shaders/build.py, so whichever lands later needs a rebase, and a full standalone run needs both.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 10:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2176#issuecomment-7189232483) Partly verified on main a73a57e1 with Mesa llvmpipe (Mesa 25.2.8, LLVM 20.1.2, Ubuntu 24.04 x86-64, no GPU), llvm-mc 21.1.8, LEONIDA_F16_INTERP_FALLBACK unset. Merges cleanly into main. - Standalone build.py + check.py, which this PR changes: on both trees build.py stops at cs_dpp_cmp.asm ("dpp variant of this instruction is not supported"), the failure #1444 fixes. Before it stops, with this PR it prints "not built (computed I/J pairs need PerVertexKHR inputs, off under the fallback): ps_ij_computed", and check.py reports ps_ij_computed as SKIP with that reason instead of main's "missing ps_ij_computed.spv". - Not confirmed here: ps_interp_f16_high (build.py stops before it), and the MoltenVK case itself. llvmpipe has no VK_KHR_fragment_shader_barycentric, so even a complete build skips both shaders there for that reason (checked with #1444 alone: 117 of 234 pass, both SKIP). Note for review: it conflicts with #1444 in runtime/test/shaders/build.py, so whichever lands later needs a rebase, and a full standalone run needs both. AI-assisted: yes (Claude Code)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2176/head:github-bot/gh-2176'
git switch 'github-bot/gh-2176'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2176'
git switch 'github-bot/gh-2176'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2176'
git switch 'github-bot/gh-2176'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2176'
git switch 'main'
git merge --squash 'github-bot/gh-2176'
git switch 'main'
git merge --ff-only 'github-bot/gh-2176'
git switch 'main'
git merge 'github-bot/gh-2176'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.