Skip to content

runtime: list the llvm-mc shader tests as Not Run (Disabled) when the tools are missing - #9653

Closed
Luqueze wants to merge 1 commit into
ProjectLeonida:mainfrom
Luqueze:ctest-disabled-without-llvm-mc
Closed

Luqueze wants to merge 1 commit into
ProjectLeonida:mainfrom
Luqueze:ctest-disabled-without-llvm-mc

Conversation

@Luqueze

@Luqueze Luqueze commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue: #9522 (comment) (the CMake side of icecreammule277-dot's finding, #9522 (comment); the docs side is @monkelmaoooo's PROC-546).

What and why

Without llvm-mc (or the Vulkan SDK's spirv-as/spirv-val, or glslangValidator for d3d12_subgroup), runtime/CMakeLists.txt did not register the tests that need translated shaders. Only a configure-time STATUS line said so, so ctest reported a smaller total, and runs on different machines could not be compared. The finding counted 7 tests. The two blocks actually leave out 10: d3d12_translated_draw, vk_bindless_ps_tex, vk_bindless_ps_imgatomic, d3d12_m2_textured, d3d12_m2_formats, d3d12_m3_frame, d3d12_m3_first_pass, d3d12_m4_compute, d3d12_buffer_uav and d3d12_subgroup.

  • runtime/CMakeLists.txt: the else() branch of the M1.5 block (LEONIDA_LLVM_MC AND LEONIDA_SPIRV_AS AND LEONIDA_SPIRV_VAL) and the one of the subgroup block (LEONIDA_LLVM_MC AND Vulkan_GLSLANG_VALIDATOR_EXECUTABLE) register these tests with DISABLED TRUE. This is how gameinput is already registered without SDL3 (L1096-1099), so ctest lists them as "Not Run (Disabled)". The total is now the same on every machine, and the run shows which tests it did not run. The STATUS lines stay, and the two comments above the blocks say what happens now. When the tools are found, nothing changes.

Tested

Windows 11 Pro (10.0.26300), NVIDIA GeForce RTX 4070 SUPER, driver 32.0.16.1742, Vulkan SDK 1.4.363.0, CMake 4.4.4, Visual Studio 17 2022 generator (VS Build Tools 2022). Configure and ctest -N only. Nothing was built, because the change is in test registration only.

configure tests listed
unmodified main 5d74c27, no LLVM_MC 266
this branch, no LLVM_MC 276, the 10 above (Disabled)
this branch, LLVM_MC set 276, same names, none disabled
  • ctest -R on three of the disabled tests prints ***Not Run (Disabled) for each, with no failure.
  • python -I tests/test_ctest_registration.py: OK (every built test executable still has an add_test).
  • Not covered: a configure where llvm-mc is found but spirv-as/spirv-val are not (same else() branch), Linux, and a real llvm-mc build. The "LLVM_MC set" configure points it at an unrelated executable, which is enough for registration but not for building the shaders.
  • python -I scripts/check_no_game_data.py runtime/CMakeLists.txt: clean.

AI-assisted: yes (Claude Code).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • No test reads anything from the game package.

Touches runtime/CMakeLists.txt only, in two else() branches. PROC-546 documents the same tests in docs/testing.md: if it lands first, its wording about missing tests may need to say "Not Run (Disabled)".

… tools are missing

Without llvm-mc (or the SDK's spirv-as/spirv-val, or glslangValidator for
d3d12_subgroup) ten tests were never registered, so ctest reported 266 tests
instead of 276 and runs on different machines could not be compared. They are
now registered as disabled, as gameinput is without SDL3, so the total is the
same everywhere and the run shows which tests it did not run.
@OGShotz

OGShotz commented Nov 23, 2026

Copy link
Copy Markdown

Tested 372dd08 on Windows 11 x64 with CMake 4.4.4, the Visual Studio 17 2022 generator and Vulkan SDK 1.4.363.0, and a real llvm-mc 21.1.8 with the AMDGPU target (scripts/build_llvm_mc.ps1). That covers the case the description lists as not covered. AI-assisted.

configure ctest -N total
this branch, LEONIDA_LLVM_MC empty and no LLVM_MC 276; the 10 named tests are all Not Run (Disabled)
this branch, real LLVM_MC 276
main 5d74c27, real LLVM_MC (an earlier build on the same machine) 276

The test names are identical between the two configures of this branch (Compare-Object of the sorted ctest -N names gives no difference). With real llvm-mc on main, the 7 of those tests that this machine runs (d3d12_translated_draw, d3d12_m2_textured, d3d12_m2_formats, d3d12_m3_frame, d3d12_m4_compute, d3d12_buffer_uav, d3d12_subgroup) all pass on an RTX 2070 (driver 617.14). So the names this PR registers as disabled are the ones the real block adds.

@sgonzalez-glitch

Copy link
Copy Markdown

Tested 372dd0895 (as part of #9516, #9549, #9614, #9653, #9657, #9660, #9678 and #9689 merged together onto main 5d74c2723) on NVIDIA GeForce RTX 2080, driver 621.24 (32.0.16.2124), Windows 11, MSVC 19.44 RelWithDebInfo: pass.

AI-assisted: yes

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.

4 participants