runtime tests: vk_null_descriptor_test builds without glslangValidator (TEST-NULL-DESCRIPTOR-NO-GLSLANG) #2055
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2055"
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 xel1uz on 2026-11-25T19:08:17Z.
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_testcame in withba626820(the post-story-load integration). Its GLSL shader is only built when CMake findsglslangValidator, and only then isLEONIDA_TEST_NULL_DESCRIPTORS_SPVdefined (runtime/CMakeLists.txt, "without glslangValidator the test skips").main()checks for the macro and returns 77, butrun()in the anonymous namespace callsload_spirv(LEONIDA_TEST_NULL_DESCRIPTORS_SPV)without a check. So without glslang the file does not compile:The
linux-gpu-toolsjob in.github/workflows/runtime.ymlinstallslibvulkan-dev mesa-vulkan-drivers vulkan-tools spirv-toolsand no glslang. Itscmake --buildtherefore 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 inlinux-gpu-tools:-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON.mainwithout glslang (b9320a11, and9f9a7c5ffor this one target): the build stops with the error above.9f9a7c5fas well.ctestgives 93 of 93 tests passed, withvk_null_descriptorskipped (77).run_gpu_tests.pyruns natively, withLEONIDA_W64_EMULATE=1and withLEONIDA_BARY_FALLBACK=1. The only failure in all three iscs_imgatomic_ext, which #1518 already fixes.glslang-tools):vk_null_descriptor_testbuilds and passes on llvmpipe (vk_null_descriptor: ok, null descriptors and storage fallback images).git diff --checkandscripts/check_no_game_data.pyare clean on the changed file.GPUs tested: Mesa llvmpipe (LLVM 21.1.8), CPU only.
AI-assisted: Yes (Claude Code).
Checklist
mainand merges cleanly.docs/design.md- n/a.🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-26T03:00:08Z.
Independently verified this fix at HEAD
b65ec46b7(issue encountered while investigating thelinux-gpu-toolsbuild failure on #826):glslangValidator(-DCMAKE_IGNORE_PATH="/usr/bin;/bin;/usr/sbin;/sbin"):9f9a7c5f3: fails to compile atruntime/test/vk_null_descriptor_test.cpp:97(‘LEONIDA_TEST_NULL_DESCRIPTORS_SPV’ was not declared in this scope).b65ec46b7: builds cleanly;vk_null_descriptor_testprintsunsupported: the test shader was not built (no glslangValidator)and exits77, andctest -R "^vk_null_descriptor$"reports***Skipped(100% tests passed out of 1).glslangValidator(NVIDIA GeForce RTX 3060, Linux):cs_null_descriptors.compandvk_null_descriptor_testcleanly;vk_null_descriptor_testexecutes all null-descriptor and storage-fallback checks and passes (vk_null_descriptor: ok,ctestPassedin 0.45 s). No test coverage is lost whenglslangValidatoris available.git merge-treeagainstmain(7f3d0095a) is clean.LGTM.
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T17:06:37Z.
I reproduced the
linux-gpu-toolsjob: 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:ctest246791612vk_null_descriptor_test.cpp:97:56: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared, the only error with-k 0vk_null_descriptorskipped (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-toolsinstalled in the same environment, the test is built and runs on llvmpipe:vk_null_descriptor ... Passed 2.14 sec. Addingglslang-toolsto the job'spkgs=(...)list in.github/workflows/runtime.ymlwould 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).
Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-11-27T16:41:19Z.
Review: APPROVED
Reviewed by Claude Code (AI-assisted) on my behalf. Approving.
Without glslangValidator, CMake leaves
LEONIDA_TEST_NULL_DESCRIPTORS_SPVundefined, andrun()names it atline 97 outside main's
#ifndef, so the file did not compile at all. That is what fails thelinux-gpu-toolsjobof Runtime on main today (
vk_null_descriptor_test.cpp:97:56: error: 'LEONIDA_TEST_NULL_DESCRIPTORS_SPV' was not declared in this scope, the runner has no glslang). Guarding everything butmainfixes it and keeps-Wunused-functionquiet forrun,load_spirvandcheck_common.Checked on
b65ec46bmerged into mainc0201a80(merges cleanly), Linux, g++ 13, Mesa lavapipe:compiles with
-Wall -Wextraand no diagnostics in the file, and the binary prints the "unsupported" line andexits 77, which
SKIP_RETURN_CODE 77reports as skipped;Generated by Claude Code