mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:40:52 +01:00
[PR #822] tests: build.py and check.py pick the f16 interpolation fallback from the device (TEST-CHECK-F16-FALLBACK) #861
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#861
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/822
Author: @hugo0024
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:check-f16-fallback📝 Commits (1)
1bca051tests: build.py and check.py pick the f16 interpolation fallback from the device (TEST-CHECK-F16-FALLBACK)📊 Changes
4 files changed (+151 additions, -15 deletions)
View changed files
📝
docs/testing.md(+7 -4)📝
runtime/test/shaders/build.py(+33 -5)📝
runtime/test/shaders/check.py(+29 -3)📝
tests/test_shader_build_fallbacks.py(+82 -3)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.