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

Open
opened 2026-11-26 21:19:54 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2055
Author: @xel1uz
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: test/null-descriptor-no-glslang


📝 Commits (1)

  • b65ec46 runtime tests: vk_null_descriptor_test builds without glslangValidator

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 runtime/test/vk_null_descriptor_test.cpp (+4 -0)

📄 Description

Claimed in the coordination issue as: TEST-NULL-DESCRIPTOR-NO-GLSLANG (#1608, https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171848684)

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2055 **Author:** [@xel1uz](https://github.com/xel1uz) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/null-descriptor-no-glslang` --- ### 📝 Commits (1) - [`b65ec46`](https://github.com/ubiquitarianism/leonida/commit/b65ec46b7c499d7d7a5c3b7ff895394a9b93bb47) runtime tests: vk_null_descriptor_test builds without glslangValidator ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/vk_null_descriptor_test.cpp` (+4 -0) </details> ### 📄 Description Claimed in the coordination issue as: `TEST-NULL-DESCRIPTOR-NO-GLSLANG` (#1608, https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171848684) ### 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2061
No description provided.