Repository navigation
build.py: leave ps_ij_computed out under the PerVertexKHR fallbacks instead of failing the batch - #1853
Conversation
…nstead of failing the batch Under LEONIDA_BARY_FALLBACK=1 or LEONIDA_F16_INTERP_FALLBACK=1 the translator refuses ps_ij_computed (a computed I/J pair needs PerVertexKHR inputs, which both fallbacks take away). build.py counted that as a missing module and exited before publishing anything, so check.py then reported 0 of 147. A Mac needs LEONIDA_F16_INTERP_FALLBACK=1 for the two-step path, so that path never ran there, and the SKIP check.py gained in ItsNotRexed#1680 was never reached. Leave ps_ij_computed out under either fallback with a "not built" line, as build.py already does for ms_/gs_ shaders. Without a fallback it is built as before, and any other missing module still fails the batch. AI-assisted.
|
Tested Independent Linux Vulkan check on a GeForce RTX 5090, NVIDIA driver 595.99.02, Linux 7.0.0-43-generic, LLVM 21.1.8, and SPIRV-Tools 2026.1. I built All four build-fallback tests and 59 shader-check tests passed. The build-fallback suite emitted a Python 3.14 temporary-directory cleanup warning. AI-assisted verification. |
The fallback subtests called setUp() again, so the folder the first setUp() made was dropped without cleanup and Python warned (ResourceWarning: Implicitly cleaning up <TemporaryDirectory ...>). Each folder now registers its own cleanup. Seen by @tylerstraub on Python 3.14. AI-assisted.
|
@tylerstraub thanks for the RTX 5090 run and for checking all three modes through the real AI-assisted. |
lucastayaralvarenga-ui
left a comment
There was a problem hiding this comment.
All four synthetic test_shader_build_fallbacks.py tests pass on Windows with Python 3.12 at 949d08c6. The latest cleanup also removes the temporary-directory warning. I checked the selection against check.py. Both =1 fallback flags skip the same computed-I/J case, and the normal-build and missing-module cases still exercise the existing behavior. I did not run a GPU build. AI-assisted review.
|
Tested Retested the cleanup fix on Linux 7.0.0-43-generic with an RTX 5090, driver 595.99.02, LLVM 21.1.8, and SPIRV-Tools 2026.1. The four build-fallback tests passed under Python 3.14 with AI-assisted verification. |
|
Tested 5314dff on an NVIDIA GeForce GTX 1060 6GB (Pascal, no
|
Static review — PR #1853 (BUILD-501)Branch: (head of PR #1853) What it does
Changes
CPU test results
Reviewer recommendationApprove. Small, correct fix with proper tests. Uses a stand-in translator so no external tools are needed. AI-assisted. Reviewed with Claude Code. |
|
Tested 949d08c on RTX 3060 12 GB, NVIDIA 621.14, Vulkan 1.4.357, Windows 11 26H2: pass. Both GPU checks passed in native mode. With each fallback enabled separately, cs_store passed and ps_ij_computed was correctly omitted and reported as SKIP. All four synthetic CPU checks passed. AI-assisted verification. |
Item: TEST-276, claim in #1745. The
build.pyhalf of TEST-237, which #1680 (merged) didn't cover.What was wrong
Under
LEONIDA_BARY_FALLBACK=1orLEONIDA_F16_INTERP_FALLBACK=1the translator refusesps_ij_computed, because a computed I/J pair needs PerVertexKHR inputs and both fallbacks take them away.runtime/test/shaders/build.pycounted that as a missing module and exitedbefore publishing anything (
build.py:163-165).<out>/spirvstayed empty, andcheck.pythen reported 0 of 147.On a Mac the two-step path needs
LEONIDA_F16_INTERP_FALLBACK=1, becausecheck.pydoesn't detect MoltenVK the wayrun_gpu_tests.pydoes. So the documentedbuild.py+check.pyway never ran there, and the SKIPcheck.pygained in #1680 was never reached. GPUs withoutVK_KHR_fragment_shader_barycentricthat useLEONIDA_BARY_FALLBACK=1(RDNA1 on RADV, Intel Gen9, llvmpipe) hit the same wall. I reported this on #1680 before it was merged (comment).The fix
Under either fallback,
build.pyleavesps_ij_computedout and prints a "not built" line, as it already does forms_/gs_shaders. Without a fallbackps_ij_computedis built as before, and any other missing module still fails the batch.Tests
New
tests/test_shader_build_fallbacks.py(standard library). It loadsbuild.pyand replaces only the translator with a stand-in that writes the index and modules and, like the real one, refusesps_ij_computedunder a fallback:cs_store ps_ij_computedbuilds, the translator is never asked forps_ij_computed, andcs_store.spvis published;LEONIDA_F16_INTERP_FALLBACK=1publishes every module the translator was asked for,ps_interp_f16_highincluded;ps_ij_computedis still built, and a module missing for another reason still fails the batch.The first two fail on
mainwith the message above, and all 4 pass with the fix.tests/test_shader_checks.py,test_run_gpu_tests.pyandtest_mc_command.pypass, andcompileallis clean.End to end on an Apple M4 (MoltenVK 1.4.2, macOS 27.2.1, LLVM 23.1.6), with
LEONIDA_F16_INTERP_FALLBACK=1and the runtime built from this branch:main:build.pyexits 1 and publishes nothing;check.pygives0 of 147 pass.build.pyexits 0 (not built (computed I/J pairs need PerVertexKHR inputs, off under the fallback): ps_ij_computed);check.pygives71 of 154 pass, 81 skipped, withps_ij_computedSKIP andps_interp_f16_high ok.The two remaining failures are already on
mainand have nothing to do with this change:ps_ssharpis SHADER-268 (#1845).cs_cvt_f32_satis acheck.pyissue I'll post separately: it counts the "can't run this shader at 32 lanes" skip as 16 wrong inputs, andrun_gpu_tests.pypasses it 16/16.No game data. AI-assisted.