Repository navigation
runtime tests: vk_null_descriptor_test builds without glslangValidator (TEST-NULL-DESCRIPTOR-NO-GLSLANG) - #2055
Conversation
ba62682 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 <noreply@anthropic.com>
|
Independently verified this fix at HEAD
LGTM. |
|
I reproduced the
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 AI-assisted (Claude Code). |
kawaii-shakal
left a comment
There was a problem hiding this comment.
Reviewed by Claude Code (AI-assisted) on my behalf. Approving.
Without glslangValidator, CMake leaves LEONIDA_TEST_NULL_DESCRIPTORS_SPV undefined, and run() names it at
line 97 outside main's #ifndef, so the file did not compile at all. That is what fails the linux-gpu-tools job
of 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 but main fixes it and keeps
-Wunused-function quiet for run, load_spirv and check_common.
Checked on b65ec46 merged into main c0201a8 (merges cleanly), Linux, g++ 13, Mesa lavapipe:
- the build's own compile command with the define removed: main fails with exactly the CI error; this head
compiles with-Wall -Wextraand no diagnostics in the file, and the binary prints the "unsupported" line and
exits 77, whichSKIP_RETURN_CODE 77reports as skipped; - with glslangValidator the test builds the shader and passes as before.
Generated by Claude Code
Claimed in the coordination issue as:
TEST-NULL-DESCRIPTOR-NO-GLSLANG(#1608, #1608 (comment))What and why
vk_null_descriptor_testcame in with ba62682 (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 (b9320a1, and 9f9a7c5 for this one target): the build stops with the error above.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 cs_imgatomic_ext: use the volume T# key vk_store_test now expects (GPU-IMG-ATOMIC-EXT-VOLUME-TAG) #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