Skip to content

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

Draft
Tauwni wants to merge 3 commits into
ProjectLeonida:mainfrom
Tauwni:fix/check-f16-interp-fallback-auto
Draft

Tauwni wants to merge 3 commits into
ProjectLeonida:mainfrom
Tauwni:fix/check-f16-interp-fallback-auto

Conversation

@Tauwni

@Tauwni Tauwni commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

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

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

… interpolation fallback, as run_gpu_tests.py

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 <noreply@anthropic.com>
@real-rusher

Copy link
Copy Markdown

Partly verified on main a73a57e 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.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants