runtime tests: vk_null_descriptor_test builds without glslangValidator (TEST-NULL-DESCRIPTOR-NO-GLSLANG) #2055

Open
github-bot wants to merge 1 commit from github-bot/gh-2055 into main AGit
Owner

@⁠xel1uz on GitHub · 2026-11-25 19:08 UTC · original
xel1uz:test/null-descriptor-no-glslang → main · +4 −0 · 1 files · 1 commits · open

Claimed in the coordination issue as: TEST-NULL-DESCRIPTOR-NO-GLSLANG (#1608, #1608)

What and why

vk_null_descriptor_test came in with ba626820 (the post-story-load integration). Its GLSL shader is only built when CMake finds glslangValidator, and only then is LEONIDA_TEST_NULL_DESCRIPTORS_SPV defined (runtime/CMakeLists.txt, "without glslangValidator the test skips"). main() checks for the macro and returns 77, but run() in the anonymous namespace calls load_spirv(LEONIDA_TEST_NULL_DESCRIPTORS_SPV) without a check. So without glslang the file does not compile:

runtime/test/vk_null_descriptor_test.cpp:97:56: error: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared in this scope
ninja: build stopped: subcommand failed.

The linux-gpu-tools job in .github/workflows/runtime.yml installs libvulkan-dev mesa-vulkan-drivers vulkan-tools spirv-tools and no glslang. Its cmake --build therefore fails, and none of its later steps run: CPU runtime tests, predicate shaders, the three llvmpipe GPU passes and the pipeline-checker checks. The Windows and macOS jobs install glslang, so they don't see this.

The fix compiles the namespace's helpers only when the macro is defined, the way main() already assumes. Without glslang the test reports itself unsupported (77, SKIP_RETURN_CODE), like the other GLSL-based runtime tests. With glslang nothing changes.

Tested

All runs are in Ubuntu 26.04 (Docker), with g++ 15.2, Mesa 26.0.8 llvmpipe, and Vulkan-Headers fetched at the pinned commit (-DLEONIDA_VULKAN_HEADERS_FETCH=ON). The configure is otherwise as in linux-gpu-tools: -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON.

  • main without glslang (b9320a11, and 9f9a7c5f for this one target): the build stops with the error above.
  • This branch without glslang:
    • The full build passes (all targets), on 9f9a7c5f as well.
    • ctest gives 93 of 93 tests passed, with vk_null_descriptor skipped (77).
    • run_gpu_tests.py runs natively, with LEONIDA_W64_EMULATE=1 and with LEONIDA_BARY_FALLBACK=1. The only failure in all three is cs_imgatomic_ext, which #1518 already fixes.
  • This branch with glslang (glslang-tools): vk_null_descriptor_test builds and passes on llvmpipe (vk_null_descriptor: ok, null descriptors and storage fallback images).
  • git diff --check and scripts/check_no_game_data.py are clean on the changed file.

GPUs tested: Mesa llvmpipe (LLVM 21.1.8), CPU only.

AI-assisted: Yes (Claude Code).

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption.
  • A new translator rule in the contract table of docs/design.md - n/a.

🤖 Generated with Claude Code

**@⁠xel1uz** on GitHub · 2026-11-25 19:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2055) `xel1uz:test/null-descriptor-no-glslang` → `main` · +4 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: `TEST-NULL-DESCRIPTOR-NO-GLSLANG` (#1608, https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why `vk_null_descriptor_test` came in with ba626820 (the post-story-load integration). Its GLSL shader is only built when CMake finds `glslangValidator`, and only then is `LEONIDA_TEST_NULL_DESCRIPTORS_SPV` defined (`runtime/CMakeLists.txt`, "without glslangValidator the test skips"). `main()` checks for the macro and returns 77, but `run()` in the anonymous namespace calls `load_spirv(LEONIDA_TEST_NULL_DESCRIPTORS_SPV)` without a check. So without glslang the file does not compile: ``` runtime/test/vk_null_descriptor_test.cpp:97:56: error: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared in this scope ninja: build stopped: subcommand failed. ``` The `linux-gpu-tools` job in `.github/workflows/runtime.yml` installs `libvulkan-dev mesa-vulkan-drivers vulkan-tools spirv-tools` and no glslang. Its `cmake --build` therefore fails, and none of its later steps run: CPU runtime tests, predicate shaders, the three llvmpipe GPU passes and the pipeline-checker checks. The Windows and macOS jobs install glslang, so they don't see this. The fix compiles the namespace's helpers only when the macro is defined, the way `main()` already assumes. Without glslang the test reports itself unsupported (77, `SKIP_RETURN_CODE`), like the other GLSL-based runtime tests. With glslang nothing changes. ### Tested All runs are in Ubuntu 26.04 (Docker), with g++ 15.2, Mesa 26.0.8 llvmpipe, and Vulkan-Headers fetched at the pinned commit (`-DLEONIDA_VULKAN_HEADERS_FETCH=ON`). The configure is otherwise as in `linux-gpu-tools`: `-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON`. - **`main` without glslang** (b9320a11, and 9f9a7c5f for this one target): the build stops with the error above. - **This branch without glslang:** - The full build passes (all targets), on 9f9a7c5f as well. - `ctest` gives 93 of 93 tests passed, with `vk_null_descriptor` skipped (77). - `run_gpu_tests.py` runs natively, with `LEONIDA_W64_EMULATE=1` and with `LEONIDA_BARY_FALLBACK=1`. The only failure in all three is `cs_imgatomic_ext`, which #1518 already fixes. - **This branch with glslang** (`glslang-tools`): `vk_null_descriptor_test` builds and passes on llvmpipe (`vk_null_descriptor: ok`, null descriptors and storage fallback images). - `git diff --check` and `scripts/check_no_game_data.py` are clean on the changed file. GPUs tested: Mesa llvmpipe (LLVM 21.1.8), CPU only. AI-assisted: Yes (Claude Code). ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption. - [ ] A new translator rule in the contract table of `docs/design.md` - n/a. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ba626820 added the test with a guard in main only: without glslangValidator
CMake leaves LEONIDA_TEST_NULL_DESCRIPTORS_SPV undefined, but run() still
names it, so the file does not compile and the Linux runtime build, which
installs no glslang (runtime.yml linux-gpu-tools), stops there. Compile the
helpers only with the shader, as main already assumes, so the test reports
itself unsupported (77) like the other GLSL-based tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:20 +00:00
Author
Owner

@⁠moffington on GitHub · 2026-11-26 03:00 UTC · original

Independently verified this fix at HEAD b65ec46b7 (issue encountered while investigating the linux-gpu-tools build failure on #826):

  • Without glslangValidator (-DCMAKE_IGNORE_PATH="/usr/bin;/bin;/usr/sbin;/sbin"):
    • Merge-base 9f9a7c5f3: fails to compile at runtime/test/vk_null_descriptor_test.cpp:97 (‘LEONIDA_TEST_NULL_DESCRIPTORS_SPV’ was not declared in this scope).
    • PR HEAD b65ec46b7: builds cleanly; vk_null_descriptor_test prints unsupported: the test shader was not built (no glslangValidator) and exits 77, and ctest -R "^vk_null_descriptor$" reports ***Skipped (100% tests passed out of 1).
  • With glslangValidator (NVIDIA GeForce RTX 3060, Linux):
    • Compiles cs_null_descriptors.comp and vk_null_descriptor_test cleanly; vk_null_descriptor_test executes all null-descriptor and storage-fallback checks and passes (vk_null_descriptor: ok, ctest Passed in 0.45 s). No test coverage is lost when glslangValidator is available.
  • Mergeability: git merge-tree against main (7f3d0095a) is clean.

LGTM.

**@⁠moffington** on GitHub · 2026-11-26 03:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2055#issuecomment-7181306669) Independently verified this fix at HEAD `b65ec46b7` (issue encountered while investigating the `linux-gpu-tools` build failure on #826): - **Without `glslangValidator`** (`-DCMAKE_IGNORE_PATH="/usr/bin;/bin;/usr/sbin;/sbin"`): - Merge-base `9f9a7c5f3`: fails to compile at `runtime/test/vk_null_descriptor_test.cpp:97` (`‘LEONIDA_TEST_NULL_DESCRIPTORS_SPV’ was not declared in this scope`). - PR HEAD `b65ec46b7`: builds cleanly; `vk_null_descriptor_test` prints `unsupported: the test shader was not built (no glslangValidator)` and exits `77`, and `ctest -R "^vk_null_descriptor$"` reports `***Skipped` (`100% tests passed out of 1`). - **With `glslangValidator`** (NVIDIA GeForce RTX 3060, Linux): - Compiles `cs_null_descriptors.comp` and `vk_null_descriptor_test` cleanly; `vk_null_descriptor_test` executes all null-descriptor and storage-fallback checks and passes (`vk_null_descriptor: ok`, `ctest` `Passed` in 0.45 s). No test coverage is lost when `glslangValidator` is available. - **Mergeability**: `git merge-tree` against `main` (`7f3d0095a`) is clean. LGTM.
Author
Owner

@⁠qhukz13 on GitHub · 2026-11-26 17:06 UTC · original

I reproduced the linux-gpu-tools job: Ubuntu under WSL, g++-13, the job's pinned Vulkan-Headers (6802bb47, vulkan-sdk-1.4.363.0), libvulkan-dev mesa-vulkan-drivers vulkan-tools spirv-tools, the job's configure line. Results:

tree build (no glslang, as in CI) ctest
main 246791612 fails: vk_null_descriptor_test.cpp:97:56: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared, the only error with -k 0 not reached
main + this PR builds 109/109 passed, vk_null_descriptor skipped (77)

So this is the whole build failure every PR head shows in that job. It is also why the job's later steps never ran on any PR: the CPU runtime tests, the predicate shaders, the llvmpipe GPU passes and the pipeline-checker checks. The maintainers' status lists it ("linux-gpu-tools fails at its build step on recent PR heads").

Suggestion, so the test does not stay skipped on Linux CI for good. With glslang-tools installed in the same environment, the test is built and runs on llvmpipe: vk_null_descriptor ... Passed 2.14 sec. Adding glslang-tools to the job's pkgs=(...) list in .github/workflows/runtime.yml would make the job actually exercise it. The guard here would stay for local Linux builds without glslang. That can be a one-line follow-up, or part of this PR if you prefer.

AI-assisted (Claude Code).

**@⁠qhukz13** on GitHub · 2026-11-26 17:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2055#issuecomment-7198514164) I reproduced the `linux-gpu-tools` job: Ubuntu under WSL, `g++-13`, the job's pinned Vulkan-Headers (`6802bb47`, vulkan-sdk-1.4.363.0), `libvulkan-dev mesa-vulkan-drivers vulkan-tools spirv-tools`, the job's configure line. Results: | tree | build (no glslang, as in CI) | `ctest` | |---|---|---| | main `246791612` | **fails**: `vk_null_descriptor_test.cpp:97:56: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared`, the only error with `-k 0` | not reached | | main + this PR | builds | **109/109 passed**, `vk_null_descriptor` skipped (77) | So this is the whole build failure every PR head shows in that job. It is also why the job's later steps never ran on any PR: the CPU runtime tests, the predicate shaders, the llvmpipe GPU passes and the pipeline-checker checks. The maintainers' status lists it ("linux-gpu-tools fails at its build step on recent PR heads"). **Suggestion, so the test does not stay skipped on Linux CI for good.** With `glslang-tools` installed in the same environment, the test is built and runs on llvmpipe: `vk_null_descriptor ... Passed 2.14 sec`. Adding `glslang-tools` to the job's `pkgs=(...)` list in `.github/workflows/runtime.yml` would make the job actually exercise it. The guard here would stay for local Linux builds without glslang. That can be a one-line follow-up, or part of this PR if you prefer. AI-assisted (Claude Code).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2055/head:github-bot/gh-2055'
git switch 'github-bot/gh-2055'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2055'
git switch 'github-bot/gh-2055'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2055'
git switch 'github-bot/gh-2055'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2055'
git switch 'main'
git merge --squash 'github-bot/gh-2055'
git switch 'main'
git merge --ff-only 'github-bot/gh-2055'
git switch 'main'
git merge 'github-bot/gh-2055'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.