cmake: the d3d12_subgroup_test shader rule names the spirv tools folder (BUILD-SUBGROUP-SPIRV-TOOLS) #1129
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1129"
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 MalexAson on 2026-11-24T18:58:24Z.
Claimed in the coordination issue as: BUILD-SUBGROUP-SPIRV-TOOLS
What and why
The rule that translates the four shader sets of
d3d12_subgroup_testrantest/shaders/build.pywith onlyLLVM_MCin its environment, and the block was enabled byLEONIDA_LLVM_MC AND Vulkan_GLSLANG_VALIDATOR_EXECUTABLE. The seven other rules that runbuild.pypass"LEONIDA_SPIRV_TOOLS=${LEONIDA_SPIRV_TOOLS_NATIVE}"and are gated onLEONIDA_SPIRV_ASandLEONIDA_SPIRV_VAL.So when CMake finds
spirv-asthroughVULKAN_SDKor-DLEONIDA_SPIRV_ASbut the tools are not onPATH, the configure enables the test and the build stops at its four rules:The block now looks for the two tools as well, requires them, passes their folder to
build.py, and names them in its "is not built" message.Tested
PATH(named with-Donly). Onmainthe build stops at the four "Translating ... for the subgroup size test" rules. With the change the fourgenerated/subgroup_shaders/*/spirv/index.jsonoutputs build: 1 shader each, translated and spirv-val clean.tests/test_cmake_spirv_tools_env.py(2 tests, readsruntime/CMakeLists.txt, no compiler): both fail onmain, both pass with the change.python -Iontests/test_cmake_translator_deps.py,tests/test_cmake_vulkan_missing.pyandtests/test_ctest_registration.py: OK.scripts/check_no_game_data.pyon the two changed files: clean.d3d12_subgroup_testexecutable was not rebuilt with this change. Built from3aa975421with the tools appended toPATH,ctest -R d3d12_subgrouppassed on the GPU below.GPUs tested: Intel Iris Xe (8086:a7a0), Intel 32.0.101.7092, Windows 11 (for the d3d12_subgroup run above; the change itself needs no GPU)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (no translator rule)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:16:01Z.
Review: APPROVED
Reviewed and verified. Fixes build failure for
d3d12_subgroup_testwhen SPIRV tools are located via CMake-DorVULKAN_SDKbut not in systemPATH, by passingLEONIDA_SPIRV_TOOLS=${LEONIDA_SPIRV_TOOLS_NATIVE}tobuild.pyconsistently with the other shader build rules. Tested withtests/test_cmake_spirv_tools_env.py. 100% clean-room.Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:15:12Z.
Recommendation: [MERGE]
Reasoning: The
d3d12_subgroup_testshader rule now passesLEONIDA_SPIRV_TOOLSand is gated onspirv-as/spirv-vallike the other sevenbuild.pyrules, fixing builds where the tools are found viaVULKAN_SDKbut not on PATH. Small CMake fix with a regression test. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict withmain. Merge once the queued checks are green.Impact level: 3/10
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:44:04Z.
Windows 11 + MSVC
19.44+ NVIDIA GeForce RTX 3090 Verification (c6b493c519)Verified
c6b493c519135871bcfe4c49463df1923ee7b1eemerged cleanly ontomain(adfb3821a) on native Windows 11 (10.0.26200, VS 202217.14.40, MSVC19.44.35228, CPython3.12.10) and NVIDIA GeForce RTX 3090 (subgroup32..32, Vulkan1.4,VK_LAYER_KHRONOS_validation1.4.363.1), with zero game data.mainwithVULKAN_SDKset,spirv-as/spirv-valremoved fromPATH,LEONIDA_SPIRV_TOOLSunset):cmake --build <build> --config Release --target d3d12_subgroup_testfailed atTranslating cs_w64x_readlane for the subgroup size test (w64_native)with:CUSTOMBUILD : error : spirv-as not found; install SPIRV-Tools and put it on PATH(MSB8066, custom rule exit code2).main + #1129, samePATH-stripped environment):python -I tests/test_cmake_spirv_tools_env.py -v:2/2 OK(0.002s).cmake --build <build> --config Release --target d3d12_subgroup_test:rc=0— CMake resolvesLEONIDA_SPIRV_ASandLEONIDA_SPIRV_VALviaVULKAN_SDK, passesLEONIDA_SPIRV_TOOLSto all fourtest/shaders/build.pyrules (w64_native,w64_emulated,w32_native,w32_emulated), translates andspirv-val-validates every module, and linksd3d12_subgroup_test.exe.LEONIDA_VK_VALIDATION=1):d3d12_subgroup_test.exerc=0(0Khronos validation errors;w64 emulated (cs_w64x_readlane, --wave64-emulate): result exact (121 121 16 97 16 100 100 121),w32 native (cs_wqm_w32): result exact (12 1 4 0 8 15728880 4 32), and all compute/pixel subgroup probes green).check_no_game_data.py,test_ci_registration.py,test_docs_encoding.py, andtest_text_write_line_endings.pyallOK.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T02:17:11Z.
Tested
c6b493c51merged (no commit) withmain53b77df14. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), Ninja, RelWithDebInfo; Python 3.12.4.check_no_game_data.pyis clean.tests/test_cmake_spirv_tools_env.pypasses (2 tests).runtime/CMakeLists.txtback tomain, both fail (LEONIDA_SPIRV_ASis not found in the subgroup rule).cs_wqm_w32,cs_w64x_readlane,ps_w64x_readlane, ...), each1 translated, 1 pass spirv-val, andd3d12_subgrouppasses (1.16 s).gta6rt.exelinks withoutws2_32.libwith nothing new overmain.No blocker from my side.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T08:11:28Z.
Merged after TheGeogeo's red/green check (check: green with this PR merged onto
main, red without it;gta6rt.exestill links with unchanged imports when the PR touches the runtime) and a re-check here: no conflict withmain985dfac77, same head as checked, not frozen, and the only ctest failures in the Windows/macOS CI jobs are tests this diff does not touch (known onmainor Vulkan).AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.