tests: build.py and check.py pick the f16 interpolation fallback from the device (TEST-CHECK-F16-FALLBACK) #822
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/822"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by hugo0024 on 2026-11-24T14:12:59Z.
Claimed in the coordination issue as: TEST-CHECK-F16-FALLBACK (claim)
What and why
scripts/run_gpu_tests.pyandmake_game.pytranslate with--f16-interp-fallbackby themselves wheretools/vk_subgroup_info.pyreportsper_vertex_inputsfalse (MoltenVK).runtime/test/shaders/build.pyandcheck.pydid so only withLEONIDA_F16_INTERP_FALLBACK=1. So the two-step form on a Mac builtps_ij_computedandps_interp_f16_highfor PerVertexKHR inputs, andcheck.pyreported both as "vk_harness failed or returned no pixels". Every Apple record lists those two ascheck.py-only failures (#552, #564, #785).Both scripts now ask the device when the variable is unset, the way they already do for the barycentric fallback:
build.py:f16_interp_fallback()replaces the two== "1"reads (the translator flag, and leavingps_ij_computedout).check.py:F16_HALVEScomes from the same rule, so the two scripts agree on how the shaders were translated.1/0(andtrue/false,yes/no,on/off), asrun_gpu_tests.pyreads it. Before, only1meant anything here.docs/testing.md: the two paragraphs that saidbuild.pytranslates with the flag only when the variable is1.run_gpu_tests.pyis unchanged. The open claim for computed I/J pairs under this fallback (comment) is a translator change and is not touched here.Tested
Apple M5, MoltenVK 1.4.2, at
maind0da7dade. The two-step form,build.pythencheck.py:LEONIDA_F16_INTERP_FALLBACK01ps_interp_f16_high(nowok) andps_ij_computed(nowSKIP, and not built). The four left arecs_fma_fused,cs_imgload_tfe,cs_imgload_d16_tfeand the intermittentps_imgatomic(#543), which passed in the1run after the change, giving 177 there.1(280 of 280).tests/test_shader_build_fallbacks.py: 8 tests OK. The probe is pinned inrun_build, so the file no longer depends on the GPU of the machine running it. Without the source change the three new tests fail.run_gpu_tests.py: 184/249 passed, 61 skipped, 4 failed (the same four; 185 whenps_imgatomicpasses).ctest: 72/72.main.tests/test_tool_startup.pyandtests/test_tool_stdout_encoding.py. Both fail the same way on untouchedmaind0da7dade, overtools/native_pso_hashes.py.tests/test_docs_*.pyandtests/test_i18n_index.pypass.Not tested: a device without
VK_KHR_fragment_shader_barycentric(llvmpipe, NVIDIA Pascal), whereper_vertex_inputsis false too. There the two-step form now takes the pathrun_gpu_tests.pyalready takes: vertex shaders also export the decoded halves,ps_interp_f16_highreads them andps_ij_computedis left out. The CMake fixtures built throughbuild.pyfollow the same rule; on this Macctestpasses with them.GPUs tested: Apple M5 (8-core GPU), MoltenVK 1.4.2, macOS 27.2.1 (26B131)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:22:12Z.
Review: APPROVED
Clean-Room Peer Review for PR #822 (tests: build.py and check.py pick the f16 interpolation fallback from the device)
Excellent cross-platform graphics test harness parity:
untime/test/shaders/build.py and check.py with scripts/run_gpu_tests.py by querying ools/vk_subgroup_info.py for per_vertex_inputs support.
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:22:51Z.
Review: APPROVED
Clean-room verified (zero game data). Device probe fallback for 16-bit interpolation without PerVertexKHR (MoltenVK) cleanly mirrors run_gpu_tests.py. Unit tests pass (tests/test_shader_build_fallbacks.py: 5/5 PASS).
Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-25T10:44:07Z.
This conflicts with #1444 in
runtime/test/shaders/build.py: both add a block right afterbarycentric_fallback()(#1444TEXT_ONLY_MARKandtext_only_listing(), this PRf16_interp_fallback_override()andf16_interp_fallback()). Git stops on that one hunk; the rest merges. The resolution is to keep both blocks, #1444's first:Checked on an Apple M3 (macOS 26.5.1) with both merged that way on
main57ba40bd6, together with #1518, #1724, #1212, #1673, #1657, #1412 and #1375:tests/test_shader_build_text_only.pyandtests/test_shader_build_fallbacks.pyOK;build.py296/296 translated and valid;check.pyon MoltenVK 1.4.2 186 of 231 pass, 44 skipped, and the one failure isps_ssharp(Metal takes no sampler LOD bias). With this PRps_interp_f16_highis ok andps_ij_computedis skipped with its reason, wheremainreports "vk_harness failed" for both. Whichever of the two lands second needs only this hunk. AI-assisted (Claude Code).Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:44:08Z.
Verified by OreoFR
Run 1 (win02)
5cb45921e+ PR head6064cbbb4; green run in a merge package of 2 PRs, no new ctest failure vs mainpython -I tests/test_shader_build_fallbacks.py ; package ctestRun 2 (lot 4)
09c153948+ PR head6064cbbb4; integration package 3 of 6 (4 PRs, merged without conflict)Run 3 (lot 4 bis)
33db04a70+ PR head6064cbbb4; integration package of 15 PRspython -I tests/test_shader_build_fallbacks.py)All runs
AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T21:51:46Z.
Merged after OreoFR's red/green check (check) (RTX 4070 Laptop, driver 621.40, Windows 11) and a local re-check here. Merged after local re-verification: this PR merged onto
maina8465211fwithout conflict, and its test file(s) (tests/test_shader_build_fallbacks.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.